Evaluating the Code Quality of AI-Assisted Code Generation Tools: An Empirical Study on GitHub Copilot, Amazon CodeWhisperer, and ChatGPT

AI-generated keywords: Code generation AI-assisted tools Code quality metrics HumanEval Dataset Software engineering

AI-generated Key Points

  • The study evaluates code quality of AI-assisted code generation tools: GitHub Copilot, Amazon CodeWhisperer, and ChatGPT.
  • Tools generate code from natural language prompts or partial code inputs.
  • Objective is to compare performance in terms of various code quality metrics: Code Validity, Code Correctness, Code Security, Code Reliability, and Code Maintainability.
  • Researchers used benchmark HumanEval Dataset to assess capabilities of tools.
  • Results show correct code generation rates: ChatGPT 65.2%, GitHub Copilot 46.3%, Amazon CodeWhisperer 31.1%.
  • Newer versions of GitHub Copilot and Amazon CodeWhisperer showed improvement rates in generating correct code.
  • Average technical debt (considering code smells): ChatGPT 8.9 minutes, GitHub Copilot 9.1 minutes, Amazon CodeWhisperer 5.6 minutes.
  • Study highlights strengths and weaknesses of these popular tools for practitioners in software development.
  • Comparing performance metrics can help practitioners select optimal tool for specific tasks in software engineering projects.
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Burak Yetiştiren, Işık Özsoy, Miray Ayerdem, Eray Tüzün

License: CC BY 4.0

Abstract: Context: AI-assisted code generation tools have become increasingly prevalent in software engineering, offering the ability to generate code from natural language prompts or partial code inputs. Notable examples of these tools include GitHub Copilot, Amazon CodeWhisperer, and OpenAI's ChatGPT. Objective: This study aims to compare the performance of these prominent code generation tools in terms of code quality metrics, such as Code Validity, Code Correctness, Code Security, Code Reliability, and Code Maintainability, to identify their strengths and shortcomings. Method: We assess the code generation capabilities of GitHub Copilot, Amazon CodeWhisperer, and ChatGPT using the benchmark HumanEval Dataset. The generated code is then evaluated based on the proposed code quality metrics. Results: Our analysis reveals that the latest versions of ChatGPT, GitHub Copilot, and Amazon CodeWhisperer generate correct code 65.2%, 46.3%, and 31.1% of the time, respectively. In comparison, the newer versions of GitHub CoPilot and Amazon CodeWhisperer showed improvement rates of 18% for GitHub Copilot and 7% for Amazon CodeWhisperer. The average technical debt, considering code smells, was found to be 8.9 minutes for ChatGPT, 9.1 minutes for GitHub Copilot, and 5.6 minutes for Amazon CodeWhisperer. Conclusions: This study highlights the strengths and weaknesses of some of the most popular code generation tools, providing valuable insights for practitioners. By comparing these generators, our results may assist practitioners in selecting the optimal tool for specific tasks, enhancing their decision-making process.

Submitted to arXiv on 21 Apr. 2023

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2304.10778v1

The study conducted by Burak Yetiştiren et al. evaluates the code quality of AI-assisted code generation tools, specifically focusing on GitHub Copilot, Amazon CodeWhisperer, and ChatGPT. These tools have gained popularity in software engineering for their ability to generate code from natural language prompts or partial code inputs. The objective of the study is to compare the performance of these tools in terms of various code quality metrics such as Code Validity, Code Correctness, Code Security, Code Reliability, and Code Maintainability. To assess the capabilities of these prominent code generation tools, the researchers utilized the benchmark HumanEval Dataset. The generated code was then evaluated based on the proposed code quality metrics to determine their strengths and shortcomings. The results of the analysis indicate that the latest versions of ChatGPT, GitHub Copilot, and Amazon CodeWhisperer generate correct code 65.2%, 46.3%, and 31.1% of the time respectively. Furthermore, it was observed that newer versions of GitHub Copilot and Amazon CodeWhisperer showed improvement rates of 18% and 7% respectively in generating correct code. The average technical debt, considering code smells, was found to be 8.9 minutes for ChatGPT, 9.1 minutes for GitHub Copilot, and 5.6 minutes for Amazon CodeWhisperer. In conclusion, this study highlights both the strengths and weaknesses of these popular code generation tools providing valuable insights for practitioners in software development. By comparing these generators based on their performance metrics, practitioners can make informed decisions when selecting an optimal tool for specific tasks thereby enhancing their decision-making process in software engineering projects.
Created on 04 Jan. 2025

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.