Student or educator? Sign up with your school email and get 6 months of Pro free.

The DOI matches its Crossref record; 4 of the 4 references it cites were found in a registry or an index; 2 of the 6 sources its claims cite were checked for support.

Automatic Code Plagiarism Detection using AST and Machine Learning

Open access
Karanam Pavani, Mamuduru Sai Kathyayani, Kolime Heena Kousar, Kappaganthula Pavana Lahari, Karanam Pavani, Rohini Bai·2026·International Journal of Scientific Research in Science Engineering and Technology

Abstract

Academic integrity in computer science education is increasingly challenged by sophisticated source code plagiarism. This paper presents a novel approach to automatic code plagiarism detection that leverages Abstract Syntax Tree (AST) analysis combined with Machine Learning (ML) techniques. The proposed system utilizes graph kernels for structural similarity and integrates CodeBERT embeddings to capture semantic context. Experimental results on a dataset of anonymized programming submissions demonstrate that the proposed method achieves superior accuracy and F1-scores compared to traditional token-based systems, particularly in identifying Type-2 and Type-3 code clones.

Overview

CoChat Summary

TL;DR

The paper proposes an automatic code plagiarism detection system that combines Abstract Syntax Tree structural analysis with machine learning, including graph kernels and CodeBERT embeddings, to detect obfuscated code clones. It reports higher F1 than token-based and tree-edit-distance baselines on a dataset of 500 Python assignments.

Key findings

  • The proposed AST + CodeBERT method achieves the highest F1-score (0.94) compared with a token-based baseline and a pure Tree-Edit Distance approach.
  • Token-based methods have high precision but low recall (0.68) because they fail to detect obfuscated Type-2 and Type-3 clones.
  • Structural AST analysis allows the system to ignore variable renaming, while CodeBERT embeddings help identify code that is syntactically different but functionally identical.
  • Processing time is optimized compared to TED, making the approach viable for real-time checking in academic environments.

Methods

  • Dataset: 500 Python programming assignments collected from an online judge platform, including original submissions and synthetically generated plagiarized versions using renaming, reordering, and control flow flattening; split into 70% training and 30% testing.
  • Pipeline: code is normalized, parsed with `tree-sitter` into an AST, structural features are extracted via graph kernels/subtree patterns, semantic features are extracted via pretrained CodeBERT embeddings, and cosine similarity with a threshold-based classifier determines plagiarism.
  • Comparison: evaluated against a token-based approach simulating MOSS and a pure Tree-Edit Distance approach using Precision, Recall, F1-Score, and Accuracy.

Limitations

  • The paper does not state a limitations section.
  • Evident from the text: evaluation focuses on Python only, despite the stated objective of a language-agnostic parser across multiple programming languages.
  • Evident from the text: plagiarized versions are synthetically generated using obfuscation tools rather than naturally occurring cases, and the reported Table I values are not included in the provided text; Gemini LLM integration is mentioned as an objective, but the reported evaluation uses AST + CodeBERT.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

Crossref · 10.32628/ijsrset2613348

Cites

0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Figures

Image 1
CC-BY · From the PDF

Verification

Claims the paper makes

1 Valid · 4 Not valid · 4 Not checked · 19 Own results and interpretations

5 more claims

Create a free account to see all 28 claims and every source verdict.

See all claims — free account
  • Probably not a substantial claim. 14
  • It may state two separate claims as one. 7

Create a free account to see these claims.

Citations

Cites

The publisher hasn’t deposited this paper’s reference list.

Research works printed but not linked: 1

  1. [5]5. H. Salsabil, J. Wu, and H. Lon, "Machine Learning for Source Code Plagiarism Detection: A Survey," in *IEEE Access*, vol. 9, pp. 123456- 123478, 2022.

Metadata

Authors
Pavani, K., Kathyayani, M. S., Kousar, K. H., Lahari, K. P., Pavani, K., & Bai, R.
Affiliations
  • Student, Department of CSE (AIML), Dr. K. V. Subba Reddy Institute of Technology, Kurnool, Andhra Pradesh, India
  • Assistant Professor, Department of CSE (AIML), Dr. K. V. Subba Reddy Institute of Technolo
Venue
International Journal of Scientific Research in Science Engineering and Technology
Published
2026-06-14
Volume
13
Issue
3
Pages
365-373
ISSN
  • 2394-4099 (ISSN-L)
  • 2395-1990
OpenAlex
W7164750719
Cited by
0
References
0
FWCI
0.00
Type
journal article
Language
en
Open access
Locations
International Journal of Scientific Research in Science Engineering and Technology (publishedVersion, cc-by)
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Social Sciences › Education › Academic integrity and plagiarism
  • Physical Sciences › Computer Science › Computer Science Applications › Teaching and Learning Programming
Keywords
code plagiarism detection, abstract syntax tree, code obfuscation, code clones, graph kernels, structural similarity, academic integrity, computer science education, programming exercises

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

The claim verdicts this report counts are experimental: their accuracy is not yet measured.

A language model drew the claims from the paper on 2026-10-10, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).

A second model labelled each claim on 2026-10-10 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: Automatic Code Plagiarism Detection using AST and Machine Learning. https://app.cochat.ai/papers/10.32628/ijsrset2613348
The paper
Pavani, K., Kathyayani, M. S., Kousar, K. H., Lahari, K. P., Pavani, K., & Bai, R. (2026). Automatic Code Plagiarism Detection using AST and Machine Learning. International Journal of Scientific Research in Science Engineering and Technology. https://doi.org/10.32628/ijsrset2613348

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.