There is a plugin that allows you to use JPlag and MOSS as plagiarism plugins in Moodle Assignments.
https://moodle.org/plugins/view/plagiarism_programming
It needs some updating to get it working with more recent versions. I'm an advisory member on a grant application to get this updated and more widely used.