TY - JOUR
T1 - Decomposing Composite Changes for Code Review and Regression Test Selection in Evolving Software
AU - Guo, Bo
AU - Kwon, Young Woo
AU - Song, Myoungkyu
N1 - Publisher Copyright:
© 2019, Springer Science+Business Media, LLC & Science Press, China.
PY - 2019/3/1
Y1 - 2019/3/1
N2 - Inspecting and testing code changes typically require a significant amount of developer effort. As a system evolves, developers often create composite changes by mixing multiple development issues, as opposed to addressing one independent issue — an atomic change. Inspecting composite changes often becomes time-consuming and error-prone. To test unrelated edits on composite changes, rerunning all regression tests may require excessive time. To address the problem, we present an interactive technique for change decomposition to support code reviews and regression test selection, called ChgCutter. When a developer specifies code change within a diff patch, ChgCutter partitions composite changes into a set of related atomic changes, which is more cohesive and self-contained regarding the issue being addressed. For composite change inspection, it generates an intermediate program version that only includes a related change subset using program dependence relationships. For cost reduction during regression testing, it safely selects only affected tests responsible for changes to an intermediate version. In the evaluation, we apply ChgCutter to 28 composite changes in four open source projects. ChgCutter partitions these changes with 95.7% accuracy, while selecting affected tests with 89.0% accuracy. We conduct a user study with professional software engineers at PayPal and find that ChgCutter is helpful in understanding and validating composite changes, scaling to industry projects.
AB - Inspecting and testing code changes typically require a significant amount of developer effort. As a system evolves, developers often create composite changes by mixing multiple development issues, as opposed to addressing one independent issue — an atomic change. Inspecting composite changes often becomes time-consuming and error-prone. To test unrelated edits on composite changes, rerunning all regression tests may require excessive time. To address the problem, we present an interactive technique for change decomposition to support code reviews and regression test selection, called ChgCutter. When a developer specifies code change within a diff patch, ChgCutter partitions composite changes into a set of related atomic changes, which is more cohesive and self-contained regarding the issue being addressed. For composite change inspection, it generates an intermediate program version that only includes a related change subset using program dependence relationships. For cost reduction during regression testing, it safely selects only affected tests responsible for changes to an intermediate version. In the evaluation, we apply ChgCutter to 28 composite changes in four open source projects. ChgCutter partitions these changes with 95.7% accuracy, while selecting affected tests with 89.0% accuracy. We conduct a user study with professional software engineers at PayPal and find that ChgCutter is helpful in understanding and validating composite changes, scaling to industry projects.
KW - code review
KW - program slicing
KW - software maintenance and evolution
KW - test selection
UR - http://www.scopus.com/inward/record.url?scp=85063625583&partnerID=8YFLogxK
U2 - 10.1007/s11390-019-1917-9
DO - 10.1007/s11390-019-1917-9
M3 - Article
AN - SCOPUS:85063625583
SN - 1000-9000
VL - 34
SP - 416
EP - 436
JO - Journal of Computer Science and Technology
JF - Journal of Computer Science and Technology
IS - 2
ER -