FREEDOM251

Freedom251 › Code Clone Detection Tools

Duplo

Free plan LinuxMacWindows

Visit Duplo Alternatives Pricing

Duplo's own site

What Duplo is

Duplo is free software for locating repeated source-code blocks in large codebases. It supports C/C++, Java, C#, VB, GCC assembly, Ada, Erlang, TypeScript, and Swift, and can also scan arbitrary text files, including for repetitions within one file. For supported languages, it can filter comments, preprocessor directives, and other syntax before comparing blocks. Inputs can come from standard input or a separate file list. Reports are available as text, JSON, or XML; the project describes XML output as useful with continuous-integration systems such as GitHub Actions and TeamCity. A linked GitHub Actions extension can fail a build when it finds duplicates, with settings for minimum duplicate lines, minimum line length, and maximum reported files. Prebuilt binaries are available for Alpine Linux, macOS, and Windows, and the project can be built from source. Duplo is licensed under GNU GPL version 2 or later, with no warranty, including implied warranties of merchantability or fitness for a particular purpose.

Who it suits

Duplo suits developers and teams looking for duplicate code blocks across repositories or text files. Its reports and linked GitHub Actions extension may suit projects that want duplication checks in a continuous-integration workflow.

What it does well

  • Supports ten named programming languages.
  • Can scan arbitrary text files and single-file duplicates.
  • Outputs text, JSON, and XML reports.
  • Prebuilt binaries cover Alpine Linux, macOS, and Windows.

What to know first

  • License disclaims warranties, including implied warranties.
  • Quick-start example requires at least 20 duplicate lines.

Limits

The free plan costs nothing. The README quick-start example requires at least 20 lines for a duplicate, though command-line options can be adjusted.

Plans

PlanBilled and limitsPrice
DuploFree software under GNU GPL v2 or later · prebuilt binaries for Alpine Linux, macOS and WindowsFree

As github.com lists them, read 29 Sept 2026. The maker's own page has the final word.

Getting started

  1. Open the Duplo GitHub project page.
  2. Download a prebuilt binary for Alpine Linux, macOS, or Windows, or build from source.
  3. Provide files directly, through standard input, or with a separate file list.
  4. Adjust command-line options such as the minimum duplicate length if needed.
  5. Run a scan and review its text, JSON, or XML report.

Duplo is a free, self-hosted tool for finding repeated code blocks in large repositories, best suited to developers who want a focused duplicate scan in a local or CI workflow. Its language-aware filtering and multiple report formats are useful strengths, but the quick-start threshold and GPL license terms deserve consideration before adoption.

Overview

Duplo uses text-based clone detection to scan repositories, including arbitrary text files and repetitions within a single file. Inputs can come through standard input or a separate file list, giving scripted workflows a straightforward way to define what gets scanned. It focuses on duplication rather than broader code-quality analysis, so it is a poor fit for teams seeking a general static analyzer.

For supported languages, it can remove comments, preprocessor directives, and other syntax before checking for duplicate blocks. That filtering can help distinguish repeated code from incidental textual matches. The quick-start example requires at least 20 lines for a match, though command-line options can change the threshold; teams looking for shorter clones should tune it, while a lower threshold may bring more noise.

Key features

Language-aware scans and reports

Built-in support covers C/C++, Java, C#, VB, GCC assembly, Ada, Erlang, TypeScript, and Swift, with arbitrary text files as an additional target. Text, JSON, and XML output provide options for direct review or downstream processing. XML is described for use with CI tools such as GitHub Actions and TeamCity.

Build integration and performance

A linked GitHub Action can fail a build when duplicate blocks are found. Its configurable minimum duplicate-line count, minimum line length, and maximum files to report help teams balance detection against noisy or oversized reports. The README reports a scan of Quake2's 266 files and 102,740 lines taking 9 seconds on modern hardware in 2025, and says multithreading can improve performance almost linearly. That example is encouraging, but it is not a performance guarantee for other repositories or machines.

Pre-built binaries are available for Alpine Linux, macOS, and Windows, and Duplo can also be built from source. The README directs feedback, feature requests, and bug reports to an issue tracker. The project is free software under GNU GPL version 2 or, at the user's option, any later version, and is provided without warranty, including implied warranties of merchantability or fitness for a particular purpose.

Pricing

Duplo: free. The plan is free software under GNU GPL v2 or later, with pre-built binaries for Alpine Linux, macOS, and Windows. There is no paid tier or free trial to weigh; the material trade-off is the license. Teams should assess whether GPL terms suit their intended use, and the warranty disclaimer makes it unsuitable for anyone requiring a software warranty.

Platforms

Duplo supports Linux, macOS, and Windows. It is self-hosted, with pre-built binaries for Alpine Linux, macOS, and Windows and a source-build option. That suits teams able to manage a command-line tool themselves, rather than buyers seeking a hosted service.

Who it's for

Duplo is a sensible choice for developers who need repository-level duplicate detection across its supported languages or arbitrary text, especially when structured JSON or XML output and a build-failing GitHub Action fit an existing workflow. It is less suitable for teams wanting broad code-quality checks, short-clone detection without threshold tuning, hosted operation, or warranty-backed software.

Pros and cons

  • Pros: Language-aware filtering can strip comments and other syntax, helping focus matches on code rather than incidental text.
  • Pros: Text, JSON, and XML reports, plus a configurable GitHub Action, support both manual review and CI use.
  • Pros: Free software and binaries for three major desktop/server platforms make it accessible to teams comfortable with self-hosting.
  • Cons: The quick-start's 20-line minimum can miss shorter duplicate blocks unless the threshold is adjusted.
  • Cons: GPL v2-or-later licensing and the no-warranty disclaimer may not suit every organizational or risk requirement.
  • Cons: It is a focused clone detector, not a general code-quality analyzer.

Alternatives

Consider PMD when a downloadable static code analyzer under a BSD-style license better suits your needs. CloneWorks is another free option, but its use requires acknowledgement and its redistribution and derivative terms require that they remain free of charge. Choose dcd if an AGPL-3.0 open-source license fits; it also offers paid priority direct-email support billed a year's worth. jscpd is another free option for Linux, macOS, Windows, API, or self-hosted use. NiCad may suit teams preferring MIT-licensed software, provided they can use OpenTxl 11 or later. Simian Similarity Analyzer is a free Apache License 2.0 open-source alternative. Algo VPN is another free option. copydetect is a free alternative with API and self-hosted platform options. Browse the Code Clone Detection Tools list to compare more options.

Verdict

Choose Duplo if you need a free, self-hosted duplicate detector with language-aware filtering and CI-friendly reports, and can accept GPL terms and tune the minimum match size to your codebase. Look elsewhere if you need broader static analysis, a hosted service, or software backed by a warranty.

Verdict

Duplo combines language-aware duplicate checking with text-file scanning and several report formats. Check the quick-start threshold and license disclaimer against your intended use.

Questions

How much does Duplo cost?

The listed plan is free.

Which operating systems have prebuilt binaries?

Prebuilt binaries are available for Alpine Linux, macOS, and Windows. The project can also be built from source.

Which languages can Duplo scan?

Built-in support covers C/C++, Java, C#, VB, GCC assembly, Ada, Erlang, TypeScript, and Swift. It can also scan arbitrary text files.

Can Duplo be used in continuous integration?

The project describes XML reports as usable in tools including GitHub Actions and TeamCity, and links to a GitHub Actions extension that can fail a build when duplicates are found.

Is Duplo open source?

It is free software under GNU GPL version 2 or, at the user's option, any later version.

Who maintains Duplo?

It was originally developed by Christian M. Ammann and is now maintained and developed by Daniel Lidström.

Facts from Duplo's own pages

Action limits
The linked GitHub Action has configurable minimum duplicate lines and minimum line length, and a maximum number of files to report. · github.com, 28 Sept 2026
Caveat
The license section says Duplo is provided without warranty, including implied warranties of merchantability or fitness for a particular purpose. · github.com, 28 Sept 2026
CI integration
The project describes XML reports as usable in continuous integration tools such as GitHub Actions and TeamCity, and links to a GitHub Actions workflow extension. · github.com, 29 Sept 2026
Downloads
Pre-built binaries are available for Alpine Linux, macOS and Windows, and the project can also be built from source. · github.com, 28 Sept 2026
Filtering
For supported languages, Duplo can filter comments, compiler directives, and other syntax such as using statements from duplicate detection. · github.com, 29 Sept 2026
GitHub Actions
The maker links a GitHub Action that can fail a build when duplicate blocks are found. · github.com, 28 Sept 2026
Input
Files can be supplied through standard input or a separate file containing the file list. · github.com, 29 Sept 2026
Language support
Built-in support includes C/C++, Java, C#, VB, GCC assembly, Ada, Erlang, TypeScript, and Swift. · github.com, 29 Sept 2026
License
Duplo is free software under the GNU General Public License version 2 or, at the user's option, any later version, and is provided without warranty. · github.com, 29 Sept 2026
Limit
The README's quick-start example requires at least 20 lines for a duplicate, though command-line options can be adjusted. · github.com, 29 Sept 2026
Maintainer
Duplo was originally developed by Christian M. Ammann and is now maintained and developed by Daniel Lidström. · github.com, 29 Sept 2026
Performance
The README reports processing 266 Quake2 files and 102,740 lines in 9 seconds on modern hardware in 2025, and says multithreading offers almost linear improvement. · github.com, 29 Sept 2026
Purpose
Duplo finds duplicated code blocks in large codebases. · github.com, 29 Sept 2026
Reports
Duplo can output results as JSON or XML, and its XML can be displayed in a browser using an included stylesheet. · github.com, 29 Sept 2026
Support
The maintainer asks users to open an issue for feedback, feature requests, and bug reports. · github.com, 29 Sept 2026
Text files
Duplo can detect duplicates in arbitrary text files, including duplicates within a single file. · github.com, 29 Sept 2026

Where Duplo stands on Freedom251

Look at these too