Say a course of 200 students submits a Java assignment that asks for a bounded queue backed by a hand-written linked list. You run a peer similarity scan and get back 31 submissions above 60 percent, six above 90, and one pair that matches on every single file. The report lands the week before midterms, when you have the least capacity to deal with it.
The instinct is to sort by score and start sending emails. Resist that. A similarity score measures shared structure between two files. It does not measure intent, and it does not know which parts of the file you actually graded. Reviewing code plagiarism detection results is a triage job, and the order in which you do the steps matters more than the threshold you pick.
What a code similarity score actually measures
Most engines in this space fall into three families. Token-based tools lex each file, throw away comments and whitespace, and compare token sequences. MOSS selects a subset of hashed k-grams through winnowing, which is why renaming a variable or reformatting a block barely moves the score. JPlag has historically compared token sequences with greedy string tiling. Structural tools go further and build an abstract syntax tree or a fingerprint of node pairs, so a `for` loop that becomes a `while` loop, or a nested `if` that becomes a conditional expression, still lands on the same fingerprint. Dolos parses with tree-sitter and matches on structural fingerprints rather than raw text.
The practical consequence is that a good engine is deliberately blind to the things students think disguise copying, and deliberately sensitive to the things they think are invisible. Compare these two submissions for a vowel counter:
// Submission A
public static int countVowels(String s) {
int count = 0;
for (int i = 0; i < s.length(); i++) {
char c = Character.toLowerCase(s.charAt(i));
if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') {
count++;
}
}
return count;
}
// Submission B
public static long countVowels(String input) {
return input.toLowerCase().chars()
.filter(ch -> "aeiou".indexOf(ch) >= 0)
.count();
}
Text comparison sees almost nothing here. A structural tool may see a shared intent and score it in the low range. Both answers are also completely idiomatic, which is exactly how structural false positives are born. Keep that pair in mind whenever a score sits between 40 and 70 percent.
Seven steps for reviewing code plagiarism detection results
Step one, write down what the assignment allowed
The policy is the specification for the detector, and you want it written before you look at a single score, because looking first biases how you read the policy. Did the handout permit discussing the algorithm but not sharing code? Was pair programming allowed for this lab specifically? Could students use the course's Discord? Was the starter code distributed as a shared skeleton? Were Stack Overflow lookups allowed if cited?
Write the answers into a short file that you attach to the assignment record. When a student appeals in April, that file is the difference between a defensible decision and a memory of one.
Step two, read the distribution before you read any match
Do not open the top match first. Look at the shape of the whole cohort. A class of 200 solving the same assignment from the same lecture slides will always produce a tail. What you want to know is whether this term's tail looks like last term's tail.
Pull the median, the 90th percentile and the count above your working threshold, and compare against the same assignment from a prior term where you had no integrity problems. A cohort where the 95th percentile jumped from 45 percent to 88 percent is telling you something. A cohort with the same distribution as last year and one 100 percent pair is telling you something narrower and much more specific.

This is the part most people skip, and it's the part that keeps you honest. A file-by-file reading of 31 matches will convince you that everyone is copying. Looking at the distribution first tells you how many of those 31 are statistics talking.
Step three, subtract the boilerplate
Strip out everything the assignment told students to write. The class declaration. The package line. The imports. Any skeleton you distributed. The standard input reading block that every student in the room writes the same way:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
// ...
}
}
A token-based engine flags this at 100 percent across the whole class, correctly, and it means nothing. Good tools let you suppress known-boilerplate regions or upload the starter code as an exclusion. If yours doesn't, keep a manual list of regions to ignore and apply it consistently to all 200 submissions, not just the ones you're already suspicious of.
The test that survives every version of this step: does the shared code sit in the part you graded? If the match lives entirely in input parsing and the graded logic is the queue's `enqueue` and `dequeue`, you have a formatting coincidence, not a finding.
Step four, classify the match by mechanism
Not all high scores mean the same thing, and the right next action depends on which kind you're looking at.
| Pattern | What it usually means | What to check next |
|---|---|---|
| Near-total match across every file, including comments and error messages | File transfer or a shared archive | Submission times, archive metadata, whether both files contain the same non-functional artifacts |
| Match confined to imports, `main`, and the starter skeleton | Boilerplate | Nothing. Exclude and move on. |
| Match concentrated in one unusual helper function | Partial copy, or a shared online source | Web and GitHub match against that function's distinctive lines |
| Moderate match spread across all methods, different naming style | Shared approach, or a structural false positive | Read the diffs. Look for shared dead code and shared bugs. |
| Match to a repository or tutorial page | Web-sourced code | Whether the source was citable under the policy, and whether the student cited it |
The middle rows are where the actual work lives. A copied helper function often carries a signature that no independent writer would produce: the same variable named `temp2`, the same unreachable guard, the same off-by-one in an edge case the assignment didn't test.

Shared bugs are stronger evidence than shared style. Two students can independently settle on the same naming convention. Two students almost never independently write the same wrong boundary condition in the same unreachable branch.
Step five, trace provenance and direction
Similarity is symmetric. Copying is not. You usually need to know who wrote it first, both because the consequences differ and because the student who shared is often more forthcoming than the student who copied.
Submission timestamps are weak. Half the class submits in the final hour. Stronger signals: a Git-based workflow where commit history shows progressive development in one repository and a single bulk commit in the other; partial work where one submission is complete and the other is missing the exact edge cases the original got wrong; a broken rename where one file still contains the other student's name in a comment or a `toString`.
For code that didn't come from a classmate, run the same submission against the open web and GitHub. A match to a five-year-old repository, a tutorial page, or a Stack Overflow answer changes the conversation entirely, from an academic integrity case to a citation question.

Step six, assemble the evidence packet before the conversation
Build the packet before you email anyone, because once you've emailed, you're committed. For each flagged pair, record: the assignment and its stated policy, the specific functions that matched with line ranges, the match percentage restricted to the graded portion, what the engine's structural comparison found versus its text comparison, any web provenance, and the student's submission timestamp and history.
Write two or three sentences explaining the finding in plain language. If you can't write those sentences without hedging, you don't have a finding yet, and you should go back to step four.
The packet does two things. It makes the meeting with the student a review of evidence rather than an accusation, and it makes your own reasoning auditable when a department chair or an appeals committee asks how you decided.
Step seven, calibrate with planted controls
This is the step almost nobody does and the one that most improves your judgments over time. Before each term, add two synthetic submissions to a test run of the assignment: one deliberate near-copy of a known solution with variables renamed and one loop rewritten, and one genuinely independent solution written from the same spec by someone who never saw the first.
The first pair tells you whether your engine still catches refactored copying at a threshold you can defend. The second tells you your false positive rate on this specific assignment. If the independent pair scores 55 percent, then 55 percent is not evidence of anything in this cohort, and you should say so in your policy rather than discover it during an appeal.
Keep a short log across terms: assignment, engine, threshold, number flagged, number upheld after review. Three terms of that log will teach you more about your own course than any tool's documentation.
Where tooling stops and judgment starts
MOSS and JPlag are the reference implementations in this field, and both are honest about their limits. MOSS's own documentation frames its output as a screening tool rather than a verdict, which is the correct framing and the one that step two above operationalizes.
The gap most courses run into is that peer similarity is only one question. You also want to know whether a submission matches something on GitHub or a tutorial site, and whether it reads like it was generated rather than written. Running three separate tools and reconciling three formats by hand is where most integrity workflows quietly collapse under their own administrative weight.
That consolidation is the case for a code plagiarism checker that runs peer matching, web and GitHub matching, and AI detection over the same submission set and reports them together. Codequiry does similarity at the token, AST and fingerprint level rather than raw text, which matters precisely at the refactoring boundary described in step four, and it combines those scores with an AI code detector so the report answers "where did this come from" and "who or what wrote it" in one pass. For courses, the code plagiarism checker for teachers path covers the dashboard and roster workflow; if you're weighing it against the tool you already run, there's a fair Codequiry vs MOSS comparison. None of it replaces steps one through seven. It just means you run them once instead of three times.
Frequently Asked Questions
Is a 90 percent code similarity score proof of plagiarism?
No. It's proof that two submissions share a lot of structure, which can come from a shared starter skeleton, an idiomatic solution, a common web source, or copying. The score tells you where to look. The classification in step four and the provenance in step five are what turn it into a finding.
How do I tell legitimate collaboration from copying?
Go back to the written policy from step one. If discussion was allowed but shared code was not, the question is whether the overlapping lines are code or commentary on code. If the match extends into the graded implementation, including its mistakes, collaboration has crossed into code sharing regardless of what the policy permitted.
Should I rescan after students submit late work?
Yes, and treat the late batch as part of the same peer set. A student who submits four days late is still comparable to the class, and rescanning the full set is the only way to catch a late submission that was written after reading a classmate's returned feedback.
If you want to run the whole framework against a sample cohort before committing to a threshold, a code plagiarism checker that reports peer, web and AI signals side by side is the fastest way to see where your own assignment's boilerplate ends and the real matches begin.