Check student code for similar work, and see how it was built
When a class is set a coding task, the question a moderator asks first is whether the work is the student’s own. A Similarity tab on the task answers two smaller questions with evidence: whose programs have the same shape as each other’s, and whether one student’s code grew the way something being worked out grows.
It is evidence for a conversation and never a verdict. Two honest answers to a small exercise can look alike, and a student can have a good reason for what they wrote. The tab says so first, its wording is “similar to” and never “copied”, and nothing on it is shown to a student.
Finding similar programs
Open a code task, choose Similarity and press Run the check. It compares every student’s saved copy with every other’s by the shape of the program rather than its words, so renamed variables, different spacing and rewritten comments do not hide a shared structure. Your own starter code is taken out first, and so is anything most of a larger class has in common, so a class is not alike just for sharing the starter.
Pairs are listed best first, with how much of the shorter program is in the other. Open a pair to see both copies side by side with the matching lines shaded in each. You can also compare with earlier uses of the same task in other modules of your college that you teach; those are found by the task’s name, so a copy made by renaming it can be missed.
It works on Python, Java, Go, C, C++, C#, OCaml, Ruby, PHP, Rust, Kotlin, JavaScript, TypeScript, Bash, web pages and SQL, and not on a quiz, a set of words, a lab or a task done in groups, whose one shared copy is not several people’s work. Only somebody who teaches the module, a college administrator or a sysadmin sees the tab.
How one student’s code was built
Pasting is switched off in a set task, so the question that is left is whether somebody built the code or typed out something finished. Press How was it built? beside a student. It reads the versions their copy was saved in, every autosave being one, and reports how big the first save was, the biggest single save, how many saves only added at the end and how many took something back, the longest pause and the typing rate, with a chart of the file’s size over time.
Then it says which of five it looks like: too little to say, arrived almost whole, arrived in a few large steps, typed out in order with nothing tried and taken back, or built up with things tried, changed and taken back, and why. Code that grows in one steady run, only ever at the end, with almost nothing deleted, is what typing out a finished program looks like. Short and simple programs can look that way honestly, which is why it is a reading and not a rule. None of this needs AI.
With AI
Where AI is switched on for your college, and you have credits left, Ask AI too adds a model’s reading of the same numbers and of the largest additions. It is told no name, address or college, is told what a natural build looks like as well as what copying looks like, and is asked to say “unclear” when it cannot tell. It answers with what it sees and up to three questions you could put to the student about how they worked. It runs on a model hosted in the UK and is spent from your own credits, as marking help is. It is advice for you to weigh and changes nothing.
Questions people ask
- Will a student be told?
- Not by this. Nothing on the tab is shown to a student or written to their record. What is recorded is your own act, in the administration log: running a check, opening two copies side by side and asking how one was built.
- Can it tell me somebody cheated?
- No, and it does not try to. It tells you what is alike and how the work arrived, and what to ask. A student who types steadily and deletes nothing looks the same whether they built it or copied it down, which is why the answer is a conversation with them.
- How far back can it look?
- As far as the saved versions go. Each is kept by the storage, and a long history is read from its largest steps and an even spread of the rest, so the oldest saves may be out of view.