Wed 6 Dec 2023 15:00 - 15:15 at Golden Gate A - Clone and Similarity Detection Chair(s): Denys Poshyvanyk

Smart contracts are a special form of program that use blockchain technology to automate, verify, and enforce agreements between parties. As the development of Solidity smart contracts has increased in popularity, the reliance on third-party packages increases to reduce development costs. However, the diverse and flexible approaches to introducing external subcontracts (i.e., contract-level code blocks) make it difficult to assure the security of downstream applications. Hence, it is crucial to properly manage external subcontracts in the development of smart contracts to ensure the security of Web3 applications. While previous studies have only focused on a single part of smart contracts such as subcontracts or functions during analysis, the common compositions of a smart contract and their characteristics still remain mysterious.

To fill these gaps, we first decomposed smart contracts into various subcontracts and discussed the common approaches to introduce subcontracts and their origins in smart contract development. We then conducted code reuse analysis for various subcontracts separately to better understand the compositions of smart contracts. Through the study, we identified that over 80% of the subcontracts in smart contracts are from external sources while the largest identified external source is NPM, accounting for over 72% of the total external subcontracts. For self-developed subcontracts, around 50% of the subcontracts have less than 10% unique functions, suggesting that code reuse at the level of functions is also common. For external subcontracts, though around 35% of the subcontracts are interfaces to provide templates for standards or protocols, an inconsistency in the use of subcontract types is also identified. Lastly, we extracted and accessed 10 frequently reused development patterns.

Wed 6 Dec

Displayed time zone: Pacific Time (US & Canada) change

14:00 - 15:30
Clone and Similarity DetectionResearch Papers / Industry Papers at Golden Gate A
Chair(s): Denys Poshyvanyk William & Mary
14:00
15m
Talk
AdaptivePaste: Intelligent Copy-Paste in IDE
Industry Papers
Xiaoyu Liu Microsoft Corporation, Jinu Jang Microsoft, Neel Sundaresan Microsoft, Miltiadis Allamanis Google DeepMind, Alexey Svyatkovskiy Microsoft
DOI Media Attached
14:15
15m
Talk
Scalable Program Clone Search Through Spectral Analysis
Research Papers
Tristan Benoit Université de Lorraine, CNRS, LORIA, Jean-Yves Marion LORIA, Université de Lorraine, Sébastien Bardin CEA, Université Paris Saclay
DOI Pre-print Media Attached
14:30
15m
Talk
[Remote] Tritor: Detecting Semantic Code Clones by Building Social Network-based Triads Model
Research Papers
Deqing Zou Huazhong University of Science and Technology, Siyue Feng Huazhong University of Science and Technology, Yueming Wu Nanyang Technological University, Wenqi Suo Huazhong University of Science and Technology, Hai Jin Huazhong University of Science and Technology
Media Attached
14:45
15m
Talk
[Remote] C³: Code Clone-Based Identification of Duplicated Components
Industry Papers
Yanming Yang Zhejiang University, Ying Zou Queen's University, Kingston, Ontario, Xing Hu Zhejiang University, David Lo School of Computing and Information Systems, Singapore Management University, Chao Ni School of Software Technology, Zhejiang University, John Grundy Monash University, Xin Xia Huawei Technologies
DOI Media Attached
15:00
15m
Talk
[Remote] Demystifying the Composition and Code Reuse in Solidity Smart Contracts
Research Papers
Kairan Sun Nanyang Technological University, Zhengzi Xu Nanyang Technological University, Chengwei Liu Nanyang Technological University, Kaixuan Li East China Normal University, Yang Liu Nanyang Technological University
Pre-print Media Attached
15:15
15m
Talk
[Remote] Gitor: Scalable Code Clone Detection by Building Global Sample Graph
Research Papers
Junjie shan Westlake University, Shihan Dou Fudan University, Yueming Wu Nanyang Technological University, Hairu wu Fudan University, Yang Liu Nanyang Technological University
Media Attached