Large Language Models for Multi-Lingual Equivalent Mutant Detection: An Extended Empirical Study

📅 2026-07-01
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the challenges of equivalent mutant detection—namely high computational cost, compiler dependency, scarcity of labeled training data, and limited cross-language generalization—by systematically evaluating the effectiveness of large language models (LLMs) for this task across multiple programming languages. Leveraging a large-scale dataset of Java and C mutant pairs and employing a fine-tuned code embedding strategy, the proposed LLM-based approach is rigorously compared against traditional code analysis and conventional machine learning methods. Experimental results demonstrate that the LLM method significantly outperforms existing techniques in terms of accuracy (achieving the highest F1 score), inference efficiency (comparable to machine learning models), and cross-language generalization, thereby establishing its feasibility and superiority for equivalent mutant detection.
📝 Abstract
Mutation testing is a powerful technique for ensuring software quality. However, the presence of equivalent mutants introduces unnecessary costs and biases, limiting its practical effectiveness. Although numerous equivalent mutant detection (EMD) methods have been proposed, they often face distinct challenges: pure-code analysis methods can be limited by their reliance on specific compiler infrastructures, while existing machine-learning approaches remain constrained by scarce training data and limited generalization to unseen mutants. Large language models (LLMs) have recently demonstrated remarkable performance across diverse code-related tasks by better capturing program semantics. Yet their potential for EMD remains largely unexplored, particularly in the multi-lingual context. This paper presents the first comprehensive empirical study on LLMs for EMD, using 3,302 Java and 1,088 C mutant pairs to benchmark against state-of-the-art methods, explore strategy variations, assess efficiency, and evaluate cross-lingual generalization. Experimental results show that LLM-based approaches achieve higher F1-scores than the evaluated traditional methods, with fine-tuned code embedding yielding the highest detection accuracy among the tested strategies. Moreover, LLM-based approaches strike a practical balance between effectiveness and efficiency with inference times comparable to existing machine-learning models. Importantly, fine-tuned LLMs demonstrate measurable generalization across programming languages. These findings establish LLMs as a viable and efficient approach for tackling the longstanding challenge of equivalent mutant detection, offering new directions for advancing mutation testing in practice.
Problem

Research questions and friction points this paper is trying to address.

equivalent mutant detection
mutation testing
software quality
multi-lingual
program semantics
Innovation

Methods, ideas, or system contributions that make the work stand out.

Large Language Models
Equivalent Mutant Detection
Mutation Testing
Cross-lingual Generalization
Code Embedding