{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,1,29]],"date-time":"2026-01-29T23:23:21Z","timestamp":1769729001033,"version":"3.49.0"},"reference-count":47,"publisher":"Association for Computing Machinery (ACM)","issue":"FSE","funder":[{"DOI":"10.13039\/501100001809","name":"National Science Foundation of China","doi-asserted-by":"crossref","award":["No. 62472383 and No. 62102358"],"award-info":[{"award-number":["No. 62472383 and No. 62102358"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"crossref"}]},{"DOI":"10.13039\/501100012226","name":"Fundamental Research Funds for the Central Universities","doi-asserted-by":"crossref","award":["No. 226-2022-00064"],"award-info":[{"award-number":["No. 226-2022-00064"]}],"id":[{"id":"10.13039\/501100012226","id-type":"DOI","asserted-by":"crossref"}]},{"name":"Natural Science Foundation of Zhejiang Province","award":["No. LQ21F020008"],"award-info":[{"award-number":["No. LQ21F020008"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Softw. Eng."],"published-print":{"date-parts":[[2025,6,19]]},"abstract":"<jats:p>In smart contract development, practitioners frequently reuse code to reduce development effort and avoid reinventing the wheel. This reused code, whether identical or similar to its original source, is referred to as a code clone. Unintentional code cloning can propagate flaws and vulnerabilities, potentially undermining the reliability and maintainability of software systems. Previous studies have identified a significant prevalence of code clones in Solidity smart contracts on the Ethereum blockchain. To mitigate the risks posed by code clones, clone detection has emerged as an active field of research and practice in software engineering. Recent studies have extended existing techniques or proposed novel techniques tailored to the unique syntactic and semantic features of Solidity. Nonetheless, the evaluations of existing techniques, whether conducted by their original authors or independent researchers, involve codebases in various programming languages and utilize different versions of the corresponding tools. The resulting inconsistency makes direct comparisons of the evaluation results impractical, and hinders the ability to derive meaningful conclusions across the evaluations. There remains a lack of clarity regarding the effectiveness of these techniques in detecting smart contract clones, and whether it is feasible to combine different techniques to achieve scalable yet accurate detection of code clones in smart contracts. To address this gap, we conduct a comprehensive empirical study that evaluates the effectiveness and scalability of five representative clone detection techniques on 33,073 verified Solidity smart contracts, along with a benchmark we curate, in which we manually label 72,010 pairs of Solidity smart contracts with clone tags. Moreover, we explore the potential of combining different techniques to achieve optimal performance of code clone detection for smart contracts, and propose SourceREClone, a framework designed for the refined integration of different techniques, which achieves a 36.9% improvement in F1 score compared to a straightforward combination of the state of the art. Based on our findings, we discuss implications, provide recommendations for practitioners, and outline directions for future research.<\/jats:p>","DOI":"10.1145\/3715776","type":"journal-article","created":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T15:15:34Z","timestamp":1750346134000},"page":"1249-1269","source":"Crossref","is-referenced-by-count":1,"title":["Clone Detection for Smart Contracts: How Far Are We?"],"prefix":"10.1145","volume":"2","author":[{"ORCID":"https:\/\/orcid.org\/0009-0006-8800-1922","authenticated-orcid":false,"given":"Zuobin","family":"Wang","sequence":"first","affiliation":[{"name":"Zhejiang University, Hangzhou, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7657-6653","authenticated-orcid":false,"given":"Zhiyuan","family":"Wan","sequence":"additional","affiliation":[{"name":"Zhejiang University, Hangzhou, China"},{"name":"Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security., Hangzhou, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0005-9690-9183","authenticated-orcid":false,"given":"Yujing","family":"Chen","sequence":"additional","affiliation":[{"name":"Zhejiang University, Hangzhou, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3394-285X","authenticated-orcid":false,"given":"Yun","family":"Zhang","sequence":"additional","affiliation":[{"name":"Hangzhou City University, Hangzhou, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4367-7201","authenticated-orcid":false,"given":"David","family":"Lo","sequence":"additional","affiliation":[{"name":"Singapore Management University, Singapore, Singapore"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0005-5777-1679","authenticated-orcid":false,"given":"Difan","family":"Xie","sequence":"additional","affiliation":[{"name":"Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security, Hangzhou, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4111-4189","authenticated-orcid":false,"given":"Xiaohu","family":"Yang","sequence":"additional","affiliation":[{"name":"Zhejiang University, Hangzhou, China"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2025,6,19]]},"reference":[{"key":"e_1_2_1_1_1","unstructured":"2024. Contracts - Solidity v0.8.27 Documentation. [Online]. https:\/\/docs.soliditylang.org\/en\/v0.8.27\/contracts.html"},{"key":"e_1_2_1_2_1","unstructured":"2024. Solidity the Smart Contract Programming Language. [Online]. https:\/\/github.com\/ethereum\/solidity"},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","unstructured":"Maher Alharby and Aad Van Moorsel. 2017. Blockchain-based smart contracts: A systematic mapping study. arXiv preprint arXiv:1710.06372 https:\/\/doi.org\/10.48550\/arXiv.1710.06372 10.48550\/arXiv.1710.06372","DOI":"10.48550\/arXiv.1710.06372"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.2466\/pr0.1966.19.1.3"},{"key":"e_1_2_1_5_1","volume-title":"Explained: The Multichain Hack. https:\/\/halborn.com\/explained-the-multichain-hack-january-2022\/ Accessed: 2024-07-22","author":"Behnke Rob","year":"2022","unstructured":"Rob Behnke. 2022. Explained: The Multichain Hack. https:\/\/halborn.com\/explained-the-multichain-hack-january-2022\/ Accessed: 2024-07-22"},{"key":"e_1_2_1_6_1","unstructured":"Binance. 2024. BNB Smart Chain. https:\/\/docs.bnbchain.org\/bnb-smart-chain\/ Accessed: 2024-07-22"},{"key":"e_1_2_1_7_1","unstructured":"Mihailo Bjelic Sandeep Nailwal Amit Chaudhary and Wenxuan Deng. 2024. POL: one token for all polygon chains. https:\/\/polygon.technology\/papers\/pol-whitepaper Accessed: 2024-07-22"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1109\/EuroSP48549.2020.00012"},{"key":"e_1_2_1_9_1","volume-title":"Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform. https:\/\/ethereum.org\/en\/whitepaper\/ Accessed: 2024-07-22","author":"Buterin Vitalik","year":"2014","unstructured":"Vitalik Buterin. 2014. Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform. https:\/\/ethereum.org\/en\/whitepaper\/ Accessed: 2024-07-22"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/3319535.3345664"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1109\/SANER50967.2021.00050"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1177\/001316446002000104"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2006.04.002"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2011.26"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4842-2535-6"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-024-10485-1"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2019.8668015"},{"key":"e_1_2_1_18_1","volume-title":"Refactoring: Improving the Design of Existing Code","author":"Fowler Martin","year":"2018","unstructured":"Martin Fowler. 2018. Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional."},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2020.2971482"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1109\/ASE56229.2023.00142"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-51280-4_35"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1109\/ACCESS.2020.2988400"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.ins.2023.01.126"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2007.30"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-008-9076-6"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2015.7081830"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2022.3207428"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-020-09852-5"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jcm.2016.02.012"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2019.00024"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3236024.3264596"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1109\/RE.2014.6912250"},{"key":"e_1_2_1_33_1","unstructured":"Multichain. 2024. Multichain Smart Contracts. https:\/\/github.com\/anyswap\/multichain-smart-contracts Accessed: 2024-07-22"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1109\/SANER50967.2021.00089"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-017-9564-7"},{"key":"e_1_2_1_36_1","volume-title":"A survey on software clone detection research. Queen\u2019s School of Computing TR, 541, 115","author":"Roy Chanchal Kumar","year":"2007","unstructured":"Chanchal Kumar Roy and James R Cordy. 2007. A survey on software clone detection research. Queen\u2019s School of Computing TR, 541, 115 (2007), 64\u201368."},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/2884781.2884877"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/3611643.3616270"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSME.2014.77"},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2019.2912962"},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2015.2448531"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2019.2921343"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE43902.2021.00127"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.1145\/3643916.3644406"},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/3180155.3180179"},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00039"},{"key":"e_1_2_1_47_1","volume-title":"Ethereum: A secure decentralised generalised transaction ledger. Ethereum project yellow paper, 151","author":"Wood Gavin","year":"2014","unstructured":"Gavin Wood. 2014. Ethereum: A secure decentralised generalised transaction ledger. Ethereum project yellow paper, 151, 2014 (2014), 1\u201332."}],"container-title":["Proceedings of the ACM on Software Engineering"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3715776","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T15:18:25Z","timestamp":1750346305000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3715776"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,6,19]]},"references-count":47,"journal-issue":{"issue":"FSE","published-print":{"date-parts":[[2025,6,19]]}},"alternative-id":["10.1145\/3715776"],"URL":"https:\/\/doi.org\/10.1145\/3715776","relation":{},"ISSN":["2994-970X"],"issn-type":[{"value":"2994-970X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,6,19]]}}}