Research on a Neural Machine Translation-Based Approach for Production-Test Code Co-evolution

During the evolution of software, test cases should evolve alongside the production code. Detecting and updating outdated test cases in a timely manner helps lower maintenance costs and prevent potential defects. However, existing methods face limitations in co-evolution pattern mining and automated test code debugging, with rule construction being complex and lacking end-to-end production-test code co-evolution. This study proposes a Neural Machine Translation-based Co-evolution method, NPTCC (Neural Production-Test Code Co-evolution), which analyzes historical commits of production and test code to extract test case features. A neural network classifier and a Transformer updater model are trained separately to identify and update outdated tests, with updated test cases generated through beam search followed by abstraction recovery and syntax checking. Experimental results show that NPTCC significantly improves accuracy in identification and updating tasks compared to traditional methods, with generated test cases performing well in dynamic and manual evaluations. Furthermore, an NPTCC-supported co-evolution system has been developed, enabling developers to automatically identify and update outdated tests, effectively reducing maintenance costs and improving code quality.

Authors

Institutions

Publication Details

Published
2024-11-22
DOI
https://doi.org/10.1109/icdsca63855.2024.10860129
Primary Topic
Industrial Technology and Control Systems
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Research on a Neural Machine Translation-Based Approach for Production-Test Code Co-evolution

Xuesong Wang, Ke Wang, Zhang Ren, Lu Li
Industrial Technology and Control Systems
article

Research on a Neural Machine Translation-Based Approach for Production-Test Code Co-evolution

Xuesong Wang, Ke Wang, Zhang Ren, Lu Li
article en

Abstract

During the evolution of software, test cases should evolve alongside the production code. Detecting and updating outdated test cases in a timely manner helps lower maintenance costs and prevent potential defects. However, existing methods face limitations in co-evolution pattern mining and automated test code debugging, with rule construction being complex and lacking end-to-end production-test code co-evolution. This study proposes a Neural Machine Translation-based Co-evolution method, NPTCC (Neural Production-Test Code Co-evolution), which analyzes historical commits of production and test code to extract test case features. A neural network classifier and a Transformer updater model are trained separately to identify and update outdated tests, with updated test cases generated through beam search followed by abstraction recovery and syntax checking. Experimental results show that NPTCC significantly improves accuracy in identification and updating tasks compared to traditional methods, with generated test cases performing well in dynamic and manual evaluations. Furthermore, an NPTCC-supported co-evolution system has been developed, enabling developers to automatically identify and update outdated tests, effectively reducing maintenance costs and improving code quality.

Xidian University (CN)
Openalex Percentile: Top 67%
Industrial Technology and Control Systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Research on a Neural Machine Translation-Based Approach for Production-Test Code Co-evolution — Xuesong Wang, Ke Wang, et al. · (2024) | TGRS Research Map | TGRS