- Home
- Code Clone Detection Tools
- copydetect
copydetect
What it is
copydetect is a free tool that compares code directories and produces an HTML report highlighting matching code slices. It uses Winnowing document fingerprinting and Pygments tokenization, which covers the 500-plus languages Pygments can detect and tokenize. You can compare test directories with reference code, such as previous submissions, and exclude boilerplate directories from matches. Noise, guarantee, and display thresholds let users adjust matching and report visibility. Install copydetect with pip; it requires Python 3.7 or later. Its command-line tool recursively searches supplied directories, while a Python API supports comparisons and HTML report generation. Reports can be saved to a chosen path, highlighted code can be truncated, and custom CSS can be linked. Settings can be passed through command-line arguments or a JSON configuration file. The package is MIT-licensed and classified for Education, with Beta development status. Its documentation cautions that the tool may not catch plagiarism designed to evade detection and that a match does not prove plagiarism occurred.
For and against
For
- Tokenizes 500-plus languages supported by Pygments.
- Can compare against reference directories.
- Boilerplate directories can be excluded from matches.
- Offers command-line and Python API access.
- Free and MIT-licensed.
Against
- Requires Python 3.7 or later.
- Classified as a Beta project.
- May not catch plagiarism designed to evade detection.
- Matches do not prove plagiarism occurred.
The verdict
copydetect provides configurable code-directory comparisons and HTML reports, with command-line and Python API options. Treat its results as indicators rather than proof, and note the project’s stated evasion limitation.
Who it suits
copydetect may suit educators or developers who need to compare code submissions with reference or boilerplate directories. It is also suitable for users who want a command-line tool or Python API for generating reports.
On the record
- Audience
- The package lists Education as its intended audience.pypi.org · read 2 Oct 2026
- Command line
- The simplest command-line usage is copydetect -t DIRS, which recursively searches supplied directories and compares files.github.com · read 1 Oct 2026
- Comparison options
- Users can compare test directories with reference directories and exclude matches found in boilerplate directories.github.com · read 2 Oct 2026
- Configuration
- Settings can be supplied through command-line arguments or a JSON configuration file.github.com · read 2 Oct 2026
- Detection limitation
- The documentation says copydetect identifies likely plagiarism, is not guaranteed to catch dedicated evasion, and does not prove plagiarism occurred.copydetect.readthedocs.io · read 1 Oct 2026
- Detection method
- It uses the Winnowing document-fingerprinting approach used by the MOSS platform.copydetect.readthedocs.io · read 1 Oct 2026
- Filtering
- Tokenization and filtering replace variable names with V, function names with F, object names with O, and strings with S.copydetect.readthedocs.io · read 1 Oct 2026
- Installation
- The project documents installation with pip and requires Python 3.7 or later.github.com · read 2 Oct 2026
- Language coverage
- Pygments tokenization gives copydetect support for all 500+ languages that Pygments can detect and tokenize.copydetect.readthedocs.io · read 1 Oct 2026
- Language support
- It uses Pygments for tokenization and supports the 500+ languages Pygments can detect and tokenize.github.com · read 2 Oct 2026
- License
- Copydetect is released under the MIT License.github.com · read 2 Oct 2026
- Limitations
- The project says it is not guaranteed to catch plagiarism designed to evade detection and cannot guarantee that plagiarism occurred.github.com · read 2 Oct 2026
- Method
- It is based on the Winnowing document fingerprinting approach, also used by MOSS.github.com · read 2 Oct 2026
- Output customization
- Reports can be saved to a specified output path, highlighted code can be truncated, and custom CSS files can be linked.github.com · read 1 Oct 2026
- Platform support
- PyPI classifies the package as operating-system independent and Python 3 only.pypi.org · read 1 Oct 2026
- Purpose
- Copydetect detects likely code plagiarism by comparing code directories and generating an HTML report that displays copied slices.github.com · read 2 Oct 2026
- Python API
- Copydetect can also be run through a Python API that generates an HTML report.github.com · read 2 Oct 2026
- Reference code
- Separate reference directories can be supplied, including previous submissions, and boilerplate directories can exclude provided code from plagiarism matches.github.com · read 1 Oct 2026