Pith. sign in

REVIEW 1 cited by

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

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2401.14176 v2 pith:ULRPML66 submitted 2024-01-25 cs.SE cs.AI

classification cs.SEcs.AI
keywords codesmellscopilotpythonchatcopilot-generatedfixingeffectiveness
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

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.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvements

    cs.SE 2026-07 conditional novelty 7.0 of 10

    SWE-NFI measures coding agents' non-functional code improvements with 92 deterministic rules and 188 real GitHub tasks, finding agents lag humans most on structural logic-pattern improvements.

Pith tools