SmartEmbed: A tool for clone and bug detection in Smart Contracts through structural code embeddings
In this paper, we propose a web service tool, named SMARTEMBED, which can help Solidity developers to find repetitive contract code and clone-related bugs in smart contracts. Our tool is based on code embeddings and similarity checking techniques. When applied to more than 22K solidity contracts collected from the Ethereum blockchain, we found that the clone ratio of solidity code is close to 90%, much higher than traditional software, and more than 1,000 clone-related bugs can be identified efficiently and accurately based on our small bug database.
Tutorial Video: https://youtu.be/o9ylyOpYFq8
- Z. Gao, L. Jiang, X. Xia, D. Lo and J. Grundy, "Checking Smart Contracts With Structural Code Embedding," in IEEE Transactions on Software Engineering, vol. 47, no. 12, pp. 2874-2891, 1 Dec. 2021, doi: 10.1109/TSE.2020.2971482.
- Z. Gao, V. Jayasundara, L. Jiang, X. Xia, D. Lo and J. Grundy, "SmartEmbed: A Tool for Clone and Bug Detection in Smart Contracts through Structural Code Embedding," 2019 IEEE International Conference on Software Maintenance and Evolution (ICSME), 2019, pp. 394-397, doi: 10.1109/ICSME.2019.00067.
- Zhipeng Gao, PhD Candidate
- Prof. Lingxiao Jiang (Singapore Management University)
- Prof. David Lo (Singapore Management University)
- Prof. John Grundy