Skip to the content.

Welcome to Mr. Coupler’s Site!


The paper “MR-Coupler: Automated Metamorphic Test Generation via Functional Coupling Analysis” is submitted to FSE2026. This page offers access to MR-Coupler and experimental data. Additionally, it provides supplementary materials that are omitted from the paper due to space limitations.

Table of Contents

MR-Coupler


Metamorphic testing (MT) is a widely recognized technique for alleviating the oracle problem in software testing. However, its adoption is hindered by the difficulty of constructing effective metamorphic relations (MRs), which often require domain-specific or hard-to-obtain knowledge. In this work, we propose a novel approach that leverages the functional coupling between methods, which is readily available in source code, to automatically construct MRs and generate metamorphic test cases (MTCs). Our technique, MR-Coupler, identifies functionally coupled method pairs, employs large language models to generate candidate MTCs, and validates them through test amplification and mutation analysis. In particular, we leverage three functional coupling patterns to avoid expensive enumeration of possible method pairs, and a novel validation mechanism to reduce false alarms. Our evaluation of MR-Coupler on 100 human-written MTCs and 50 real-world bugs shows that it generates valid MTCs for over 90% of tasks, improves valid MTC generation by 64.90%, and reduces false alarms by 36.56% compared to baselines. Furthermore, the MTCs generated by MR-Coupler detect 44% of the real bugs. Moreover, the code structures of these MTCs closely follow the human-written MR skeletons. Our results highlight the effectiveness of leveraging functional coupling for automated MR construction and the potential of MR-Coupler to facilitate the adoption of MT in practice. We also released the tool and experimental data to support future research.

The source code of MR-Coupler can be found here.

Experimental Data


Dataset. The first dataset contains 1,471 executable MTCs written by developers in open-source Java projects. The other dataset is made up of 50 entities with bug-revealing MTCs filtered from the first dataset. (NOTE: The experimental projects were collected on December 16, 2024. Due to the continuous evolution of these projects, provided links of MTCs may be outdated. If you encounter any outdated cases, please report the issue to us. Your contributions are greatly appreciated! 😄)

Supplementary Materials


These materials are omitted from the submitted paper due to space limitations.