CND: Detecting Functionally Irrelevant Code Changes for Improving Regression Testing
Software regression testing is a crucial phase for maintaining software quality. To optimize the cost and efficiency of regression testing, selective test case generation and selection have become essential. Many studies have explored methods for reducing the number of test cases. However, during code changes such as bug fixes, feature additions, or optimizations, a portion of the changes may be functionally irrelevant, referred to as change noise. These changes, although affecting code structure, do not impact the software's behavior, syntax, or semantics. In this paper, we propose a pattern-matching-based approach(CND) to detect change noise. By leveraging techniques such as pattern matching, refactoring detection, and semantic code transformation analysis, our method aims to identify functionally irrelevant changes. Our approach explores 26 types of change noise and detects them effectively. To evaluate our change noise detection method, we selected 10 projects from certain public datasets [4]–[6] and expanded our research dataset by generating new commits through code transformations. The empirical results demonstrate that our method can effectively detect 66.34% of change noise. Additionally, we validated the effectiveness of detecting and removing change noise-related methods on optimizing regression test case selection in a project used for a web vulnerability testing range by a certain company. When applied to the regression test case selection for the project, this reduction in the number of methods associated with change noise indirectly decreases the number of test cases selection and generation, thereby improving regression testing efficiency.
Authors
- Pan Ya
- Xin Zheng (ORCID: https://orcid.org/0000-0002-9594-2329)
- Xu Luo
Institutions
- Southwest University of Science and Technology (CN)
- Sichuan Research Center of New Materials (CN)
Publication Details
- Published
- 2025-03-21
- DOI
- https://doi.org/10.1109/icnlp65360.2025.11108378
- Primary Topic
- Machine Learning and Data Classification
- Type
- article
- Field-Weighted Citation Impact
- 0.00