English

DISTINCT: A Description-Guided Branch-Consistency Analysis Framework for Non-Regressive Test Case Generation

Software Engineering 2026-02-03 v3

Abstract

Automated test-generation research overwhelmingly assumes the correctness of focal methods, yet practitioners routinely face non-regression scenarios where the focal method may be defective. A baseline evaluation of EVOSUITE and two leading Large Language Model (LLM)-based generators, namely CHATTESTER and CHATUNITEST, on defective focal methods reveals that, despite achieving up to 83% branch coverage, none of the generated tests expose defects, due to a lack of awareness of developer intent. To resolve this problem, we first construct two new benchmarks, namely Defects4J-Desc and QuixBugs-Desc, for experiments, where each focal method is equipped with an additional Natural Language Description (NLD) to support code functionality understanding. Subsequently, we propose DISTINCT, a description-guided branch-consistency analysis framework that transforms LLMs into fault-aware test generators. DISTINCT carries three iterative components: (1) a Generator that derives initial tests based on the NLDs and the focal method, (2) a Validator that iteratively fixes uncompilable tests using compiler diagnostics, and (3) an Analyzer that iteratively aligns test behavior with NLD semantics via branch-level analysis. Extensive experiments confirm the effectiveness of our approach. Compared to state-of-the-art approaches, DISTINCT achieves an average improvement of 14.64% in Compilation Success Rate (CSR), 6.66% in Passing Rate (PR), and particularly 95.22% in Defect Detection Rate (DDR) across both benchmarks. In terms of code coverage, DISTINCT improves Statement Coverage (SC) by an average of 3.77% and Branch Coverage (BC) by 5.36%. These results set a new baseline for non-regressive test generation and highlight how description-driven reasoning enables LLMs to move beyond coverage chasing toward effective defect detection.

Keywords

Cite

@article{arxiv.2506.07486,
  title  = {DISTINCT: A Description-Guided Branch-Consistency Analysis Framework for Non-Regressive Test Case Generation},
  author = {Pengyu Xue and Yuxiang Zhang and Zhen Yang and Xiaoxue Ren and Xiang Li and Pengfei Hu and Linhao Wu and Kainan Li},
  journal= {arXiv preprint arXiv:2506.07486},
  year   = {2026}
}
R2 v1 2026-07-01T03:06:32.613Z