views:

281

answers:

4

I was wondering if there was any tool available that detects code plagiarism and works well with Javascript. I want to test assignment submissions for homework I'm going to hand out.

The only tool that I know of that can do this is MOSS, but, from what I've heard, it's pretty poor for anything else than C. Unfortunately, I can't test it yet because I don't have submissions :).

Update

I ended up using MOSS in the end, because I couldn't find an alternative. There were more than 100 submissions and it found no more than 30% similarity between any two assignments.

I don't know if this was because there were no cheaters or because it's poor at checking Javascript :).

+1  A: 

They 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?

Strelok
A: 

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.

amelvin
It sounds like this is a teaching assistant, not a teacher, so changes to the lesson plan are probably unfeasible.
tloflin
I think they want to detect plagiarism in a sense of one student copying the other. Not if they copied code from Google.
Strelok
@tloflin - that's a good point, I was trying to establish a baseline to measure 'cheating' against - but a different baseline may be needed.
amelvin
@strelokstrelok - I was trying to point out that learning / researching / cheating are all different sides of some oddly shaped coin.
amelvin
+2  A: 

Hi. 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.

If you are talking about student programs of modest size, (say 1000 lines), I'd be happy to provide you with one of these for JavaScript.

-- IDB

Ira Baxter
That sounds really interesting. The programs will be under 1000 lines, I'll drop you a line when I have some 'test material' :). Thanks!!
Alex Ciminian
+1  A: 

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 :-)

pst
From my (limited) experience, the majority of plagiarism attempts at my school are between students (i.e. one does the homework and gives it to others that modify it), not from the Web. If they want to use open source code to help them in their assignment they are free to do so.
Alex Ciminian