paper-with-me

Papers

Copilot-in-the-Loop: Fixing Code Smells in Copilot-Generated Python Code using Copilot

2024-01-25 · Beiqi Zhang, Peng Liang, Qiong Feng, Yujia Fu, Zengyang Li

As one of the most popular dynamic languages, Python experiences a decrease in readability and maintainability when code smells are present. Recent advancements in Large Language Models have sparked growing interest in AI-enabled tools for both code generation and refactoring. GitHub Copilot is one such tool that has gained widespread usage. Copilot Chat, released in September 2023, functions as an interactive tool aimed at facilitating natural language-powered coding. However, limited attention has been given to understanding code smells in Copilot-generated Python code and Copilot Chat's ability to fix the code smells. To this end, we built a dataset comprising 102 code smells in Copilot-generated Python code. Our aim is to first explore the occurrence of code smells in Copilot-generated Python code and then evaluate the effectiveness of Copilot Chat in fixing these code smells employing different prompts. The results show that 8 out of 10 types of code smells can be detected in Copilot-generated Python code, among which Multiply-Nested Container is the most common one. For these code smells, Copilot Chat achieves a highest fixing rate of 87.1%, showing promise in fixing Python code smells generated by Copilot itself. In addition, the effectiveness of Copilot Chat in fixing these smells can be improved by providing more detailed prompts.

📄 PDF Abstract BibTeX arXiv:2401.14176

Code (0)

등록된 구현이 없습니다.

Tasks

Code Generation

Similar Papers 제목 키워드 기반

From Copilot to Pilot: Towards AI Supported Software Development

2023-03-07 · Rohith Pudari, Neil A. Ernst

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 progr…

Code Completion

Evaluating the Effectiveness of LLMs in Fixing Maintainability Issues in Real-World Projects

2025-02-04 · Henrique Nunes, Eduardo Figueiredo, Larissa Rocha, Sarah Nadi 외

Large Language Models (LLMs) have gained attention for addressing coding problems, but their effectiveness in fixing code maintainability remains unclear. This study evaluates LLMs capability to resolve 127 maintainabili…

Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair

2023-09-01 · Yuxiang Wei, Chunqiu Steven Xia, Lingming Zhang

During Automated Program Repair (APR), it can be challenging to synthesize correct patches for real-world systems in general-purpose programming languages. Recent Large Language Models (LLMs) have been shown to be helpfu…

Code GenerationProgram Repairvalid

Design and evaluation of AI copilots -- case studies of retail copilot templates

2024-06-17 · Michal Furmakiewicz, Chang Liu, Angus Taylor, Ilya Venger

Building a successful AI copilot requires a systematic approach. This paper is divided into two sections, covering the design and evaluation of a copilot respectively. A case study of developing copilot templates for the…

AnatomyRetrieval

Using Large Language Models to Generate JUnit Tests: An Empirical Study

2023-04-30 · Mohammed Latif Siddiq, Joanna C. S. Santos, Ridwanul Hasan Tanvir, Noshin Ulfat 외

A code generation model generates code by taking a prompt from a code comment, existing code, or a combination of both. Although code generation models (e.g., GitHub Copilot) are increasingly being adopted in practice, i…

Code GenerationHumanEval