Skip to content
programavimas.xyz docs

Similarity

How accepted student solutions are compared, where similarity is shown, how to read the list of similar pairs and the side-by-side comparison.

The app automatically compares each accepted solution with other students’ solutions of the same problem. Only course staff see similarity; students never see it anywhere.

  • Only accepted solutions are compared: each with other students’ accepted solutions of the same problem in the same programming language, across all courses.
  • Only C++, Python and C# solutions are compared; solutions in other languages are not checked.
  • Before comparing, comments, whitespace and formatting are dropped, variable and function names are normalised, and lines every solution shares (such as #include, using namespace std; or C#’s using System;) are skipped. Renamed variables or reordered functions therefore don’t hide similarity.
  • Very short programs (roughly under 10 lines) are not compared; they show “Too short to compare”.
  • Similarity runs from 0 to 100 %. For each solution, up to 20 of the most similar solutions with at least 50 % similarity are kept.
  • The check runs in the background shortly after a solution is accepted.
  • Similarity checks are off for some problems imported from the old system (as they were set there).

Every submission panel has a Similarity section. It shows one of these states:

State Meaning
Only accepted solutions are checked The submission was not accepted
Not checked yet The check hasn’t run yet
Too short to compare The program is too short
Similarity checks are off for this problem Checks are off for the problem
Solutions in this language are not checked Not C++, Python or C#
The check failed An error occurred
No similar solutions No solution is at least 50 % similar
Highest similarity N % Similar solutions were found

It also says how many other students’ solutions it was compared with, and lists the most similar solutions with their similarity and date. When you can see the other student, their name and course are shown with Compare with …’s solution and Open submission. Otherwise it says “A student in another course” or “A student outside your groups”, with no name and no links.

The Similarity page (/teaching/<course>/similarity) lists pairs of this course’s students whose solutions are similar. Only pairs where you can see both students are included.

  • Similarity from: 50, 60, 70, 80 (the default) or 90 %.
  • Problem: all problems or one.
  • Pairs are grouped by problem, with the number of pairs per problem. Each row shows the two students, how many of their solution pairs are similar (when more than one), the highest similarity (80 % and above is highlighted) and the date of the newest solution.
  • When all problems are listed, each shows its most similar pairs and a Show all N pairs link.
  • Up to 2000 of the most similar pairs of solutions are shown.

At the top is the state of the course’s checks: Checked, Too short, Checks off, Waiting.

Selecting a pair opens the Comparison: both solutions side by side.

  • The header shows the similarity and the programming language.
  • Matching lines are highlighted (ignoring names, comments and formatting) and listed as text; each solution shows how much of it matches.
  • Open submission opens the submission on the Submissions page; All similar solutions goes back to the list.

You can compare only when you can see both students and both solutions are still accepted. Otherwise it says “These solutions can’t be compared.”