清晨好,您是今天最早来到科研通的研友!由于当前在线用户较少,发布求助请尽量完整地填写文献信息,科研通机器人24小时在线,伴您科研之路漫漫前行!

Semantic Code Clone Detection Based on Community Detection

计算机科学 编码(集合论) 克隆(Java方法) 人工智能 自然语言处理 情报检索 程序设计语言 万维网 数据挖掘 生物 基因 生物化学 集合(抽象数据类型)
作者
Zexuan Wan,Chunli Xie,Quanrun Lv,Y.-H. Fan
出处
期刊:International Journal of Software Engineering and Knowledge Engineering [World Scientific]
卷期号:: 1-32
标识
DOI:10.1142/s0218194024500323
摘要

Semantic code clone detection is to find code snippets that are structurally or syntactically different, but semantically identical. It plays an important role in software reuse, code compression. Many existing studies have achieved good performance in non-semantic clone, but semantic clone is still a challenging task. Recently, several works have used tree or graph, such as Abstract Syntax Tree (AST), Control Flow Graph (CFG) or Program Dependency Graph (PDG) to extract semantic information from source codes. In order to reduce the complexity of tree and graph, some studies transform them into node sequences. However, this transformation will lose some semantic information. To address this issue, we propose a novel high-performance method that utilizes community detection to extract features of AST while preserving its semantic information. First, based on the AST of source code, we exploit community detection to split AST into different subtrees to extract the underlying semantics information of different code blocks, and use centrality analysis to quantify the semantic information as the weight of AST nodes. Then, the AST is converted into a sequence of tokens with weights, and a Siamese neural network model is used to detect the similarity of token sequences for semantic code clone detection. Finally, to evaluate our approach, we conduct experiments on two standard benchmark datasets, Google Code Jam (GCJ) and BigCloneBench (BCB). Experimental results show that our model outperforms the eight publicly available state-of-the-art methods in detecting code clones. It is five times faster than the tree-based method (ASTNN) in terms of time complexity.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
3秒前
情怀应助androabo采纳,获得30
5秒前
清脆世界完成签到 ,获得积分10
13秒前
淮安石河子完成签到 ,获得积分10
20秒前
26秒前
35秒前
缓慢的甜瓜完成签到,获得积分10
39秒前
林韵悠扬完成签到 ,获得积分10
40秒前
androabo发布了新的文献求助10
51秒前
czj完成签到 ,获得积分10
52秒前
Dellamoffy完成签到,获得积分10
1分钟前
怡然千琴完成签到 ,获得积分10
1分钟前
六一儿童节完成签到 ,获得积分0
1分钟前
SciGPT应助孙建飞采纳,获得10
1分钟前
爱的魔力转圈圈完成签到,获得积分10
1分钟前
屋顶橙子味完成签到 ,获得积分10
1分钟前
勤qin完成签到 ,获得积分10
1分钟前
乐正怡完成签到 ,获得积分0
1分钟前
yyd完成签到,获得积分10
1分钟前
忆_完成签到 ,获得积分10
1分钟前
sci_zt完成签到 ,获得积分10
1分钟前
一抹阳光完成签到 ,获得积分10
1分钟前
1分钟前
孙建飞完成签到,获得积分10
1分钟前
耕牛热发布了新的文献求助50
1分钟前
孙建飞发布了新的文献求助10
1分钟前
小呀嘛小郎中完成签到 ,获得积分10
1分钟前
hehe0086完成签到,获得积分10
2分钟前
给我烤咸鱼完成签到,获得积分10
2分钟前
fattyorange完成签到,获得积分10
2分钟前
爱上学的小金完成签到 ,获得积分10
2分钟前
lx完成签到,获得积分10
2分钟前
小情绪完成签到,获得积分10
2分钟前
巴拉巴拉完成签到 ,获得积分10
2分钟前
zyw完成签到 ,获得积分10
2分钟前
uu完成签到 ,获得积分10
3分钟前
alabik完成签到,获得积分10
3分钟前
Leo完成签到 ,获得积分10
3分钟前
紧张的钥匙完成签到 ,获得积分10
3分钟前
MSR完成签到 ,获得积分10
3分钟前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Introduction to Helicopter and Tiltrotor Flight Simulation, Second Edition 2500
卤化钙钛矿人工突触的研究 2000
Моделирование процессов самоорганизации в кристаллообразующих системах 1000
History of U.S. Space Surveillance and Satellite Cataloging 1000
Malcolm Fraser : a biography 700
Signals, Systems, and Signal Processing 610
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 物理 内科学 复合材料 催化作用 物理化学 光电子学 电极 细胞生物学 基因 无机化学
热门帖子
关注 科研通微信公众号,转发送积分 6508347
求助须知:如何正确求助?哪些是违规求助? 8301333
关于积分的说明 17721572
捐赠科研通 5609054
什么是DOI,文献DOI怎么找? 2921725
邀请新用户注册赠送积分活动 1898936
关于科研通互助平台的介绍 1761529