Most computer science departments meet the same question the first time a similarity report lands on a chair's desk: 72% means what, exactly? A code plagiarism score threshold is not a verdict, and it was never designed to be one. It reports how much two submissions overlap once identifiers, whitespace, and comments have been normalized away. Whether that overlap came from copying, a shared starter file, a common tutorial, or two students who asked the same model the same question is a separate judgment, and it's the judgment departments most often skip.
Consider a department that has scanned student code for years but has never once written down what a score is for. That is more common than it sounds.
The week the flag queue outran the graders
Say a data structures course enrolls 340 students, with four teaching assistants and one instructor. An assignment asks for a self-balancing binary search tree, an in-order traversal that returns a list rather than printing to the console, and a rebalancing routine with a documented rotation policy. Java, roughly 400 lines per submission once students add their own test harnesses.
The instructor runs MOSS the weekend after the deadline, pointing the -b flag at the starter files so the provided interfaces are treated as baseline rather than submissions. Suppose the result page comes back with 138 pairs above 30% similarity and 41 pairs above 50%. If the honor board already has open cases, forty-one more can push hearings well into the next term, because every contested hearing takes committee time before anyone reads a single line of code.
There's a mundane problem in that workflow that rarely comes up in tool comparisons. MOSS returns an HTML page of match pairs sorted by number of matching lines. It carries no student names, no assignment metadata, and no structured export. Someone has to copy pair identifiers into a spreadsheet, cross-reference them against the learning management system, then open files two at a time to see what the matches actually look like. That can take days, and by the time there is a ranked list the semester may be over.
What a code plagiarism score threshold actually measures
Before a department can set a line, it has to understand what the number underneath the line is counting. The three families of comparison engines behave very differently, and many instructors have never had the distinction explained to them.
Text similarity is the simplest kind. The tool computes an edit distance or a percentage of shared lines. It's fast, it needs no parser, and it collapses the moment a student renames a variable or reformats the file.
Token-based fingerprinting is what MOSS popularized with the winnowing algorithm published by Schleimer, Wilkerson, and Aiken in 2003. The engine strips comments, normalizes identifiers and literals, breaks the token stream into overlapping k-grams, hashes each one, and keeps a subset of those hashes as a fingerprint. Renaming every variable in a submission moves the fingerprint not at all.
Abstract syntax tree comparison parses the submission and compares structure: loop nesting, call relationships, control flow. It survives reordering that token matching misses, and it is slower and fussier about language support. JPlag compares token sequences with greedy string tiling. Dolos, the open-source tool from a research group at Ghent University, parses code with tree-sitter before fingerprinting it and has become a common MOSS alternative.
Here is what the difference looks like in practice. These two Java methods are the same algorithm, and neither is a copy of the other in any textual sense.
public static int maxSubarraySum(int[] nums) {
int best = Integer.MIN_VALUE;
for (int i = 0; i < nums.length; i++) {
int running = 0;
for (int j = i; j < nums.length; j++) {
running += nums[j];
best = Math.max(best, running);
}
}
return best;
}
static int bestWindowTotal(int[] a) {
int bestTotal = -1_000_000_000;
for (int start = 0; start < a.length; ++start) {
int acc = 0;
for (int end = start; end < a.length; ++end) {
acc = acc + a[end];
if (acc > bestTotal) bestTotal = acc;
}
}
return bestTotal;
}
A line-based comparison finds little in common. A token-based engine, with identifiers normalized to a single symbol, reports a high match, because structurally there is almost nothing left to differ. An AST engine reports the same and can also tell you the loop nesting is identical in depth and order. If your department's threshold was set by someone who only ever looked at a text diff, you are grading the wrong quantity.
The calibration exercise that set the line
The fix is to stop guessing. Build a validation set of submission pairs from prior semesters: some with confirmed, documented copying, and some from students who worked independently, verified through office-hour notes and version history. Then run the whole set at several thresholds. The table below is an illustration of the kind of result to expect, not measured data.
| Threshold | Copied pairs flagged (of 12) | Independent pairs flagged (of 12) |
|---|---|---|
| 40% | 12 | 5 |
| 50% | 12 | 4 |
| 60% | 11 | 2 |
| 70% | 10 | 1 |
| 80% | 7 | 0 |
Numbers like these depend on the department, the language, and the sample, so do not treat them as universal. The shape is typical, though. There is no threshold that is both sensitive and clean, because in a well-specified assignment, correct solutions converge. When the spec requires a recursive helper with a particular signature, every student who follows the spec earns fifteen to twenty-five points of similarity for free.
A threshold is not really a line about student behavior. It is a staffing decision wearing a percentage sign.
One workable policy uses two numbers rather than one. Sixty percent opens a review. Eighty percent, combined with a web match or a pattern across more than two submissions, produces an evidence packet. Nothing automatic happens at either number. That distinction needs to be in the syllabus in plain language, because a policy that exists only inside a tool's settings page will not survive an appeal.
Where AI-written submissions sit in the distribution
A second pattern is now common. You may see a cluster of matches in the 55% to 75% band that makes no sense as collusion, with each submission matching several others in that band. Open the files and they share a house style: an explanatory comment block above every method, input validation the spec never requested, an Optional return where the assignment called for a plain value, and a consistent habit of marking every local variable final even when it was never reassigned.
That is the signature of a language model, and it matters for how you read the score. AI-generated submissions do not usually produce one dramatic 95% match. They produce a wide mesh of moderate matches across dozens of students, because dozens of students typed a similar prompt into a similar tool. Peer similarity alone cannot distinguish thirty students who each used an assistant from thirty students who copied from one another.
Statistical signals borrowed from prose detection are weaker in code than people assume. Perplexity measures how surprised a model is by the next token. Burstiness measures how much sentence length varies. Both were designed for English essays, and they degrade on programming languages, where token entropy is low across the board and the grammar is far more constrained. What holds up better in source code is structural and stylistic: comment density relative to method length, defensive patterns nobody asked for, and a uniformity across files that a human writing under deadline rarely achieves. The publishing on this is thinner than the vendor pages suggest, so treat any single AI score above 0.9 as a reason to look rather than a finding.
A student with a high AI score may have used the same idiom in a public repository years earlier. Check a student's earlier coursework and public version history before scheduling a conversation. That step is easy to skip, and it is the one that prevents the worst outcome available to a department, which is accusing a strong student of something they did not do.

How a starter file produces false 100% matches
A common first-scan surprise is dozens of submissions matching each other at 100%. The usual cause is mundane: the assignment's starter repository was uploaded into the peer corpus, so every student who kept the provided TreeMap wrapper intact matches every other student on that file, perfectly.
Nothing about the engine is broken. The lesson is that anything you distribute to the whole class belongs in an exclusion list, and that you should read per-file similarity rather than trusting the aggregate score at the top of a report. The same mistake shows up in industry audits, where a shared internal library produces a uniform match across every service in a repository.

The triage policy the department kept
Write the process down. The mechanics matter less than the order of operations.
A flag opens a review, never a charge. A reviewer reads the two files side by side with the diff in view and records a short note: what matched, what the match sources were, and whether the similarity survives the exclusion of anything the instructor provided. Web matches get traced to their origin, because a 40-line overlap with a 2016 Stack Overflow answer that the student cited in a comment is a different event from a 40-line overlap with a classmate's private repository.

Only after that reading does anyone talk to the student, and the conversation is a code walkthrough, not an interrogation. A good version runs about fifteen minutes and starts with a specific line. "Talk me through what happens here if the key already exists." Students who wrote the code can explain why the loop terminates early on a duplicate key. Students who did not usually cannot. The ones who can are the false positives you were about to punish.

Expect deduplication and starter-file exclusions to shrink the queue, and expect many of the remaining cases to resolve in a documented conversation rather than a hearing. Write down why each cleared submission was cleared, too. That record is what makes the process defensible when a decision is questioned.
What to look for in tooling
The process changes are the important part. Tooling makes the process survivable. MOSS's HTML result page cannot produce a per-file evidence packet, and a written policy usually needs peer similarity, web sources, and AI signals in one report instead of three unrelated spreadsheets.
Codequiry is built for that workflow. It runs peer comparison, web and GitHub source matching, and AI generation analysis in a single check, so a reviewer opens one workspace rather than reconciling three tools. The code plagiarism checker reports per file, which is how a starter-file problem shows up, and the review workspace shows a synced diff beside the list of external matches. Assembling that from MOSS, JPlag, and a separate AI code detector is possible, but it costs a graduate assistant and a great deal of patience.
For departments weighing options, the honest summary is that MOSS remains free and fast, JPlag remains excellent for pairwise academic comparison, and Dolos is a solid open-source choice with broad language support. What none of them provide is a dashboard a non-programmer administrator can read, a student-facing portal, or an API that lets an engineering team run the same checks inside a CI pipeline. If cost and script maintenance are the first questions in your department, the Codequiry vs MOSS comparison covers both.
Advice for any department
Set the threshold in writing before you have a case you care about. Calibrate it against your own assignments, because a first-semester Python course and a senior compilers course produce completely different baseline similarity. Treat AI scores as a reason to look, not a reason to act. Keep the evidence packet short enough that a faculty member can read it in ten minutes.
The alternative is a queue nobody has time to work, a spreadsheet maintained by hand, and a policy that exists only in a tool's default settings. If your department is starting from a MOSS script and a shared drive, the practical first step is to run a full peer, web, and AI check on one assignment and see how many of your 50% matches survive a per-file reading.