Bachelor thesis
Cite …

Semantic Tokenization in Source Code Plagiarism Detection

Simon Wessel 1
1 Karlsruhe Institute of Technology (KIT)
DOI: 10.5445/IR/1000192035
PDF published on Nov 18, 2026
Abstract

Detecting cases of software plagiarism within a set of source code submissions is not scalable when performed manually, leading instructors to rely on automated plagiarism detection tools. State-of-the-art approaches are predominantly token-based, transforming source code into sequences of structural tokens that are subsequently compared to identify common subsequences. However, relying solely on structural tokens may result in false positives, as independently developed solutions with similar structure can be incorrectly identified as plagiarized.

This thesis presents an approach to mitigate this limitation by enriching tokens with additional structural and semantic context. The proposed method extends the token representation by incorporating vector-based features derived from the abstract syntax tree and variable dependencies. Furthermore, a filtration–verification process is introduced within the Greedy String Tiling algorithm to enable similarity computation based on these enriched representations.

The approach is implemented in the state-of-the-art plagiarism detection system JPlag and evaluated on real-world submissions from introductory programming courses. The results demonstrate that the proposed method effectively reduces similarity scores of independent developed submission pairs, thereby improving the separation between plagiarized and independent submission pairs, while incurring only minor runtime overhead.