Copy-Paste Detector for 150+ Languages on JavaScript
summary
A JavaScript tool detects copy‑paste across files by tokenizing code (using CodeMirror for 150+ languages), filtering comments/noise, and hashing sliding windows of tokens with Rabin‑Karp substring hashing to find matches. It reports duplicate file/line snippets, integrates with CI systems (including Jenkins and XML/HTML reports), attributes lines via git blame, and is distributed as an npm package with ~200k downloads last year.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 3:38Copy-paste tools problems
- 6:08Robin-Karp for duplicates
- 8:55App architecture for search
- 11:43Token service for languages
- 13:51Using syntax parsers
- 16:25CodeMirror for 150+ languages
- 18:14Development status
- 20:26Usage stats and community
- 21:30Report features
- 23:00Future improvements
- 27:10Ignoring code blocks
related talks
25mAuto-Detection of Copied Code from StackOverflow
40mHow To (Semi-)Automate JavaScript Refactoring
43mJavaScript ❤ binary data
37mMachine Learning on Source Code
32mCan You Read Me? Creative JavaScript to Make Computer Science Fun
50mJavascript code formatting
40mRefactoring large JavaScript codebases
26mJavaScript Tools at Scale Using Type Information
