Freedom251 › Code Clone Detection Tools
copydetect

What copydetect is
copydetect compares code directories and creates an HTML report highlighting matching code slices. It uses Winnowing document fingerprinting, an approach also used by MOSS, and Pygments tokenization to cover 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 adjust matching and what appears in reports. Install it with pip; it requires Python 3.7 or later. The command-line tool recursively searches supplied directories, while its 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. Configuration can be supplied through command-line arguments or JSON. The package is MIT-licensed and classified for Education with Beta development status. Its documentation cautions that it may not catch plagiarism designed to evade detection and that a match does not establish that plagiarism occurred.
Who it suits
It suits educators or developers who want to compare submitted code directories against reference code. It requires Python 3.7 or later and is classified as a Beta project.
What it does well
- Supports Pygments-tokenized coverage of 500+ languages
- Can compare submissions with reference directories
- Boilerplate directories can be excluded from matches
- Thresholds tune detection and report visibility
- Offers both command-line use and a Python API
What to know first
- May miss plagiarism designed to evade detection
- A match does not prove plagiarism occurred
- Requires Python 3.7 or greater
- Classified as Beta development status
Getting started
- Open the copydetect GitHub project.
- Install the package with pip; Python 3.7 or greater is required.
- Run copydetect -t DIRS, which recursively searches supplied directories and compares files.
- Add reference directories for comparison with prior submissions, if needed.
- Supply boilerplate directories to exclude provided code from matches.
- Adjust thresholds or configuration, then save and review the HTML report.
Overview
Copydetect is a Python tool for comparing code directories and producing HTML reports that highlight matching slices. It is best suited to educators and developers who need configurable, repository-level comparisons; its findings are prompts for review, not proof of copying.
Its MIT license and free plan make it an accessible option for self-managed checks. The trade-off is that users must run and interpret the tool themselves, and deliberate attempts to evade detection may escape it.
Key features
Copydetect uses Winnowing document fingerprinting, an approach also used by MOSS, and Pygments tokenization. That means it can process the 500+ languages Pygments can detect and tokenize, a useful range for mixed-language coursework or repositories. Tokenization does not make a match conclusive: similarities still need context and human judgment.
The command line recursively compares files in supplied directories; a basic invocation is copydetect -t DIRS. Separate reference directories allow comparisons with earlier submissions, while boilerplate directories exclude shared code from matches. Those options suit course reviews where prior work or starter files matter.
Filtering normalizes variables, function names, object names, and strings to token markers, reducing the influence of those surface differences. Noise, guarantee, and display thresholds adjust what is detected and shown. Settings can be supplied as command-line arguments or in a JSON configuration file, making configurations reusable. Reports can be saved to a chosen path, highlighted code can be truncated, and custom CSS can be linked.
A Python API offers CopyDetector, CodeFingerprint, compare_files, and HTML report generation, so it can fit scripted workflows. Installation uses pip and requires Python 3.7 or later. The package is classified as Python 3-only and operating-system independent; it supports API, Linux, macOS, Windows, and self-hosted use. It has no CI or IDE integration. The project is marked Beta, so teams seeking a mature, integrated workflow may prefer another tool.
Pricing
Copydetect is free, with a free plan and no free trial. There are no paid tiers or plan trade-offs described here; users give up a hosted subscription experience and instead install the package and manage their own comparisons. Its MIT license permits use under the license terms.
Platforms
Copydetect is available for Linux, macOS, and Windows, and can be self-hosted or used through its API. Its Python 3 requirement and pip installation make it a fit for environments that can run Python 3.7 or newer, rather than users looking for a standalone desktop application.
Who it's for
Educators comparing submissions, especially against prior work or shared boilerplate, are the clearest fit. Developers who want repository-level similarity checks and the option to script report generation may also find it useful. It is less suitable where a team needs CI or IDE integration, or where a similarity score must serve as definitive evidence: the tool cannot guarantee detection of evasion or prove plagiarism occurred.
Pros and cons
- Pros: Broad tokenization coverage through Pygments supports more than 500 languages, useful for diverse code collections.
- Pros: Reference and boilerplate directories help distinguish relevant overlap from earlier submissions and shared starter code.
- Pros: Threshold controls, JSON configuration, a Python API, and customizable HTML reports give technical users ways to adapt comparisons and output.
- Cons: Results indicate likely plagiarism rather than establish it, so human review remains essential.
- Cons: The project warns that deliberate evasion may go undetected, limiting its value as a sole safeguard.
- Cons: There is no CI or IDE integration, and Beta status may deter teams seeking a more integrated, settled workflow.
Alternatives
Code Clone Detection Tools is the broader category directory for readers who want to compare more options.
Consider Duplo if you want free software under GNU GPL v2 or later with prebuilt binaries for Alpine Linux, macOS, and Windows. Hound is another free option, with API, Linux, macOS, self-hosted, and web availability. Choose PMD if a free, downloadable static code analyzer under a BSD-style license better suits your needs.
CloneWorks is free, but use requires acknowledgement and redistribution and derivatives must remain free of charge under its license. dcd is free under AGPL-3.0, with a separate priority direct-email support plan whose price is custom pricing. jscpd is a free alternative. Simian Similarity Analyzer is another free option, under Apache License 2.0. NiCad is free and MIT-licensed, but requires OpenTxl 11 or later.
Verdict
Choose copydetect if you need a free, self-managed way to compare repositories, account for reference and boilerplate code, and generate configurable reports across a wide range of languages. Its strongest case is that combination of adjustable matching and flexible output; look elsewhere if you need CI or IDE integration, or if you need results that can stand as proof rather than an investigative lead.
Verdict
copydetect offers configurable directory comparisons and HTML reports for code review, including reference and boilerplate options. Treat matches as indicators rather than proof, and note that deliberate evasion may go undetected.
Questions
How much does copydetect cost?
The pricing model is free, and a Free plan is listed.
What operating systems and environments does it support?
It is listed for Linux, macOS, Windows, API use, and self-hosted use. PyPI classifies it as operating-system independent and Python 3 only.
Which programming languages can it compare?
It uses Pygments tokenization and supports the 500-plus languages Pygments can detect and tokenize.
Can it compare submissions with reference code?
Yes. You can supply reference directories, including previous submissions, and boilerplate directories to exclude provided code from matches.
How is copydetect licensed?
The package is released under the MIT License.
Does a match prove plagiarism?
No. The project says copydetect identifies likely plagiarism, may not catch dedicated evasion, and cannot guarantee that plagiarism occurred.
Facts from copydetect's own pages
- Audience
- The package lists Education as its intended audience. · pypi.org, 2 Oct 2026
- Command line
- The simplest command-line usage is copydetect -t DIRS, which recursively searches supplied directories and compares files. · github.com, 1 Oct 2026
- Comparison options
- Users can compare test directories with reference directories and exclude matches found in boilerplate directories. · github.com, 2 Oct 2026
- Configuration
- Settings can be supplied through command-line arguments or a JSON configuration file. · github.com, 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, 1 Oct 2026
- Detection method
- It uses the Winnowing document-fingerprinting approach used by the MOSS platform. · copydetect.readthedocs.io, 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, 1 Oct 2026
- Installation
- The project documents installation with pip and requires Python 3.7 or later. · github.com, 2 Oct 2026
- Language coverage
- Pygments tokenization gives copydetect support for all 500+ languages that Pygments can detect and tokenize. · copydetect.readthedocs.io, 1 Oct 2026
- Language support
- It uses Pygments for tokenization and supports the 500+ languages Pygments can detect and tokenize. · github.com, 2 Oct 2026
- License
- Copydetect is released under the MIT License. · github.com, 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, 2 Oct 2026
- Method
- It is based on the Winnowing document fingerprinting approach, also used by MOSS. · github.com, 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, 1 Oct 2026
- Platforms
- The package is classified as operating-system independent and provides a Windows command entry point. · pypi.org, 2 Oct 2026
- Platform support
- PyPI classifies the package as operating-system independent and Python 3 only. · pypi.org, 1 Oct 2026
- Purpose
- Copydetect detects likely code plagiarism by comparing code directories and generating an HTML report that displays copied slices. · github.com, 2 Oct 2026
- Python API
- Copydetect can also be run through a Python API that generates an HTML report. · github.com, 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, 1 Oct 2026
- Release
- PyPI lists version 0.5.0, released March 9, 2024. · pypi.org, 2 Oct 2026
- Sensitivity controls
- Noise, guarantee, and display thresholds tune what matching code is detected and shown in reports. · github.com, 1 Oct 2026
- Tuning
- Noise, guarantee, and display thresholds can be configured to adjust matching and report visibility. · github.com, 2 Oct 2026
Where copydetect stands on Freedom251
- Code Clone Detection Tools#4 of 23