I was wondering how I can detect code plagiarism with Javascript. I want to test assignment submissions for homework I'm going to hand out.
I've looked at using MOSS, but—from what I've heard—it's pretty poor for anything other than C. Unfortunately, I can't test it yet because I don't have submissions.
How can I go about detecting code plagiarism with JavaScript?
I was wondering how I can detect code plagiarism with Javascript. I want to test assignment submissions for homework I'm going to hand out.
I've looked at using MOSS, but—from what I've heard—it's pretty poor for anything other than C. Unfortunately, I can't test it yet because I don't have submissions.
How can I go about detecting code plagiarism with JavaScript?
Share Improve this question edited Jan 21, 2017 at 22:45 user4639281 asked Apr 5, 2010 at 23:26 Alex CiminianAlex Ciminian 11.5k16 gold badges63 silver badges94 bronze badges 8- 4 How many students do you have? If it's less than 15, spend 3 minutes talking to each and you'll have rounded up the most suspicious. Then you can check chunks of code in Google. – Dan Rosenstark Commented Apr 5, 2010 at 23:29
- 1 Well, there are going to be more than a hundred submissions... Not all of them from my students (there's three of us teaching assistants), but I'm going to grade all of the assignments. The talk part's going to happen, but I need assistance in pointing out the prospective culprits :). – Alex Ciminian Commented Apr 5, 2010 at 23:34
- 1 to point out the prospective culprits, here are some guidelines: if they look up and away, rub their necks, or touch their ears, they are lying. southparkstudios.com/clips/224680 – Anurag Commented Apr 5, 2010 at 23:50
- 4 Don't Google the code, Google the problem. Then familiarize yourself with the top five solutions and check them against your students' work. That will probably catch 80-90% of the cheating, if it exists. – Robusto Commented Apr 5, 2010 at 23:53
- 1 @Alan, I was not interested in catching people who use open code as an inspiration, I just cross-checked their assignments for similarity so that they don't share their work. – Alex Ciminian Commented May 8, 2013 at 11:26
4 Answers
Reset to default 5They claim that MOSS works on Javascript. Why don't you just try it. Write a Javascript file, then modify it, like a cheater would modify somebody elses code and feed it to MOSS to see what it says?
I build Clone detection tools, that find similar blocks of code across files. See CloneDR overview and example reports. CloneDR works for a wide variety of languages, and uses the langauge structure to makethe clone detection efficient and effective.
As per yar's comment pasting chunks of javascript into Google will work pretty well - but is stopping them cheating realistic?
Could you split the task into two parts, the first part allowing them to 'cheat' if they want to but tell them that there will be a second part of the task in class. Then have the class do exactly the same task in supervised class time.
If everyone has 'cheated' first time that's one thing. But if anyone is unable to redo their homework in class then they a) cheated (which is bad enough) and b) learnt nothing (which is worse).
Using the internet to 'research' is always going to happen - but its the ones who forget their 'research' that are cheating both you and themselves.
I wouldn't go out of my way to try and run through a plagiarism checker.
Code is code and bad code is bad code. People who can't code (those who are more likely to copy/paste code**) generally don't have good code. Difficulties (and questionable approaches around them) will be easily detectable if you even take a few seconds to check the source. Something just won't match up and it should smack you in the face.
**I would argue that adapted code isn't plagiarized unless it violates the authors distribution intent (e.g. violates copyright or license) and would encourage the students to simply document which existing resources, if any, they used as a base and/or incorporated as well as to encourage them to understand and adapt the code to fit their needs (and to make it better, so much code out there is soup). I do this all the time for "real programming work". Of course, it's not my curriculum :-)