Code Cloning in Solidity Smart Contracts: Prevalence, Evolution, and Impact on Development
Ran Mo, Haopeng Song, Wei Ding, Chaochao Wu
Abstract
In recent years, the development of Solidity smart contracts has been increasing rapidly in popularity. Code cloning is a common coding practice, and many prior studies have revealed that code clones could negatively impact software maintenance and quality. However, there is little work systematically analyzing the nature and impacts of code clones in solidity smart contracts. To bridge this gap, we investigate the prevalence, evolution, and bug-proneness of code clones in solidity smart contracts, and further identify the possible reasons for these clones' occurrences. With our evaluation of 26,294 smart contracts with 97,877 functions, we have found that code clones are highly prevalent in smart contracts. Additionally, on average, 32.01% of clones co-evolve, indicating the need for careful management to avoid consistency issues. Surprisingly, unlike in traditional software development, code clones in smart contracts are rarely involved in bug fixes. Finally, we identify three main factors that affect the occurrences of clones. We believe our study can provide valuable insights for developers to understand and manage code clones in solidity smart contracts.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get fe12ea51-256b-4856-9bf8-c77848646b08Related papers
- Clone Detection for Smart Contracts: How Far Are We?Zuobin Wang, Zhiyuan Wan, Yujing Chen, Yun Zhang et al.FSE 2025 · 1 citation
- Understanding Solidity Event Logging Practices in the WildLantian Li, Yejian Liang, Zhihao Liu, Zhongxing YuFSE 2023 · 13 citations
- A Comprehensive Study on Code Clones in Automated Driving SoftwareRan Mo, Yingjie Jiang, Wenjing Zhan, Dongyu Wang et al.ASE 2023 · 4 citations
- Demystifying the Composition and Code Reuse in Solidity Smart ContractsKairan Sun, Zhengzi Xu, Chengwei Liu, Kaixuan Li et al.FSE 2023 · 25 citations
- Towards Understanding the Bugs in Solidity CompilerHaoyang Ma, Wuqi Zhang, Qingchao Shen, Yongqiang Tian et al.ISSTA 2024 · 9 citations
