Tritor: Detecting Semantic Code Clones by Building Social Network-Based Triads Model

被引:1
作者
Zou, Deqing [1 ,2 ]
Feng, Siyue [1 ,2 ]
Wu, Yueming [3 ]
Suo, Wenqi [1 ,2 ]
Jin, Hai [1 ,4 ]
机构
[1] Huazhong Univ Sci & Technol, Hubei Key Lab Distributed Syst Secur, Cluster & Grid Comp Lab,Hubei Engn Res Ctr Big Da, Natl Engn Res Ctr Big Data Technol & Syst Serv Co, Wuhan, Peoples R China
[2] Huazhong Univ Sci & Technol, Sch Cyber Sci & Engn, Wuhan 430074, Peoples R China
[3] Nanyang Technol Univ, Singapore, Singapore
[4] Huazhong Univ Sci & Technol, Sch Comp Sci & Technol, Wuhan 430074, Peoples R China
来源
PROCEEDINGS OF THE 31ST ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2023 | 2023年
基金
美国国家科学基金会;
关键词
Semantic Clones; Abstract Syntax Tree; Social Network; Triads;
D O I
10.1145/3611643.3616354
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Code clone detection refers to finding the functional similarities between two code fragments, which is becoming increasingly important with the evolution of software engineering. Numbers of code clone detection methods have been proposed, including tree-based methods that are capable of detecting semantic code clones. However, since tree structure is complex, these methods are difficult to apply to large-scale clone detection. In this paper, we propose a scalable semantic code clone detector based on semantically enhanced abstract syntax tree. Specifically, we add the control flow and data flow details into the original tree and regard the enhanced tree as a social network. Thenwe build a social network-based triads model to collect the similarity features between the two methods by analyzing different types of triads within the network. After obtaining all features, we use them to train a machine learning-based code clone detector (i.e., Tritor). Our comparative experimental results show that Tritor is superior to SourcererCC, RtvNN, Deckard, ASTNN, TBCNN, CDLH, and SCDetector, are equally good with DeepSim and FCCA. As for scalability, Tritor is about 39 times faster than another current state-of-the-art tree-based code clone detector ASTNN.
引用
收藏
页码:771 / 783
页数:13
相关论文
共 50 条
  • [1] Detecting Semantic Code Clones by Building AST-based Markov Chains Model
    Wu, Yueming
    Feng, Siyue
    Zou, Deqing
    Jin, Hai
    PROCEEDINGS OF THE 37TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, ASE 2022, 2022,
  • [2] Social network-based Semantic web services discovery
    Ning, Huicong
    Shao, Xiuli
    International Journal of Digital Content Technology and its Applications, 2012, 6 (05) : 150 - 159
  • [3] Building the Semantic Similarity Model for Social Network Data Streams
    Petrasova, Svitlana
    Khairova, Nina
    Lewoniewski, Wlodzimierz
    2018 IEEE SECOND INTERNATIONAL CONFERENCE ON DATA STREAM MINING & PROCESSING (DSMP), 2018, : 21 - 24
  • [4] Network-based diffusion analysis: a new method for detecting social learning
    Franz, Mathias
    Nunn, Charles L.
    PROCEEDINGS OF THE ROYAL SOCIETY B-BIOLOGICAL SCIENCES, 2009, 276 (1663) : 1829 - 1836
  • [5] A Social Network-Based Trust Model for E-Commerce
    Zhai Dongsheng
    Pan Hong
    2008 4TH INTERNATIONAL CONFERENCE ON WIRELESS COMMUNICATIONS, NETWORKING AND MOBILE COMPUTING, VOLS 1-31, 2008, : 9181 - 9185
  • [6] Detecting malicious Java']JavaScript code based on semantic analysis
    Fang, Yong
    Huang, Cheng
    Su, Yu
    Qiu, Yaoyao
    COMPUTERS & SECURITY, 2020, 93
  • [7] A SOCIAL NETWORK-BASED INFERENCE MODEL FOR VALIDATING CUSTOMER PROFILE DATA
    Park, Sung-Hyuk
    Huh, Soon-Young
    Oh, Wonseok
    Han, Sang Pil
    MIS QUARTERLY, 2012, 36 (04) : 1217 - 1237
  • [8] An Automatically Filtering Blacklist Model of Social Network Based on Semantic Web
    Le Ha
    Guo-Zi Sun
    Journal of Harbin Institute of Technology(New series), 2014, (06) : 67 - 73
  • [9] Building Artificial Identities in Social Network Using Semantic Information
    Chen, Kai
    Zhou, Yi
    Song, Li
    Yang, Xiaokang
    2011 INTERNATIONAL CONFERENCE ON ADVANCES IN SOCIAL NETWORKS ANALYSIS AND MINING (ASONAM 2011), 2011, : 565 - 566
  • [10] Social network-based discriminatory pricing strategy
    Shi, MZ
    MARKETING LETTERS, 2003, 14 (04) : 239 - 256