基于深度学习的代码克隆检测方法

Guangjie Li, Yi Tang, Xiang Zhang, Biyi Yi
{"title":"基于深度学习的代码克隆检测方法","authors":"Guangjie Li, Yi Tang, Xiang Zhang, Biyi Yi","doi":"10.1109/ICHCI51889.2020.00078","DOIUrl":null,"url":null,"abstract":"Code clone is a kind of code smells widely exists in practice. Such code smell may lead to serious problems, e.g., code redundancy and code inconsistency. To reduce the negative impact of code clones, researchers have proposed different approaches to detect and remove code clones. However, existing code clone detection approaches mostly rely on manually designed and fine-tuned heuristic rules. Such approaches cannot be exploited in different projects and the precision of them needs to improve further. To this end, this paper proposes a deep learning based approach to detect code clones by statically extracting syntactic features from the ASTs of source files. Evaluation results suggest that the proposed approach is effective in detecting code clones, its precision is around 90%.","PeriodicalId":355427,"journal":{"name":"2020 International Conference on Intelligent Computing and Human-Computer Interaction (ICHCI)","volume":"23 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"A Deep Learning Based Approach to Detect Code Clones\",\"authors\":\"Guangjie Li, Yi Tang, Xiang Zhang, Biyi Yi\",\"doi\":\"10.1109/ICHCI51889.2020.00078\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Code clone is a kind of code smells widely exists in practice. Such code smell may lead to serious problems, e.g., code redundancy and code inconsistency. To reduce the negative impact of code clones, researchers have proposed different approaches to detect and remove code clones. However, existing code clone detection approaches mostly rely on manually designed and fine-tuned heuristic rules. Such approaches cannot be exploited in different projects and the precision of them needs to improve further. To this end, this paper proposes a deep learning based approach to detect code clones by statically extracting syntactic features from the ASTs of source files. Evaluation results suggest that the proposed approach is effective in detecting code clones, its precision is around 90%.\",\"PeriodicalId\":355427,\"journal\":{\"name\":\"2020 International Conference on Intelligent Computing and Human-Computer Interaction (ICHCI)\",\"volume\":\"23 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-12-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2020 International Conference on Intelligent Computing and Human-Computer Interaction (ICHCI)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICHCI51889.2020.00078\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 International Conference on Intelligent Computing and Human-Computer Interaction (ICHCI)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICHCI51889.2020.00078","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

摘要

代码克隆是在实践中广泛存在的一种代码异味。这样的代码气味可能导致严重的问题,例如,代码冗余和代码不一致。为了减少代码克隆的负面影响,研究人员提出了不同的方法来检测和删除代码克隆。然而,现有的代码克隆检测方法大多依赖于人工设计和微调的启发式规则。这些方法不能在不同的项目中使用,它们的精度需要进一步提高。为此,本文提出了一种基于深度学习的方法,通过静态地从源文件的ast中提取语法特征来检测代码克隆。评价结果表明,该方法能够有效地检测出代码克隆,准确率在90%左右。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
A Deep Learning Based Approach to Detect Code Clones
Code clone is a kind of code smells widely exists in practice. Such code smell may lead to serious problems, e.g., code redundancy and code inconsistency. To reduce the negative impact of code clones, researchers have proposed different approaches to detect and remove code clones. However, existing code clone detection approaches mostly rely on manually designed and fine-tuned heuristic rules. Such approaches cannot be exploited in different projects and the precision of them needs to improve further. To this end, this paper proposes a deep learning based approach to detect code clones by statically extracting syntactic features from the ASTs of source files. Evaluation results suggest that the proposed approach is effective in detecting code clones, its precision is around 90%.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信