Testing Refactoring Engine via Historical Bug Report driven LLM
Haibo Wang, Zhuolin Xu, Shin Hwei Tan

TL;DR
This paper introduces RETESTER, a novel LLM-based framework that uses historical bug reports and program characteristics to automatically test refactoring engines, successfully uncovering new bugs in popular IDEs.
Contribution
The paper presents a new LLM-driven approach for automated testing of refactoring engines using historical bug data and differential testing techniques.
Findings
Revealed 18 new bugs in Eclipse and IntelliJ IDEA refactoring engines.
Seven bugs confirmed by developers, three fixed.
Demonstrated effectiveness of LLMs in software testing.
Abstract
Refactoring is the process of restructuring existing code without changing its external behavior while improving its internal structure. Refactoring engines are integral components of modern Integrated Development Environments (IDEs) and can automate or semi-automate this process to enhance code readability, reduce complexity, and improve the maintainability of software products. Similar to traditional software systems such as compilers, refactoring engines may also contain bugs that can lead to unexpected behaviors. In this paper, we propose a novel approach called RETESTER, a LLM-based framework for automated refactoring engine testing. Specifically, by using input program structure templates extracted from historical bug reports and input program characteristics that are error-prone, we design chain-of-thought (CoT) prompts to perform refactoring-preserving transformations. The…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Real-time simulation and control systems
