SEJul 3

Round-Trip Mutation Testing: Translating Code to Natural Language Intent and back

arXiv:2607.032234.2
Predicted impact top 82% in SE · last 90 daysOriginality Incremental advance
AI Analysis

For software testing practitioners, RTM provides a more effective mutation testing approach that generates diverse mutants and stronger test suites.

The paper introduces Round-Trip Mutation Testing (RTM), which generates mutants from LLM mistranslations between code and its natural language intent. RTM outperforms traditional mutation testing, detecting on average over 4 times more faults when selecting only 4 tests and 1.7 times more faults with 30 tests.

This paper presents Round-Trip Mutation Testing (RTM), a novel approach that generates mutants from LLM mistranslations between a program code and its intent. Leveraging the generative capability of LLMs from and to programming and natural language, and given an input program, our approach predicts its intent, that is used to generate programs, which when different from the original one, constitute the output mutants. The approach produces additionally mutants, stemming from artificially provoked mistranslations, by mutating the intent prior to the final programs (mutants) generation. Originating from the propagation of small changes in the intent to the code, our intuition is that these programs would present subtle semantic differences from the original one, simulating likely-to-occur faults that could result from specification misunderstandings, and enabling mutation testing. To evaluate RTM, we run it on 40 real buggy methods and evaluate its effectiveness and cost-efficiency in guiding testing towards detecting the bugs. Our results demonstrate the potential of round-trip mutation testing to produce syntactically more diverse mutants, potentially exposing faults that traditional mutation operators fail to reveal. More interestingly, RTM outperforms traditional pattern-based mutation in producing smaller and stronger test-suites, detecting on average over 4 and 1.7 times more faults when selecting only 4 and 30 tests respectively.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes