New Breakthrough Catch AI-written code before you grade it. Our most accurate model yet. It finds 90% of AI and GPT code with only 1.3% false flags. 90% caught, 1.3% false flags. Start checking Start checking
New: MCP integration. Run plagiarism scans from Claude, Cursor or any AI assistant. Run scans from Claude or Cursor. Set it up

What MOSS misses

MOSS is good at one thing: finding pairs of students whose code shares long runs of tokens. A low MOSS score does not mean a submission is original. This brief shows, on one fixed example, the three kinds of copying a MOSS report cannot see, and what to add so they do not slip through.

2-day free trial. Checks every file against classmates, the web and AI, in 65+ languages.

The same function, rewritten line by line Identical behavior. Very few token runs in common.
Example
Originalstats.py
1def find_max(numbers):2 maximum = numbers[0]3 for n in numbers:4 if n > maximum:5 maximum = n6 return maximum
Rewrittenstats.py
1def find_max(numbers):2 maximum = numbers[0]3 index = 04 while index < len(numbers):5 value = numbers[index]6 if not (value <= maximum):7 maximum = value8 index = index + 19 return maximum
Behavior: identicalNames: unchangedToken runs in common: few

The loop and the comparison were rewritten into equivalent forms (highlighted). A fingerprint comparison looks at runs of tokens, and almost every run changed.

How MOSS works

MOSS reads each file as a stream of tokens, so names, comments and whitespace drop out. It hashes short runs of those tokens into fingerprints using winnowing, then reports the pairs of files that share the most fingerprints.

That is why renaming variables does nothing against MOSS. It is also why MOSS has three blind spots:

Rewritten statements

If the token runs change, the fingerprints change, even when the program does exactly the same thing.

Anything outside the batch

MOSS only compares the files you send. The web and last year's class are invisible unless you add them.

AI-written code

Generated code is usually different for every student, so it matches nothing in the batch.

Results that expire

The report page is deleted after 14 days, so the evidence has to be saved by hand.

Rewritten copies

The example above uses four ordinary rewrites, each of which leaves the program's behavior unchanged:

  • A counted for loop becomes an equivalent while loop.
  • A compound assignment like total += n is expanded into total = total + n.
  • A comparison is inverted and negated: n > m becomes not (value <= m).
  • An indexed value is pulled into its own named variable.

None of these is sophisticated. Together they change almost every run of tokens, so a fingerprint comparison finds little in common. A person reading the two side by side sees the same function immediately.

What catches it: comparing structure at a higher level than token runs, and reading the top pairs yourself. Codequiry's Zeus engine is built for restructured code like this.

Code from outside the batch

Most copied code in a programming course now comes from outside the class: a GitHub repository, a Stack Overflow answer, a tutorial site, a student from last year, or an AI assistant. MOSS cannot look at any of those, so a file copied from one of them scores low unless a classmate copied the same thing.

There is a worked example of exactly that on the MOSS alternative page: a Stack Overflow answer with the names changed, which a batch-only comparison has nothing to match against.

Check what MOSS cannot see

Run the same batch against classmates, past terms, the web and AI.

Start free trial

2-day free trial

What to do about it

You do not need to stop using MOSS. You need to stop treating its report as the whole answer:

  1. Keep the peer comparison, with the starter code passed as a base file.
  2. Add a web check against GitHub, Stack Overflow and the web, and include earlier terms.
  3. Add an AI check, and treat its result as a question for the student, not a verdict.
  4. Read the top pairs yourself. Look for shared bugs, odd names and dead code, which survive any rewrite.
  5. Save the evidence before it expires.

Codequiry does steps 1 to 3 in one check and keeps every report. Comparing the free options instead? See MOSS vs Dolos vs JPlag, or read the full guide to detecting code plagiarism.

Frequently asked questions

What is MOSS?

MOSS (Measure of Software Similarity) is a free service from Stanford, written by Alex Aiken in 1994, that compares a batch of programs with each other. It is free for academic use and widely used in programming courses.

How does MOSS detect plagiarism?

It turns each file into a stream of tokens, hashes short runs of tokens into fingerprints with an algorithm called winnowing, and reports pairs of files that share many fingerprints. Names, comments and whitespace do not affect it.

What does MOSS miss?

Copies whose statements were rewritten into equivalent forms, code copied from the web that no classmate also used, code written by AI, and anything from earlier terms you did not add to the batch yourself.

Does a low MOSS score mean a submission is original?

No. It means the file shares few token runs with the other files in the batch. The code can still be copied from outside the batch, rewritten from a classmate's work, or AI-written.

What languages does MOSS support?

About 25, including C, C++, Java, C#, Python, JavaScript, MATLAB, Perl, Haskell, Lisp, Scheme, Pascal, Ada, Verilog, VHDL and MIPS assembly.

Should I stop using MOSS?

Not necessarily. It is a good peer comparison. Just do not treat it as the whole check: add a web check and an AI check, and read the top pairs yourself.

See what your last MOSS batch missed

Upload the same files and check them against classmates, past terms, the web and AI.

Start free trial

2-day free trial

Just one assignment? Run a single check

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.

  • JPlag Karlsruhe Institute of Technology, open source

    Open-source token-based detector that compares programs with Greedy String Tiling and produces a similarity report per pair.

  • Dolos Ghent University, open source

    Open-source similarity tool built on tree-sitter parsing, with a web interface for exploring clusters of related submissions.