Skip to main content
QUICK REVIEW

[Paper Review] From Copilot to Pilot: Towards AI Supported Software Development

Rohith Pudari, Neil Ernst|arXiv (Cornell University)|Mar 7, 2023
Software Engineering ResearchComputer Science12 citations
TL;DR

The paper evaluates GitHub Copilot's ability to follow Pythonic idioms and JavaScript best practices, and introduces a six-level software abstraction taxonomy to bound AI-assisted code completion capabilities.

ABSTRACT

AI-supported programming has arrived, as shown by the introduction and successes of large language models for code, such as Copilot/Codex (Github/OpenAI) and AlphaCode (DeepMind). Above human average performance on programming challenges is now possible. However, software engineering is much more than solving programming contests. Moving beyond code completion to AI-supported software engineering will require an AI system that can, among other things, understand how to avoid code smells, to follow language idioms, and eventually (maybe!) propose rational software designs. In this study, we explore the current limitations of AI-supported code completion tools like Copilot and offer a simple taxonomy for understanding the classification of AI-supported code completion tools in this space. We first perform an exploratory study on Copilot's code suggestions for language idioms and code smells. Copilot does not follow language idioms and avoid code smells in most of our test scenarios. We then conduct additional investigation to determine the current boundaries of AI-supported code completion tools like Copilot by introducing a taxonomy of software abstraction hierarchies where 'basic programming functionality' such as code compilation and syntax checking is at the least abstract level, software architecture analysis and design are at the most abstract level. We conclude by providing a discussion on challenges for future development of AI-supported code completion tools to reach the design level of abstraction in our taxonomy.

Motivation & Objective

  • Assess current boundaries of AI-supported code completion tools using Copilot as a representative tool.
  • Evaluate Copilot’s ability to follow Pythonic idioms and avoid code smells in JavaScript code.
  • Propose a taxonomy of software abstraction hierarchies to categorize AI-supported code generation tasks.
  • Discuss challenges and future directions toward higher-level, design-oriented AI software development.

Proposed method

  • Sample 25 popular Pythonic idioms from open-source sources and 25 JavaScript best practices from the AirBNB guide.
  • Trigger Copilot suggestions using a two-part input (scenario title as a comment and minimal code).
  • Evaluate Copilot’s top 10 suggestions against the cited idioms and practices to determine Pass/Fail for each scenario.
  • Compare Copilot’s performance against the idioms/practices to assess alignment with normal coding standards.
  • Develop a six-level software abstraction taxonomy to map the boundaries of AI-supported code completion.
  • Use a sorting example to illustrate capabilities across abstraction levels.
Figure 3: Koopman’s Autonomous Vehicle Safety Hierarchy of Needs [ 26 ] . SOTIF = safety of the intended function.
Figure 3: Koopman’s Autonomous Vehicle Safety Hierarchy of Needs [ 26 ] . SOTIF = safety of the intended function.

Experimental results

Research questions

  • RQ1RQ-1: What are the current boundaries of AI-supported code completion tools?
  • RQ2RQ-1.1: How do AI-supported code completion tools manage programming idioms?
  • RQ3RQ-1.2: How do AI-supported code completion tools manage non-smelly code through best practices?

Key findings

  • Copilot matched the Pythonic idiom as its first suggestion for 2 of 25 idioms and appeared within the top 10 for 8 of the remaining 23 idioms.
  • Copilot did not have the idiomatic Pythonic approach in its top 10 suggestions for 15 of 25 idioms.
  • For JavaScript best practices, Copilot provided the top suggestion matching the guideline for 3 of 25 cases, and within the top 10 for 5 of the remaining 22 cases.
  • Copilot failed to provide the top-10 best practice in 17 of 25 JavaScript scenarios.
  • Copilot showed better performance on common beginner tasks (e.g., sum of numbers, importing modules) but overall struggled to consistently produce idiomatic or best-practice-aligned code.
  • The authors propose a six-level taxonomy (Syntax, Correctness, Paradigms/Idioms, Code Smells, Design) to bound AI-assisted code generation capabilities, with Copilot performing well at lower levels and facing challenges at higher, architecture/design levels.
Figure 4: Hierarchy of software abstractions. Copilot cleared all green levels and struggled in red levels.
Figure 4: Hierarchy of software abstractions. Copilot cleared all green levels and struggled in red levels.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.