Machine Learning is All You Need: A Simple Token-based Approach for Effective Code Clone Detection

计算机科学 克隆(Java方法) 安全性令牌 编码(集合论) 源代码 可扩展性 人工智能 机器学习 程序设计语言 操作系统 遗传学 生物 集合(抽象数据类型) DNA
作者
Siyue Feng,Wenqi Suo,Yueming Wu,Deqing Zou,Yang Liu,Hai Jin
标识
DOI:10.1145/3597503.3639114
摘要

As software engineering advances and the code demand rises, the prevalence of code clones has increased. This phenomenon poses risks like vulnerability propagation, underscoring the growing importance of code clone detection techniques. While numerous code clone detection methods have been proposed, they often fall short in real-world code environments. They either struggle to identify code clones effectively or demand substantial time and computational resources to handle complex clones. This paper introduces a code clone detection method namely Toma using tokens and machine learning. Specifically, we extract token type sequences and employ six similarity calculation methods to generate feature vectors. These vectors are then input into a trained machine learning model for classification. To evaluate the effectiveness and scalability of Toma, we conduct experiments on the widely used BigCloneBench dataset. Results show that our tool outperforms token-based code clone detectors and most tree-based clone detectors, demonstrating high effectiveness and significant time savings.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
YYy发布了新的文献求助10
刚刚
ZHANGMANLI0422完成签到,获得积分10
刚刚
刚刚
小二郎应助馒头采纳,获得10
1秒前
生动焦完成签到 ,获得积分10
1秒前
1秒前
1秒前
整齐凡白发布了新的文献求助10
1秒前
科目三应助赵浩楠采纳,获得10
2秒前
好吧就是你完成签到,获得积分10
3秒前
3秒前
机智的宝儿姐完成签到,获得积分10
3秒前
wawa完成签到,获得积分10
4秒前
思源应助Kristin采纳,获得10
4秒前
冬冬不是发布了新的文献求助10
4秒前
Maggie发布了新的文献求助10
4秒前
5秒前
5秒前
5秒前
张绪基发布了新的文献求助10
5秒前
5秒前
明理天蓉应助ddd采纳,获得10
6秒前
6秒前
7秒前
齐媛媛发布了新的文献求助10
7秒前
脑洞疼应助paxjustitia采纳,获得10
7秒前
8秒前
8秒前
共享精神应助Cc采纳,获得10
9秒前
9秒前
10秒前
核桃发布了新的文献求助10
10秒前
芒果鸭鸭发布了新的文献求助10
10秒前
一杯芝士应助wh采纳,获得20
11秒前
Sakanasaigao完成签到,获得积分10
11秒前
11秒前
12秒前
yr01完成签到,获得积分10
12秒前
13秒前
22336应助火丙子采纳,获得20
13秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Organic Reactions, Volume 116 1500
VALIDATION OF THE TAYLOR, ALAMEL AND VPSC MODELS FOR PLASTIC ANISOTROPY MODELING OF SHEET METALS 1000
Geist der Kunst und Kultur 1000
Resistance Spot Welding Dataset for Automobile Body-in-White Quality Analysis 748
悉尼大学博士学位论文,题目:Modelling and testing of one-sided stitched laminated composites. 作者:Kristopher P. Plain 700
Machine Learning for Asset Management and Pricing 600
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 内科学 物理 复合材料 催化作用 细胞生物学 无机化学 光电子学 物理化学 电极 基因
热门帖子
关注 科研通微信公众号,转发送积分 7405022
求助须知:如何正确求助?哪些是违规求助? 9009752
关于积分的说明 19186920
捐赠科研通 7038524
什么是DOI,文献DOI怎么找? 3231997
关于科研通互助平台的介绍 2394167
邀请新用户注册赠送积分活动 2214023