Six hundred submissions, four score columns, and one pair of files the spreadsheet could not explain.
In June 2024, a computing department at a mid-sized public university in the Midwest finished a comparison it had postponed for three years. It ran four code similarity engines over the same 600 submissions from its CS2 data structures course, then sat a teaching assistant down with the exported scores and the original files and asked a narrow question: did the engines agree about who had copied from whom? They did not, and the pattern in the disagreements turned out to be more useful than any single score.
A code similarity detection pipeline is not one algorithm. It is tokenization, a matching strategy, a threshold, and a review workflow, and the four engines in this pilot weight those parts very differently. Token matching won on renamed and reformatted copies. AST-aware comparison pulled ahead once students moved code into helper methods. Every engine missed the majority of pairs that had been rewritten rather than edited. The largest disagreement between engines fell exactly where the stakes were highest.
How the 600-file comparison was built
The department pulled four assignments from the fall 2023 and spring 2024 semesters, 150 submissions each, all Python. Rather than rely on whatever organic copying existed in the cohort (which nobody could verify), the assessment coordinator planted 48 pairs: an original and a copy, distributed across five mutation types, roughly ten per type.
The five types were deliberate. Verbatim copying with nothing changed. Verbatim copying with every identifier renamed and the file reformatted. Method extraction and inlining, where the statement sequence survives but the function structure changes. Loop-to-recursion conversion. And full rewrite, where two students implement the same algorithm independently enough that the code shares almost no surface features.
Each pair was pushed through four engines running on the same input files. MOSS, the Stanford service whose interface has barely moved since the 1990s. JPlag 5.0, the Rust-rewritten release that replaced the 4.x Java core. Dolos 2.4 from the ETH Zurich teaching group, which uses k-gram winnowing rather than greedy string tiling. And Codequiry, which the department already licensed for its web-source scanning and which runs token, structural and fingerprint passes in one check.
Settings were set to something a real instructor would plausibly use rather than tuned per pair. MOSS ran with the default -m value. JPlag ran with a 12-token minimum match. Dolos used its default k-gram and window configuration. Codequiry ran through the dashboard with peer and web scanning enabled.
A pilot of this size cannot settle questions about engine behavior on 8,000 submissions from a MOOC. It can show which failure modes appear first, and how quickly a review queue becomes unmanageable.
Where all four engines agree
Renaming is not evasion. It is the first thing a student tries, and it is the least interesting case in the set. Every engine in the pilot scored renamed pairs between 96 and 100 percent, because every one of them tokenizes before it compares. Whitespace and identifier names disappear at the lexer.
# Submission A
def total_weight(parcels):
running = 0
for p in parcels:
running += p.mass
return running
# Submission B, after a rename pass
def compute_total(items_list):
accumulate = 0
for entry in items_list:
accumulate = accumulate + entry.mass
return accumulate
This pair was flagged at 97 percent by MOSS, 99 percent by JPlag, 96 percent by Dolos and 99 percent by Codequiry. The teaching assistant who reviewed it spent under a minute on the decision, which is the point of a similarity tool: the obvious cases should cost almost nothing so that reviewer attention is available for the ambiguous ones.
Reformatting behaved the same way, with one wrinkle. Adding a license header and 40 lines of comments diluted raw percentage scores on the engines that report similarity over the whole file rather than over matched regions. Students who paste a Stack Overflow helper and wrap it in their own file are not trying to hide anything, but the score math still shifts. Instructors who read scores without reading matched regions will misjudge file-level dilution every semester.
Where token matching starts to weaken
The numbers split sharply on the structural mutations.
| Alteration | MOSS | JPlag 5.0 | Dolos 2.4 | Codequiry |
|---|---|---|---|---|
| Verbatim | 100% | 100% | 100% | 100% |
| Renamed and reformatted | 98% | 97% | 96% | 99% |
| Method extraction or inlining | 91% | 93% | 88% | 96% |
| Loop to recursion | 34% | 31% | 27% | 82% |
| Full rewrite | 12% | 9% | 14% | 21% |
The recursion case is the interesting one, and it is the reason token-based engines have looked weaker than they are for twenty years. Greedy string tiling, which is what JPlag and MOSS both rely on in different forms, looks for the longest common token runs. Recursion reorders tokens, inserts calls into the middle of the sequence, and breaks the long runs into short ones that fall under the minimum match threshold.
# Original, iterative
def total_weight(parcels):
running = 0
for p in parcels:
running += p.mass
return running
# The copy, rewritten as recursion
def total_weight(parcels):
if not parcels:
return 0
return parcels[0].mass + total_weight(parcels[1:])
Three of the four engines scored this pair below 35 percent, which is roughly what two honest students writing independently would produce. The fourth engine retained 82 percent because it compares a structural representation in addition to the token stream, and the recursive and iterative forms of the same accumulation normalize to similar trees once control flow is expressed as a shape rather than a sequence.
The full-rewrite bucket defeated everything, and the reviewers expected that. Two of the twelve full-rewrite pairs had already been flagged by a human TA on stylistic grounds the TA could not articulate into a rule. The engines produced nothing on either. Any claim that similarity detection catches the determined copier rests on a version of the story where the copier does not know about similarity detection.

The false positives that consumed the review hours
The fourth assignment generated 41 high-similarity flags across the 150 submissions. Manual review found nine genuine matches. The other 32 traced back to a provided starter file that 31 students had submitted with only the required methods filled in, which is exactly what the assignment asked for.
This is the most common way a similarity engine wastes an instructor's week, and every engine handles it slightly differently. MOSS takes a base file through the -b flag and subtracts it before matching. JPlag 5.0 has an equivalent base code option. Dolos, in the version the department ran, has no direct equivalent, so the starter file has to be stripped in preprocessing. Codequiry lets the check be configured to exclude the provided scaffold in the dashboard rather than the command line.
The -b flag is the one setting everybody forgets, including the person who wrote the department's wrapper script in 2019 and left no comment in it.
“A similarity score is a question, not an answer,” said Elena Ruiz, who directs the undergraduate computing sequence and signed off on the pilot. “The number tells you where to look. It has never once told anyone what happened in the room.”

What each engine is built to do
MOSS remains the cheapest way to run a peer comparison and has the longest institutional track record of the four. Its constraints are operational rather than algorithmic. Results are served as static HTML with match regions, there is no dashboard, no persistent record beyond the served pages, and the result URLs expire after roughly two weeks. When a case reaches an academic integrity hearing in November, the June report may be a screenshot somebody took.
JPlag 5.0 is the most configurable of the three open options and generates readable reports without a web service. The Rust rewrite made it fast enough for large cohorts, and its base code support is well documented. It is a research-grade tool maintained by a small team, which shows up in documentation gaps more than in accuracy.
Dolos was designed for scale. Winnowing makes it cheap to compare every submission against every other submission, and the ETH group has run it on cohorts in the thousands. Its fingerprint approach is also why the recursion mutation scored lowest there: a k-gram window that straddles a changed statement boundary produces no match at all.
Codequiry runs several passes and reports the combined evidence, which is why it held the recursion case. It also checks submissions against the open web and public GitHub repositories in the same run, a comparison the other three engines do not attempt. In the pilot that mattered on eleven submissions where the copied source was a tutorial or a repository rather than a classmate, and peer-only scanning returned nothing at all.

Where the AI question sits outside this comparison
None of the four engines in the pilot scored AI generation. That is not a flaw in any of them; it is a different question, and it produces a different failure mode. A fully generated submission has no peer to match against, so peer similarity returns a low score and an empty match list. The department layered an AI code detector over the same 600 files afterward and found that the two signals are close to independent: nine of the highest AI-likelihood submissions had peer scores under 15 percent.
An integrity workflow that only runs similarity will miss generated work entirely. One that only runs AI detection will miss the pair of roommates who split an assignment. The two checks answer different questions about the same file.
Choosing an engine for a real review queue
The department's own conclusion after two months of reviewing the exports was not that one engine won. It was that the cost of the pilot came almost entirely from reconciliation: four score columns, four different threshold conventions, four different ways of representing a match, and a spreadsheet that had to be rebuilt by hand each time an assignment changed.
Marcus Oyelaran, the lecturer who ran the MOSS side of the comparison, put the tradeoff plainly. MOSS tells you a pair is similar and shows you the matched regions. It does not tell you what to do first when 150 submissions come back, and it does not keep the record for you.
The case for a commercial code plagiarism checker rests on that queue rather than on raw recall. A tool that separates peer similarity, web similarity and AI likelihood into distinct scores, ranks a cohort by outlier rather than by raw percentage, and keeps the evidence reviewable six months later solves the problem the pilot actually surfaced. For departments already running MOSS, the migration question is mostly about reports and retention, which is where a direct Codequiry vs MOSS comparison is more honest than a feature grid. The pricing difference matters less than whether anyone re-runs the check after the assignment is regraded.
Frequently Asked Questions
Does a high similarity score mean plagiarism?
No. In this pilot, 32 of 41 high-similarity flags on one assignment traced to a shared starter file. A score is a pointer to a pair of files worth reading, and the review, not the number, produces the finding.
Is MOSS or JPlag more accurate?
On this data set they were within three points of each other on every mutation type except recursion, where both weakened sharply. The larger difference is operational: MOSS offers no persistent record and no interface, while JPlag generates a report you keep.
Can code similarity detection catch AI-generated code?
Not reliably. Generated submissions usually have no peer to match, so peer similarity stays low. Detecting them requires a separate AI detection pass and, ideally, a review of the file against the assignment's stated constraints.
The full breakdown of the department's mutation set and per-engine scores is available alongside the peer similarity checker used to build the review queue.