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
- To get started using Code Similarity, in the programming assignment, you will find a step called Review Similarity in the side panel menu.
- On the Review Similarity page:
- Choose a programming language. This will compare student submissions across those file types and ignore the rest.
- (Optional) Upload starter code (or template files) so that similarity matches will ignore student code that matches those files.
- Select Generate Report.
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.
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.
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.