Skip to main content

Generating a Code Similarity Report

Code Similarity is available for courses with an Institutional license.

Code Similarity is a tool to help determine how similar students’ code is to each other. It does not automatically detect plagiarism but rather shows you how similar two programs are to one another within a single assignment. Code Similarity is only available for Programming Assignments and can be used with either an autograder or manual grading.


Generating a Code Similarity report

  1. To get started using Code Similarity, in the programming assignment, you will find a step called Review Similarity in the side panel menu.

    New Review Similarity step in the left sidebar
  2. On the Review Similarity page:
    1. Choose a programming language. This will compare student submissions across those file types and ignore the rest.
    2. (Optional) Upload starter code (or template files) so that similarity matches will ignore student code that matches those files.
    3. Select Generate Report.
How to choose a language, and upload starter code

Viewing Code Similarity Reports

Once the report has been generated, a list of students and their submitted files will be displayed, along with the other student whose submission was most similar to that file.

By default, the results will be sorted by the length of the code that was similar across the pair of submissions. This number is related to the number of tokens in the passages that were similar. A token is a single element of code, e.g. keywords, identifiers, operators, literals, etc.

Student-submitted files for a sample submission, each listed along with the file that's most similar to it

You can click on a student’s file to be taken to the similarity page where you see a comparison view of the file selected and its most similar matching file from another student in the course.

Student-submitted files for a sample submission, each listed along with the file that's most similar to it

In the right sidebar, you can jump to different matching blocks of code by using the numbered buttons. You can also see which students had the next most similar files.

Printing a student's similarity report

On a student's similarity report page, you can select Print Report to print a document containing the code and all highlighted areas where the two code files are similar.

Compatible programming languages

Though Programming Assignments and Code Autograder can process all programming languages, currently, Gradescope Code Similarity can only review the following languages for similarity:

C, C++, C#, F#, Go, Java, JavaScript, Matlab, MIPS, ML, Python, and R.

Was this article helpful?
1 out of 1 found this helpful

Articles in this section

Powered by Zendesk