Explainable LLM‑Based Detection of Code Plagiarism in Introductory Programming Courses
Year: 2026
Type: dissertation
Abstract: Introductory programming courses rely heavily on individual coding assignments for assessment, but at scale these assessments are vulnerable to plagiarism and collusion. Instructors commonly use similarity-based tools such as MOSS and JPlag to flag suspect submissions, yet similarity scores alone are not plagiarism verdicts and are difficult to calibrate in assignments with constrained solution spaces where independent solutions can be highly alike. This thesis investigates whether large language models (LLMs) can complement or improve on classical similarity-based detection for source-code plagiarism in introductory C programming, with particular emphasis on reducing false positives. Using a public, de-identified plagiarism dataset containing C/C++ coursework, fine-grained interaction traces, and multiple ground-truth variants, the study focuses on a curated subset of ten C assignments that span a range of solution-space constraints. JPlag is configured in C mode and evaluated as a representative similarity baseline. Two LLM-based pipelines are then designed and compared: an \emph{Original} pipeline that directly judges each code pair, and an \emph{Enhanced} pipeline that adds a two-phase, assignment-aware reflective stage. In the Enhanced pipeline, the LLM first derives an assignment-specific rubric from a small labelled sample and then applies this rubric when scoring all remaining pairs, producing ordinal plagiarism labels and textual rationales. Results show that JPlag offers strong performance with few false positives at conservative thresholds, but its recall for plagiarised pairs degrades on assignments where genuine solutions are structurally similar. The Original LLM pipeline can achieve high recall for plagiarised pairs but tends to over-flag non-plagiarised pairs, especially on constrained tasks. The Enhanced pipeline better controls false positives in these assignments by discounting template-driven similarity, while maintaining competitive overall accuracy. A qualitative error analysis identifies recurring factors behind correct and incorrect LLM decisions, including assignment-driven convergence, superficial obfuscation, and ambiguity in the ground truth. The thesis concludes that assignment-aware LLM reasoning is a promising complement to classical similarity tools, particularly as a source of structured explanations to support human judgement rather than as an autonomous decision-maker.
Author: Li, Zhengdao
Language: English
Subfield: Education
Field: Social Sciences
Domain: Social Sciences
Open Access status: green
OpenAlex ID: W7159899264
