mlsanityData to 14 Oct 2026

REFINE: A Multi-Agent LLM Approach for Evidence-Guided Code Refactoring

arXiv 2608.23611 ↗First posted 21 Aug 2026cs.SE cs.AIcited by 0

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

Large Language Models (LLMs) offer new opportunities for automated code refactoring. However, generated changes must reduce targeted quality problems without introducing new issues or altering behaviour-relevant code structures. We introduce REFINE (Refactoring with Evidence-aware Flow for Integrated ageNtic Execution), a tool-agnostic, evidence-aware multi-agent approach for generating Java file-level refactoring candidates. REFINE combines static-analysis-guided smell identification, smell-informed planning, LLM-based transformation, automated re-analysis, preservation checks, and structured reporting. We evaluate REFINE on 450 Java files from 15 open-source systems, producing 1,350 model-pass outputs using OpenAI GPT-5.5, Google Gemini 3.1 Pro Preview, and Anthropic Claude Opus 4.8. REFINE reduces detected code smells by 68.26%, 72.79%, and 68.49% across the three configurations, respectively, with the strongest reductions observed for major smells. A matched 150-file direct-prompt baseline shows that REFINE achieves a higher median code-smell reduction with smaller edits and fewer public-method removals. However, broader quality improvements are inconsistent, and preservation checks reveal residual risks, including assert/fail-call changes and public-method removal. Therefore, REFINE outputs should be treated as refactoring candidates requiring compilation, testing, dependency analysis, and human review before adoption in repository- or system-level settings.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 10 of its 28 references that are in the map. First posted on arXiv 21 Aug 2026.

Builds on

10 of 28 references.

Closest ancestors · 3

Same direction, newest first

  1. 2026SmellBench: Evaluating LLM Agents on Architectural Code Smell Repair7 May
  2. 2025Agentic Refactoring: An Empirical Study of AI Coding Agents6 Nov
  3. 2025RefAgent: A Multi-agent LLM-based Framework for Automatic Software Refactoring5 Nov

Other references · 7

  1. 2023Large Language Models for Software Engineering: Survey and Open Problemscited by 181
  2. 2024An Empirical Study on the Code Refactoring Capability of Large Language Modelscited by 19
  3. 2020Code Smells and Refactoring: A Tertiary Systematic Review of Challenges and Observationscited by 18
  4. 2026SWE-Refactor: A Repository-Level Benchmark for Real-World LLM-Based Code Refactoringcited by 11
  5. 2024An Empirical Study on the Potential of LLMs in Automated Software Refactoringcited by 10
  6. 2026From Restructuring to Stabilization: A Large-Scale Experiment on Iterative Code Readability Refactoring with Large Language Modelscited by 3
  7. 2025RefModel: Detecting Refactorings using Foundation Modelscited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026SmellBench: Towards Fine-Grained Evaluation of Code Agents on Refactoring Tasks
  2. 2026RefactorAssist: Agentic Refinement for Reliable Code Refactoring
  3. 2025MANTRA: Enhancing Automated Method-Level Refactoring with Contextual RAG and Multi-Agent LLM Collaboration
  4. 2025REFINE: Enhancing Program Repair Agents through Context-Aware Patch Refinement
  5. 2026RefactorPlatform: An Open-Source Harness for Controlled Evaluation of Repository-Scale Refactoring Agents
  6. 2026"Refactoring Runaway": Understanding and Mitigating Tangled Refactorings in Coding Agents for Issue Resolution
  7. 2026SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoring
  8. 2026CodeTaste: Can LLMs Generate Human-Level Code Refactorings?