Machine Learning Approaches to Code Similarity Measurement: A Systematic Review
Open Access
- 21 March 2025
- journal article
- review article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 13, 51729-51764
Abstract
Source code similarity measurement, which involves assessing the degree of difference between code segments, plays a crucial role in various aspects of the software development cycle. These include but are not limited to code quality assurance, code review processes, code plagiarism detection, security, and vulnerability analysis. Despite the increasing application of ML technique in this domain, a comprehensive synthesis of existing methodologies remains lacking. This paper presents a systematic review of Machine Learning techniques applied to code similarity measurement, aiming to illuminate current methodologies and contribute valuable insights to the research community. Following a rigorous systematic review protocol, we identified and analyzed 84 primary studies on a broad spectrum of dimensions covering application type, devised Machine Learning algorithms, used code representations, datasets, and performance metrics, as well as performance evaluations. A deep investigation reveals that 15 applications for code similarity measurement have utilized 51 different machine learning algorithms. Additionally, the most prevalent code representation is found to be the abstract syntax tree (AST). Furthermore, the most frequently employed dataset across various code similarity research applications is BigCloneBench. Through this comprehensive analysis, the paper not only synthesizes existing research but also identifies prevailing limitations and challenges, shedding light on potential avenues for future work.Keywords
Funding Information
- Science Foundation Ireland (18/CRT/6223)
- Lero SFI Centre for Software (13/RC/2094/P_2)
This publication has 167 references indexed in Scilit:
- Structural Adversarial Attack for Code Representation Models2024
- A Machine Learning Approach for Source Code Similarity via Graph-Focused Features2024
- SEED: Semantic Graph Based Deep Detection for Type-4 Clone2022
- Combining Holistic Source Code Representation with Siamese Neural Networks for Detecting Code Clones2022
- CroLSSim: Cross‐language software similarity detector using hybrid approach of LSA‐based AST‐MDrep features and CNN‐LSTM modelInternational Journal of Intelligent Systems, 2022
- DeepClone: Modeling Clones to Generate Code Predictions2020
- A survey of deep learning techniques for autonomous drivingJournal of Field Robotics, 2019
- Software plagiarism detection in multiprogramming languages using machine learning approachConcurrency and Computation: Practice and Experience, 2018
- An Introduction to Statistical Learning2013
- Speeding Up Graph Edit Distance Computation through Fast Bipartite Matching2011