Exploring the Impact of Code Clones on Deep Learning Software

Ran Mo,Yao Zhang,Yushuo Wang,Siyuan Zhang,Pu Xiong,Zengyang Li,Yang Zhao
DOI: https://doi.org/10.1145/3607181
IF: 3.685
2023-07-03
ACM Transactions on Software Engineering and Methodology
Abstract:Deep learning (DL) is a really active topic in recent years. Code cloning is a common code implementation that could negatively impact software maintenance. For DL software, developers rely heavily on frameworks to implement DL features. Meanwhile, to guarantee efficiency, developers often reuse the steps and configuration settings for building DL models. These may bring code copy-pastes or reuses inducing code clones. However, there is little work exploring code clones’ impact on DL software. In this paper, we conduct an empirical study and show that: 1) code clones are prevalent in DL projects, about 16.3% of code fragments encounter clones, which is almost twice larger than the traditional projects; 2) 75.6% of DL projects contain co-changed clones, meaning changes are propagated among cloned fragments, which can bring maintenance difficulties; 3) Percentage of the clones and Number of clone lines are associated with the emergence of co-changes; 4) The prevalence of Code clones varies in DL projects with different frameworks, but the difference is not significant; 5) Type 1 co-changed clones often spread over different folders, but Type 2 and 3 co-changed clones mainly occur within the same files or folders; 6) 57.1% of all co-changed clones are involved in bugs.
computer science, software engineering
What problem does this paper attempt to address?