REFINE: A Multi-Agent LLM Approach for Evidence-Guided Code Refactoring
- Source
- arxiv.org
- Author
- Muhammad Waseem, Aakash Ahmad, Pekka Abrahamsson
- Date

Context
REFINE uses automated code analysis to guide AI-generated refactoring and then checks the resulting changes. The paper's abstract reports roughly 68–73% reductions in detected code smells across three model configurations on 450 Java files. Code smells are patterns flagged as quality problems; reducing their count does not establish that behavior stayed correct.
On a matched 150-file comparison, REFINE produced greater median smell reduction with smaller edits and fewer public-method removals than direct prompting. Some outputs still changed assertions or removed public methods. The findings therefore support REFINE as a way to generate refactoring candidates, with compilation, tests, analysis and human review still required before adoption.
- Program — A set of instructions stored so that a computer can run it.
- Dependency — Anything a program needs to run that its author did not write: the language, its standard library, or a separately installed package.
- multi-agent — Using several AI agents on one problem — splitting work in parallel, checking each other, or filling different roles like planner and reviewer.
- Large language model — A model trained on large amounts of data to process and generate language.
articleFrom Cosmetic to Structural: A Paired Experiment on Metric-Guided Agentic RefactoringNadim Hagatulah, Markus Borg, Emma S\"oderberg
articleRefine After Generation: Toward Correct and Concise Patches in LLM-based Program RepairWenqiang Luo, Jacky Keung, Xiaoyu Shi, Yicheng Sun, Boyang Yang, Zhou Yang, Haoye Tian
articleCode Transformation Rule Synthesis using LLMs: Potential and LimitsAxel Allain, Aymeric Blot, Djamel Eddine Khelladi, Mathieu Acher
Checking sign-in…
Loading comments…