Cheating detection script The pandemics has incredibly increased the number of cheating cases. Do you know of any script (bash or other scripting language) for checking a bunch of Java code submissions for similarity? I know I could use diff, but it would be hard to detect similarity.
Take a look at MOSS from Stanford (https://theory.stanford.edu/~aiken/moss). It is an easy to use free web service that compares files and reports similarities. You set up a free account and submit a request and what is returned is a URL to a report showing the similarities of various files.
I have found that the easiest way to do this is to submit a .tar file structured at the first level as a series of sub directories, each identifying a single student (name, studentID, etc). Beneath each student directory are the file(s) they have submitted. These commonly have exactly the same names as the assignment typically specifies the class names of the Java classes.
For small assignments, you will get a high correlation between students as there is only so much variation possible, but you can look at the &quot;most similar&quot; and get a good feel for whether cheating is likely to have taken place. Depending on how the students actually submit their programs, it may be easy to write a script that automates the process. I'm happy to share details with anyone