Pith. sign in

REVIEW 5 cited by

An Empirical Study on the Code Refactoring Capability of Large Language Models

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 2411.02320 v1 pith:J5BLUNIH submitted 2024-11-04 cs.SE

classification cs.SE
keywords coderefactoringstarcoder2developersone-shotpromptingrefactoringsdevelopment
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Large Language Models (LLMs) have shown potential to enhance software development through automated code generation and refactoring, reducing development time and improving code quality. This study empirically evaluates StarCoder2, an LLM optimized for code generation, in refactoring code across 30 open-source Java projects. We compare StarCoder2's performance against human developers, focusing on (1) code quality improvements, (2) types and effectiveness of refactorings, and (3) enhancements through one-shot and chain-of-thought prompting. Our results indicate that StarCoder2 reduces code smells by 20.1% more than developers, excelling in systematic issues like Long Statement and Magic Number, while developers handle complex, context-dependent issues better. One-shot prompting increases the unit test pass rate by 6.15% and improves code smell reduction by 3.52%. Generating five refactorings per input further increases the pass rate by 28.8%, suggesting that combining one-shot prompting with multiple refactorings optimizes performance. These findings provide insights into StarCoder2's potential and best practices for integrating LLMs into software refactoring, supporting more efficient and effective code improvement in real-world applications.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 5 Pith papers

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

  1. Can LLMs Replace Humans During Code Chunking?

    cs.SE 2025-06 reject novelty 6.0 of 10

    LLM-generated partitions of legacy code yield documentation that LLM judges rate as up to 20% more factual and up to 10% more useful than documentation based on human expert partitions.

  2. Automatic Qiskit Code Refactoring Using Large Language Models

    cs.SE 2025-06 conditional novelty 5.0 of 10

    A structured taxonomy of Qiskit migration scenarios improves GPT-4's line-level refactoring precision from 0.32 to 0.55 and recall from 0.35 to 0.62 on 25 synthetic snippets.

  3. MCTS-Refined CoT: High-Quality Fine-Tuning Data for LLM-Based Repository Issue Resolution

    cs.SE 2025-06 conditional novelty 5.0 of 10

    MCTS-REFINE uses tree search plus strict ground-truth matching to build chain-of-thought training data that lifts open-source LLM issue-resolution scores on SWE-bench.

  4. Taxonomy of migration scenarios for Qiskit refactoring using LLMs

    cs.SE 2025-06 conditional novelty 5.0 of 10

    LLMs can generate a structured taxonomy of Qiskit migration and refactoring scenarios that largely overlaps with an expert-built taxonomy and adds some scenarios.

  5. ROSE: Transformer-Based Refactoring Recommendation for Architectural Smells

    cs.SE 2025-07 reject novelty 4.0 of 10

    A CodeT5 classifier reaches 96.9% accuracy at labeling snippets with three refactoring types, but the paper's smell-to-refactoring mapping is assumed, not tested.

Pith tools