{"title":"Semantic Code Clone Detection Via Event Embedding Tree and GAT Network","authors":"Bingzhuo Li, Chunyang Ye, Shouyang Guan, Hui Zhou","doi":"10.1109/QRS51102.2020.00057","DOIUrl":null,"url":null,"abstract":"Semantic code clone detection is an important yet challenging task in software engineering. Traditional methods rely on expert experience and cannot automatically determine which features are better for semantic code clone detection. Moreover, the program dynamics (e.g., the execution characteristics and execution order of statements) are not considered in these methods. As a result, this limits their ability to detect semantic clones. To address this issue, we propose a code clone detection method based on event embedding tree and Graph Attention Network. Our method uses a program control flow graph to capture the execution characteristics of each statement and extract the context relationship of different statements in the control flow. Based on such information, our method can calculate the functional similarity of two pieces of code, thereby identifying semantically similar code fragments. Experimental results show that our method is superior to state-of-the-art open source methods for Type-3 (syntactic) / Type-4 (semantic) clone detection.","PeriodicalId":301814,"journal":{"name":"2020 IEEE 20th International Conference on Software Quality, Reliability and Security (QRS)","volume":"80 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 IEEE 20th International Conference on Software Quality, Reliability and Security (QRS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/QRS51102.2020.00057","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5
Abstract
Semantic code clone detection is an important yet challenging task in software engineering. Traditional methods rely on expert experience and cannot automatically determine which features are better for semantic code clone detection. Moreover, the program dynamics (e.g., the execution characteristics and execution order of statements) are not considered in these methods. As a result, this limits their ability to detect semantic clones. To address this issue, we propose a code clone detection method based on event embedding tree and Graph Attention Network. Our method uses a program control flow graph to capture the execution characteristics of each statement and extract the context relationship of different statements in the control flow. Based on such information, our method can calculate the functional similarity of two pieces of code, thereby identifying semantically similar code fragments. Experimental results show that our method is superior to state-of-the-art open source methods for Type-3 (syntactic) / Type-4 (semantic) clone detection.