基于语义的跨语言克隆相关Bug检测

Zeng Chen
{"title":"基于语义的跨语言克隆相关Bug检测","authors":"Zeng Chen","doi":"10.1109/AINIT54228.2021.00101","DOIUrl":null,"url":null,"abstract":"Code clones are widespread in software since programmers always reuse code to reduce programming effort. As programming languages are continuing to evolve and morph, code clones also widely exist across different languages for platform compatibility and adoption. Although code clones can improve development efficiency, they are prone to introducing bugs. Existing code clone detection technologies, however, mainly focused on single programming language or syntactical features of code. The syntax of different programming language are diverse because of syntax sugar, and many cloning pairs are semantic related instead of syntactic similar, such as Type 4 clones. To bridge the gap between syntax and semantic, and detect clone-related bugs more accurately, we explore an IR (Intermediate Representation) based method to represent code semantic representation information of multiple language code. We utilize graph neural network to learn code semantic representation. Through the semantic representation, we can detect more cross-language clone related bugs across multiple language.","PeriodicalId":326400,"journal":{"name":"2021 2nd International Seminar on Artificial Intelligence, Networking and Information Technology (AINIT)","volume":"20 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Semantic based Cross-Language Clone Related Bug Detection\",\"authors\":\"Zeng Chen\",\"doi\":\"10.1109/AINIT54228.2021.00101\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Code clones are widespread in software since programmers always reuse code to reduce programming effort. As programming languages are continuing to evolve and morph, code clones also widely exist across different languages for platform compatibility and adoption. Although code clones can improve development efficiency, they are prone to introducing bugs. Existing code clone detection technologies, however, mainly focused on single programming language or syntactical features of code. The syntax of different programming language are diverse because of syntax sugar, and many cloning pairs are semantic related instead of syntactic similar, such as Type 4 clones. To bridge the gap between syntax and semantic, and detect clone-related bugs more accurately, we explore an IR (Intermediate Representation) based method to represent code semantic representation information of multiple language code. We utilize graph neural network to learn code semantic representation. Through the semantic representation, we can detect more cross-language clone related bugs across multiple language.\",\"PeriodicalId\":326400,\"journal\":{\"name\":\"2021 2nd International Seminar on Artificial Intelligence, Networking and Information Technology (AINIT)\",\"volume\":\"20 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2021-10-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2021 2nd International Seminar on Artificial Intelligence, Networking and Information Technology (AINIT)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/AINIT54228.2021.00101\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 2nd International Seminar on Artificial Intelligence, Networking and Information Technology (AINIT)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/AINIT54228.2021.00101","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

代码克隆在软件中很普遍,因为程序员总是重用代码以减少编程工作。随着编程语言的不断发展和变化,为了平台兼容性和采用,代码克隆也广泛存在于不同的语言之间。尽管代码克隆可以提高开发效率,但它们容易引入错误。然而,现有的代码克隆检测技术主要集中在单个编程语言或代码的语法特征上。由于语法糖的原因,不同编程语言的语法是不同的,并且许多克隆对是语义相关的,而不是语法相似的,例如Type 4克隆。为了弥合语法和语义之间的鸿沟,更准确地检测克隆相关的错误,我们探索了一种基于IR (Intermediate Representation)的方法来表示多语言代码的代码语义表示信息。我们利用图神经网络学习代码的语义表示。通过语义表示,我们可以检测出更多跨语言克隆相关的bug。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Semantic based Cross-Language Clone Related Bug Detection
Code clones are widespread in software since programmers always reuse code to reduce programming effort. As programming languages are continuing to evolve and morph, code clones also widely exist across different languages for platform compatibility and adoption. Although code clones can improve development efficiency, they are prone to introducing bugs. Existing code clone detection technologies, however, mainly focused on single programming language or syntactical features of code. The syntax of different programming language are diverse because of syntax sugar, and many cloning pairs are semantic related instead of syntactic similar, such as Type 4 clones. To bridge the gap between syntax and semantic, and detect clone-related bugs more accurately, we explore an IR (Intermediate Representation) based method to represent code semantic representation information of multiple language code. We utilize graph neural network to learn code semantic representation. Through the semantic representation, we can detect more cross-language clone related bugs across multiple language.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信