Source Code Plagiarism Detection with Pre-Trained Model Embeddings and Automated Machine Learning

Fahad Ebrahim, Mike Joy


Abstract
Source code plagiarism is a critical ethical issue in computer science education where students use someone else’s work as their own. It can be treated as a binary classification problem where the output can be either: yes (plagiarism found) or no (plagiarism not found). In this research, we have taken the open-source dataset ‘SOCO’, which contains two programming languages (PLs), namely Java and C/C++ (although our method could be applied to any PL). Source codes should be converted to vector representations that capture both the syntax and semantics of the text, known as contextual embeddings. These embeddings would be generated using source code pre-trained models (CodePTMs). The cosine similarity scores of three different CodePTMs were selected as features. The classifier selection and parameter tuning were conducted with the assistance of Automated Machine Learning (AutoML). The selected classifiers were tested, initially on Java, and the proposed approach produced average to high results compared to other published research, and surpassed the baseline (the JPlag plagiarism detection tool). For C/C++, the approach outperformed other research work and produced the highest ranking score.
Anthology ID:
2023.ranlp-1.34
Volume:
Proceedings of the 14th International Conference on Recent Advances in Natural Language Processing
Month:
September
Year:
2023
Address:
Varna, Bulgaria
Editors:
Ruslan Mitkov, Galia Angelova
Venue:
RANLP
SIG:
Publisher:
INCOMA Ltd., Shoumen, Bulgaria
Note:
Pages:
301–309
Language:
URL:
https://aclanthology.org/2023.ranlp-1.34
DOI:
Bibkey:
Cite (ACL):
Fahad Ebrahim and Mike Joy. 2023. Source Code Plagiarism Detection with Pre-Trained Model Embeddings and Automated Machine Learning. In Proceedings of the 14th International Conference on Recent Advances in Natural Language Processing, pages 301–309, Varna, Bulgaria. INCOMA Ltd., Shoumen, Bulgaria.
Cite (Informal):
Source Code Plagiarism Detection with Pre-Trained Model Embeddings and Automated Machine Learning (Ebrahim & Joy, RANLP 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.ranlp-1.34.pdf