Detecting software similarity and plagiarism using Moss

From Knowledge Kitchen
Jump to navigation Jump to search


Moss is a software tool popular for detecting similarity in student computer programs. While no tool can tell you whether plagiarism has occurred, Moss, which is an acronym for Measure of Software Similarity, can help you automatically detect uncanny similarities in two sets of code and help you understand the degree of that similarity.

Instructions for use

To check student assignments for uncanny similarity or outright plagiarism, please do the following:

  1. Gain access to the Moss Perl script by either asking your professor or registering on the Moss web site
  2. Save the Perl script into a folder called "moss” in any *NIX computer, including any Mac
  3. For each assignment students submit, make a sub-folder named assignmentN, where N is the number of the assignment
  4. Dump all student code files into that folder. Make sure there are no subfolders - all the code files should be directly in the assignmentN folder.
  5. At the *NIX command line, change directories so you are in the "moss" folder and run the following command
    • replace 'python' and '.py' with whatever programming language you are working with:
      ./ -l python assignmentN/*.py
  6. The program will eventually output a URL to a web page where you can see the results of the software similarity analysis online
  7. Results on the auto-generated web page are ordered by degree of similarity - it shows you how many lines of code are similar and other statistics about the degree of similarity
  8. You can click any individual result to see the code similarity highlighted.
  9. Email your professor names/emails and the URL of their moss results web pages, for any students who appear to have suspiciously similar code to one-another
    • Judge this by how many lines of code are similar in both files - use your judgment. Code written independently is usually very low similarity

More advanced usage

Moss allows several options. To learn more advanced usage, read the usage instructions included as comments within the Perl script.

Supported languages

As of this writing, Moss can detect similarity in the following programming languages:

  • C
  • C++
  • Java
  • C#
  • Python
  • Visual Basic
  • Javascript
  • ML
  • Haskell
  • Lisp
  • Scheme
  • Pascal
  • Modula2
  • Ada
  • Perl
  • TCL
  • Matlab
  • VHDL
  • Verilog
  • Spice
  • MIPS assembly
  • a8086 assembly
  • a8086 assembly
  • HCL2

What links here