Freedom251 › Code Duplication Detection Tools
dcd

What dcd is
dcd is a free duplicate code detector for Linux and macOS that scans a repository for repeated code. Its language-aware parsing via scc covers 250+ languages. For similar but non-identical lines, the --fuzz option uses simhash distance, with values from 0 to 255. Gap tolerance can bridge inserted, deleted, or modified lines in otherwise matching blocks, while hole tolerance permits modified lines within a duplicate diagonal match. The --file option compares one file with the rest of the codebase. Results can be shown as PBM scatter plots or self-contained interactive HTML reports with file heatmaps and scatter plots, or emitted as structured JSON for tools and CI pipelines. dcd supports .ignore files with .gitignore-style syntax and can skip marked code blocks. Users with Go 1.19 or newer can install it with go install. The project is licensed under GNU Affero General Public License 3.0. Release 1.1.0 removed Windows support; Windows users are directed to WSL. Commercial users can purchase a year's priority email support, with no price listed.
Who it suits
dcd suits developers looking for duplicate code across repositories, including teams that need structured output for CI pipelines. It is available on Linux and macOS; Windows users are directed to WSL.
What it does well
- Free under the GNU Affero General Public License 3.0.
- Language-aware parsing covers 250+ languages.
- Fuzzy matching can find similar, non-identical lines.
- JSON output supports tools and CI pipelines.
- Interactive reports include file heatmaps and scatter plots.
What to know first
- Windows support was removed in release 1.1.0.
- Priority support has no listed price.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| dcd | AGPL-3.0 open-source license | Free |
| Priority support | a years worth · priority direct email support from the developer | On request |
As github.com lists them, read 30 Sept 2026. The maker's own page has the final word.
dcd is a free duplicate-code detector for repository scans, best suited to developers who want adjustable matching and output they can use in review or CI. Its main trade-off is straightforward: useful depth for Linux and macOS teams, but no native Windows support in release 1.1.0.
Overview
dcd compares code using a text-based clone-detection method and supports language-aware parsing through scc for more than 250 languages. That breadth makes it relevant to projects spanning many programming languages, while the text-based approach is a better fit for teams looking for repeated code than for a general-purpose static analysis tool.
The project is free under the GNU Affero General Public License 3.0 and can be installed with Go 1.19 or newer. It is self-hosted, with repository scanning and CI integration, but no IDE integration. Commercial users can also buy a year of priority direct email support from the developer; the price is custom pricing.
Key features
dcd offers several controls for matching code that has changed rather than simply copied. The --fuzz option uses simhash distance to compare similar, non-identical lines, with values from 0 to 255. Teams can tune how much variation to accept, though that flexibility requires choosing a threshold that fits the codebase.
--gap-tolerance bridges inserted, deleted, or modified lines within otherwise matching blocks, while --max-hole-size allows modified lines inside a duplicate diagonal match. These settings are useful when edits obscure copied code; they also make dcd a more configurable choice than a tool limited to strict matches. For a focused investigation, --file compares one file with the rest of the codebase.
For visual review, dcd generates PBM scatter plots and self-contained interactive HTML reports with file heatmaps and scatter plots. The --format json option produces structured output for other tools and CI pipelines, which makes it practical to incorporate duplicate checks into automated workflows. Ignore files follow .gitignore syntax, and marked code blocks can also be excluded to keep unwanted sections out of comparisons.
Pricing
| Plan | Price | What it includes | Best for |
|---|---|---|---|
| dcd | free | Free software under the AGPL-3.0 open-source license | Individuals and teams able to use the open-source project under its license |
| Priority support | Custom pricing | A year's priority direct email support from the developer | Commercial users who want direct support |
The core tool has no paid tier or usage quota stated. The support option is separate from the free software, and its price is custom pricing.
Platforms
dcd supports Linux and macOS. Release 1.1.0 removed Windows support for full filesystem compatibility and directs Windows users to WSL, so organizations requiring a native Windows application should choose another tool.
Who it's for
dcd suits developers and engineering teams that want repository-level duplicate detection, control over near-match behavior, and reports that can feed CI or other tools. Its free, self-hosted model is especially practical for teams comfortable installing software with Go and operating within the AGPL-3.0 license. It is less suitable for users who depend on IDE integration or need native Windows support.
Pros and cons
- Pros: Fuzzy matching, gap tolerance, and hole tolerance provide several ways to find duplication despite edits.
- Pros: JSON output and CI integration suit automated checks, while interactive HTML and PBM reports support visual inspection.
- Pros: Free use and parsing coverage for 250+ languages make it a broadly applicable option for Linux and macOS repositories.
- Cons: Windows users are directed to WSL rather than supported natively.
- Cons: There is no IDE integration, so developers seeking duplication feedback inside an editor will need another workflow.
- Cons: The AGPL-3.0 license may not fit every organization’s licensing requirements.
Alternatives
Code Clone Detection Tools is the broader category directory for comparing options. Consider Duplo if Windows support and prebuilt binaries for Alpine Linux, macOS, and Windows matter more than dcd's stated feature set. PMD is another free option, distributed as a downloadable static code analyzer under a BSD-style license. NiCad may suit readers who prefer MIT-licensed software and can meet its OpenTxl 11 or later requirement.
Algo VPN, CloneWorks, jscpd, Simian Similarity Analyzer, and CCFinderSW are additional alternatives.
Verdict
Choose dcd if you need a free, self-hosted duplicate-code detector for Linux or macOS and value adjustable near-match detection, visual reports, and CI-ready JSON. Look elsewhere if you require native Windows support, IDE integration, or a license other than AGPL-3.0.
Verdict
dcd offers several ways to detect, inspect, and export duplicate-code matches, including fuzzy matching and CI-oriented JSON. Check the platform limitation before choosing it if your environment is Windows.
Facts from dcd's own pages
- Commercial support
- Commercial users can purchase a year's priority support entitlement for direct email support from the developer. · github.com, 30 Sept 2026
- Fuzzy matching
- The --fuzz option uses simhash distance to match similar but non-identical lines, with values from 0 to 255. · github.com, 30 Sept 2026
- Gap tolerance
- The --gap-tolerance option bridges inserted, deleted, or modified lines in otherwise matching duplicate blocks. · github.com, 30 Sept 2026
- Hole tolerance
- The --max-hole-size option allows modified lines within a duplicate diagonal match. · github.com, 30 Sept 2026
- Ignore support
- dcd supports .ignore files using the same syntax as .gitignore files and can ignore marked code blocks. · github.com, 30 Sept 2026
- Installation
- Users with Go 1.19 or newer can install dcd with go install github.com/boyter/dcd@latest. · github.com, 30 Sept 2026
- Language coverage
- The comparison table says dcd provides language-aware parsing via scc for 250+ languages. · github.com, 30 Sept 2026
- License
- The project is licensed under the GNU Affero General Public License 3.0. · github.com, 30 Sept 2026
- Maker background
- Ben Boyter describes himself as a professional software engineer with more than 15 years of development experience focused on testing. · boyter.org, 30 Sept 2026
- Purpose
- dcd is a duplicate code detector designed to identify duplicate code within a project. · github.com, 30 Sept 2026
- Release limitation
- Release 1.1.0 removed Windows support for full filesystem compatibility and directs Windows users to WSL. · github.com, 30 Sept 2026
- Single-file comparison
- The --file option compares one file against the rest of the codebase. · github.com, 30 Sept 2026
- Structured output
- The --format json option produces structured JSON output for integration with other tools or CI pipelines. · github.com, 30 Sept 2026
- Visualizations
- dcd can generate PBM scatter plots and self-contained interactive HTML reports with file heatmaps and scatter plots. · github.com, 30 Sept 2026
Where dcd stands on Freedom251
- Code Duplication Detection Tools#4 of 18
- Code Clone Detection Tools#9 of 23