EM-Assist: Safe Automated ExtractMethod Refactoring with LLMs
Not on the map. Why?
Abstract (arXiv)
Excessively long methods, loaded with multiple responsibilities, are challenging to understand, debug, reuse, and maintain. The solution lies in the widely recognized Extract Method refactoring. While the application of this refactoring is supported in modern IDEs, recommending which code fragments to extract has been the topic of many research tools. However, they often struggle to replicate real-world developer practices, resulting in recommendations that do not align with what a human developer would do in real life. To address this issue, we introduce EM-Assist, an IntelliJ IDEA plugin that uses LLMs to generate refactoring suggestions and subsequently validates, enhances, and ranks them. Finally, EM-Assist uses the IntelliJ IDE to apply the user-selected recommendation. In our extensive evaluation of 1,752 real-world refactorings that actually took place in open-source projects, EM-Assist's recall rate was 53.4% among its top-5 recommendations, compared to 39.4% for the previous best-in-class tool that relies solely on static analysis. Moreover, we conducted a usability survey with 18 industrial developers and 94.4% gave a positive rating.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Builds on 3 of its 31 references that are in the map. First posted on arXiv 31 May 2024.
Builds on
3 of 31 references.
References · 3
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2016Why We Refactor? Confessions of GitHub Contributorscited by 10
- 2015JExtract: An Eclipse Plug-in for Recommending Automated Extract Method Refactoringscited by 2
Built on by
Citing papers per year: 2025: 5; 2026: 3.
8 papers.
- 2025MANTRA: Enhancing Automated Method-Level Refactoring with Contextual RAG and Multi-Agent LLM Collaborationcited by 10
- 2026SkillScope: Toward Fine-Grained Least-Privilege Enforcement for Agent Skillscited by 5
- 2025Evaluating the Effectiveness of LLMs in Fixing Maintainability Issues in Real-World Projectscited by 4
- 2025What Were You Thinking? An LLM-Driven Large-Scale Study of Refactoring Motivations in Open-Source Projectscited by 4
- 2025Leveraging LLMs, IDEs, and Semantic Embeddings for Automated Move Method Refactoringcited by 1
- 2025A Blueprint for AI-Driven Software Quality: Integrating LLMs with Established Standardscited by 1
- 2026RefactorAssist: Agentic Refinement for Reliable Code Refactoringcited by 1
- 2026Multi-Agent Coordinated Rename Refactoringcited by 0
- 2026RefactorAssist: Agentic Refinement for Reliable Code Refactoring2 Aug 2026
- 2026SkillScope: Toward Fine-Grained Least-Privilege Enforcement for Agent Skills7 May 2026
- 2026Multi-Agent Coordinated Rename Refactoring1 Jan 2026
- 2025What Were You Thinking? An LLM-Driven Large-Scale Study of Refactoring Motivations in Open-Source Projects9 Sep 2025
- 2025A Blueprint for AI-Driven Software Quality: Integrating LLMs with Established Standards19 May 2025
- 2025Leveraging LLMs, IDEs, and Semantic Embeddings for Automated Move Method Refactoring26 Mar 2025
- 2025MANTRA: Enhancing Automated Method-Level Refactoring with Contextual RAG and Multi-Agent LLM Collaboration18 Mar 2025
- 2025Evaluating the Effectiveness of LLMs in Fixing Maintainability Issues in Real-World Projects4 Feb 2025