Why MOSS is useless
for educators in 2026.
A 32-year-old token matcher still proctors millions of programming assignments every year. It cannot keep up with how students write code today. The worked example below shows exactly where it fails.
Two files. One program. MOSS reports no match.
Below is a fixed pair of files we wrote, shown side by side. The right-hand file is the left-hand file after the kind of ordinary restructuring a copied assignment tends to arrive with: a for loop written as a while, a compound assignment expanded, a comparison inverted, a value lifted into a named variable. MOSS’s winnowing fingerprints stop matching. The program still runs identically. That gap is what this brief is about.
A 1994 algorithm in a 2026 classroom.
MOSS was published the same year Netscape Navigator shipped. It has not been meaningfully updated since. The world it was designed to police no longer exists.
MOSS, the Measure of Software Similarity, was published by Alex Aiken at Stanford in 1994. At the time it was a remarkable piece of work. The web had roughly 600 sites. Most undergraduates wrote their first program on a paper handout. There was no Stack Overflow, no Copilot, no GitHub, no ChatGPT. A student who wanted to cheat had to find another student to copy from. MOSS, then, was an elegant solution to a narrow problem: catching one classmate copying another.
The mechanism is straightforward. MOSS strips comments and whitespace, normalizes every identifier to the same token, generates k-grams from the resulting sequence, and uses the winnowing algorithm to pick representative fingerprints. Two submissions that produce overlapping fingerprints are flagged. That is the entire system. There is no parser. There is no semantic model. There is no concept of what the code does.
Today, the threats to academic integrity in a programming course look almost nothing like 1994. The dominant sources of unoriginal work are large language models, commercial homework-help platforms, public GitHub solutions, and discussion forums. None of those are pairs of students copying each other. MOSS, by design, was never built to address any of them.
Why ordinary edits get past MOSS.
Three edits, all publicly documented for years, are enough to take a copied submission off the report.
Because MOSS compares token sequences and normalizes identifiers, slipping past it does not require obfuscation, code generation, or any sophistication at all. It only requires changing the shape of the token stream without changing what the code does. Three transformations account for most of the restructured copies that reach a grader, and they are the three this demo applies.
- Loop swap. Rewrite every
forloop as awhileloop. The bookkeeping moves outside the loop header. The token sequence is completely different. The program behaves identically. - Operator expansion. Replace
i++withi = i + 1. Replacex += ywithx = x + y. A two-token sequence becomes five tokens. K-grams shift everywhere. - Expression splitting. Break
int r = a + b * cintoint t = b * c; int r = a + t. The expression tree is identical. The token sequence is not.
A clean MOSS report tells you the student did not hand in a byte-for-byte copy. It does not tell you the work is original.
None of this is a secret. The techniques have been openly documented for years in academic papers (Mossad, UMass 2020), tutorials and forum threads. The demo above is not novel research. It reproduces what is already public so that the people grading with MOSS can see the gap for themselves, which is exactly why a MOSS report needs a second opinion.
The uncomfortable conclusion: any course that relies on MOSS as a deterrent is relying on student ignorance of how MOSS works. That is a brittle foundation for academic policy.
MOSS vs. modern detection.
A side-by-side of what MOSS does, and what a 2026 detection stack needs to do.
What educators should use now.
Codequiry is the detection stack we built for the threats that exist in 2026. It still runs MOSS-style matching underneath, so nothing is lost.
We did not set out to replace MOSS so much as to surround it. A modern course needs token-based matching for the cases MOSS still handles well, semantic analysis for the cases it never could, web and repository search for the public-source problem, and AI-generation detection for the dominant cheating vector of the past three years. Codequiry runs all four engines in a single scan.
Token fingerprinting still has its place. We run it alongside everything else, so educators do not give anything up.
Operates on parsed AST and control-flow graphs. Catches loop swaps, expression splits, and the restructuring demonstrated above.
Identifies output from ChatGPT, Claude, Copilot, and Gemini with calibrated confidence intervals. The post-2022 cheating vector MOSS literally cannot see.
Cross-references submissions against billions of lines of public code. The largest source of code plagiarism today is not other students. It is the internet.
Native integrations with Canvas, Moodle, Blackboard, and GitHub Classroom. Reports faculty can hand to a dean without translation.
Used by over 500 institutions worldwide for academic integrity in programming courses, including coursework at Stanford, MIT, and Carnegie Mellon.
Frequently asked.
Questions we hear most often from CS faculty, TAs, and academic integrity officers.
total, sum, and x all become identical. This is the one thing MOSS handles well, which is why a report full of renamed variables still shows up as a match.What MOSS is, technically
MOSS (Measure of Software Similarity) is a code plagiarism detection system developed at Stanford University by Alex Aiken in 1994. It uses the winnowing algorithm to produce document fingerprints from source code: input is tokenized, identifiers are normalized, k-grams are extracted, and a sliding window selects representative hashes. Two submissions with overlapping fingerprints are reported as similar. MOSS is widely used by universities to detect code plagiarism in programming assignments.
What “getting past MOSS” actually means
A submission gets past MOSS when it performs the same task as the original but its token sequence is different enough that MOSS’s k-gram fingerprints no longer overlap. Variable renaming does not do this, because identifiers are normalized before fingerprinting. Whitespace and comment changes do not either, because they are stripped. Only structural transformations (loop-form changes, operator expansion, expression decomposition, control-flow inversion, dead-code insertion, and declaration splitting) alter the token sequence in ways MOSS misses.
Why this matters for educators
The techniques above are publicly documented (see the UMass Mossad research project, 2020) and widely shared in online forums. For educators, the practical implication is that a clean MOSS report can no longer be treated as evidence of original work, only as evidence that the student did not submit a byte-for-byte copy. Modern detection systems compensate by adding semantic analysis, public-web search, and AI-generation detection on top of token-based matching.
What languages MOSS supports
MOSS supports C, C++, Java, Python, JavaScript, C#, MATLAB, Perl, and several others. The demonstration above covers Python, Java, JavaScript, C++, and C, with transformations written for each language’s syntax.
Stop grading with a 1994 algorithm.
Codequiry combines MOSS, semantic Hexagram, public-web search, and AI-detection in a single scan. Trusted by 500+ institutions. Free to start.
Tools and sources referenced on this page
Codequiry is compared with these tools above. Each link goes to the project's official site so you can check the claims yourself.
-
MOSS (Measure of Software Similarity)
Stanford University, Alex Aiken
Free academic similarity service from 1994 that fingerprints code with winnowing and reports matching passages between submissions.
-
Winnowing: Local Algorithms for Document Fingerprinting
Schleimer, Wilkerson and Aiken, SIGMOD 2003
The paper that defines the fingerprinting algorithm MOSS is built on, and the reference point for every "winnowing-based" detector.
what MOSS misses · MOSS limitations · MOSS false negatives · does MOSS detect restructured code · Measure of Software Similarity limitations · winnowing algorithm weaknesses · k-gram fingerprinting limits · Mossad research · MOSS alternative for educators · MOSS vs Codequiry · semantic code plagiarism detection · AST-based plagiarism detection · AI-generated code detection · code plagiarism detection for educators · MOSS Python limitations · MOSS Java limitations · MOSS JavaScript limitations.