简体   繁体   English

使用JavaScript检查代码抄袭

[英]Checking for code plagiarism with JavaScript

I was wondering how I can detect code plagiarism with Javascript. 我想知道如何用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. 我已经看过使用MOSS ,但是 - 从我所听到的 - 除了C之外的其他任何东西都很差。不幸的是,我还没有测试它,因为我没有提交。

How can I go about detecting code plagiarism with JavaScript? 我怎样才能用JavaScript检测代码剽窃?

They claim that MOSS works on Javascript. 他们声称MOSS适用于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? 写一个Javascript文件,然后修改它,就像一个骗子会修改一些elses代码并将它提供给MOSS看看它说的是什么?

I build Clone detection tools, that find similar blocks of code across files. 我构建了克隆检测工具,可以在文件中找到类似的代码块。 See CloneDR overview and example reports. 请参阅CloneDR概述和示例报告。 CloneDR works for a wide variety of languages, and uses the langauge structure to makethe clone detection efficient and effective. CloneDR适用于各种语言,并使用语言结构使克隆检测高效且有效。

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 (eg 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 :-) 当然,这不是我的课程:-)

As per yar's comment pasting chunks of javascript into Google will work pretty well - but is stopping them cheating realistic? 根据yar的评论,将junk的junk粘贴到谷歌中的效果会很好 - 但是却阻止他们欺骗现实吗?

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). 但如果有人无法在课堂上重做作业,那么他们a)被骗(这已经够糟糕了)和b)什么都没学到(哪个更糟)。

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. 使用互联网进行“研究”总是会发生 - 但是那些忘记他们“研究”的人会欺骗你和他们自己。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM