Lune

ISSTA2026顶会

Testing Method Relocation Algorithms via Template-Based Systematic Structural Traversal and Precondition Filtering

Chunhao Dong, Yanjie Jiang, Yang Zhang, Hui Liu

2026年份

摘要

Method relocation refactorings, primarily Move Method and Pull Up/Push Down Method, are indispensable for reducing coupling and enhancing cohesion. Despite their widespread automation in modern refactoring engines, these algorithms remain notoriously error-prone, posing significant risks to software reliability. A primary challenge in testing them lies in the vast search space of complex program structures and the intricate preconditions required for safe method relocation. To address this, we propose RelocTest, a comprehensive testing framework that combines template-driven structural traversal with automated precondition filtering. RelocTest systematically explores the input space by populating program templates specially designed for method relocation through a two-stage generation process: (1) Skeleton Synthesis, which systematically traverses diverse syntactic structures, and (2) LLM-Guided Completion, which leverages Large Language Models to inject diverse, executable code into these skeletons. This hybrid strategy ensures high structural coverage while maintaining test program validity. Furthermore, to optimize testing efficiency, we introduce an LLM-based Precondition Extractor that analyzes the implementation of method relocation algorithms to identify and prune test programs destined for rejection. We evaluated RelocTest on 7 mainstream refactoring engines. Our approach successfully uncovered 56 previously unknown bugs, with 19 already confirmed by tool vendors, demonstrating its effectiveness in hardening industrial-strength refactoring tools.

问问这篇 Paper

问问你的智能体。

Lune 读过与它相关的顶会 Paper,每个回答都会注明依据哪几篇。

可以从这些问题问起

智能体调用

Lunesearch_papers

在 Lune 里问

免费开始,无需绑卡

相关 Paper

黄昏的海面,两侧是细线勾勒的悬崖