Publication
Title
A comparative study of test code clones and production code clones
Author
Abstract
Clones are one of the most widespread code smells, known to negatively affect the evolution of software systems. While there is a large body of research on detecting, managing, and refactoring clones in production code, clones in test code are often neglected in today's literature. In this paper we provide empirical evidence that further research on clones in test code is warranted. By analysing the clones in five representative open-source systems and comparing production code clones to test code clones, we observe that test code contains twice as many clones as production code. A detailed analysis reveals that most test clones are of Type II and Type III, and that many tests are duplicated multiple times with slight modifications. Moreover, current clone detection tools suffer from false negatives, and that this occurs more frequently in test code than in production code (NiCad = 76%, CPD = 90%, iClones = 12%). So even from a tools perspective, specific fine-tuning for test code is needed. (C) 2021 Elsevier Inc. All rights reserved.
Language
English
Source (journal)
Journal of systems and software. - New York
Publication
New York : 2021
ISSN
0164-1212
DOI
10.1016/J.JSS.2021.110940
Volume/pages
176 (2021) , 12 p.
Article Reference
110940
ISI
000636371400013
Medium
E-only publicatie
Full text (Publisher's DOI)
Full text (open access)
Full text (publisher's version - intranet only)
UAntwerpen
Faculty/Department
Research group
Publication type
Subject
Affiliation
Publications with a UAntwerp address
External links
Web of Science
Record
Identifier
Creation 05.05.2021
Last edited 02.10.2024
To cite this reference