使用 JavaScript 检查代码是否抄袭

发布于 2024-08-28 07:04:53 字数 230 浏览 4 评论 0原文

我想知道如何使用 Javascript 检测代码抄袭。我想测试我要分发的作业提交。

我已经考虑过使用 MOSS,但是,据我所知,它是除了 C 之外,其他方面都很差。不幸的是,我还无法测试它,因为我没有提交。

如何检测 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

爱的那么颓废 2024-09-04 07:04:53

他们声称 MOSS 可在 Javascript 上运行。你为什么不尝试一下呢?编写一个 Javascript 文件,然后修改它,就像作弊者修改别人的代码并将其提供给 MOSS 看看它说了什么一样?

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?

々眼睛长脚气 2024-09-04 07:04:53

我构建了克隆检测工具,可以跨文件查找相似的代码块。
请参阅 CloneDR 概述
和示例报告。 CloneDR 适用于多种语言,并使用
语言结构使克隆检测高效有效。

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.

避讳 2024-09-04 07:04:53

根据 yar 的评论,将 javascript 块粘贴到 Google 中会很好地工作 - 但阻止他们作弊现实吗?

你能否将任务分成两部分,第一部分允许他们“作弊”(如果他们愿意),但告诉他们课堂上会有任务的第二部分。然后让全班在监督课堂时间完成完全相同的任务。

如果每个人都第一次“作弊”,那是一回事。但是,如果有人无法在课堂上重做作业,那么他们a)作弊(这已经够糟糕了)并且b)什么也没学到(这更糟糕)。

利用互联网进行“研究”总是会发生,但那些忘记“研究”的人正在欺骗你和他们自己。

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.

落叶缤纷 2024-09-04 07:04:53

我不会特意尝试通过抄袭检查器。

代码就是代码,坏代码就是坏代码。 不会编码的人(那些谁更有可能复制/粘贴代码**)通常没有好的代码。如果您花几秒钟检查源代码,困难(以及围绕它们的可疑方法)将很容易被发现。有些东西就是不匹配,它应该打在你脸上。

**我认为改编的代码不是抄袭,除非它违反了作者的分发意图(例如违反版权或许可),并且鼓励学生简单地记录他们用作基础和/或合并的现有资源(如果有)以及鼓励他们理解和调整代码以满足他们的需求(并使其变得更好,有这么多代码)。我一直这样做是为了“真正的编程工作”。当然,这不是我的课程:-)

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文