Deckard
Deckard is a free, open-source tool for detecting code clones in source code and analyzing clone-related bugs.
What Deckard is
Deckard is a free, open-source tool for detecting code clones in source code and analyzing clone-related bugs. It builds vectors from parse trees and clusters them to identify similar code, using an abstract syntax tree approach. Its documented syntax support covers C, Java 7, PHP 5, and Solidity. Batch workflows run through shell scripts for clone detection, vector generation, and vector clustering, and users can generate vectors for selected parts of a source file. Detection components can run in parallel, with the maximum process count set through configuration. Clone and bug reports can be converted to HTML for browser inspection, and code interfaces provide programmatic access to clone subtrees, vectors, and reports. Bug detection is available, but batch clone detection does not enable it by default. Deckard supports Linux, macOS, and Windows, as well as API use and self-hosting. The repository README identifies a three-clause BSD license and warns that Windows Vista and Windows 7 may block compiled executables because of UAC false alarms.
Good
- Detects clones through parse-tree vectors
- Supports four listed language syntaxes
- Clone components can run in parallel
- Reports can be converted to HTML
- Three-clause BSD license
Watch out
- Bug detection is not enabled by default in batch mode
- Windows Vista and 7 may block compiled executables
Who it suits
Deckard suits developers who can point it at application source code and configure language and paths for batch clone analysis. Its scripts and code interfaces are relevant to users who want programmable access to reports and vectors.
Verdict
Deckard offers batch clone detection, report conversion, and programmable access for source-code analysis. Users who need clone-related bug detection must account for its separate enablement.
The facts
Each one read from Deckard's own pages, with the date it was checked.
What it does
- Analysis
- The README describes semantic clone analysis as a use of Deckard.checked 7 Oct 2026
- Batch processing
- The README provides scripts for batch-mode clone detection, vector generation, and vector clustering.checked 7 Oct 2026
- Bug detection
- Clone-related bug detection is available but is not enabled by default in batch clone detection.checked 7 Oct 2026
- Detection method
- It generates vectors from parse trees and clusters them to detect code clones.checked 7 Oct 2026
- Installation
- The README instructs users to build Deckard with a shell script in its src/main directory.checked 7 Oct 2026
- Integration
- The README describes a programmable interface for retrieving vectors and parse trees from clone reports.checked 7 Oct 2026
- Intended users
- The documented workflow is for users who point Deckard at application source code and configure the programming language and paths.checked 7 Oct 2026
- Languages
- The release notes describe support for C, Java 7, PHP 5, and Solidity syntax.checked 7 Oct 2026
- License
- The repository README identifies the license as a three-clause BSD license.checked 7 Oct 2026
- Maintainer
- The GitHub account associated with the repository identifies its user as Lingxiao Jiang and lists Singapore Management University and Singapore.checked 7 Oct 2026
- Parallel processing
- Clone detection components can run in parallel, with the maximum process count configured in the config file.checked 7 Oct 2026
- Performance
- Version 2.0 supports parallel execution, with the maximum process count set through the MAX_PROCS configuration value.checked 7 Oct 2026
- Programmability
- The README describes retrieving clone subtrees, vectors, and clone reports programmatically through Deckard’s code interfaces.checked 7 Oct 2026
- Purpose
- Deckard is a tree-based code clone detection tool that can also report clone-related bugs.checked 7 Oct 2026
- Reports
- The tool can convert clone or bug reports into HTML for inspection in a browser.checked 7 Oct 2026
- Usage
- Deckard runs through shell scripts in batch mode and can generate vectors for selected portions of a source file.checked 7 Oct 2026
Where it runs
- Approach
- Deckard uses parse trees, vector generation, and vector clustering for clone detection.checked 7 Oct 2026
- Platforms
- Installation instructions use bash or Cygwin; the release notes mention Mac OS compatibility, and the README notes Cygwin can run tens of times slower than Linux.checked 7 Oct 2026
- Windows limitation
- The README warns that Windows Vista and 7 may block compiled executables because of UAC false alarms.checked 7 Oct 2026
Alternatives to Deckard
- 1
Dolos
Free planOpen sourceWebAPILinuxmacOS7.7Free plan - 2

jscpd
Free planOpen sourceAPILinuxmacOSSelf-hosted7.4Free plan - 3
Avidemux
Free planOpen sourceWebLinuxmacOSWindows7.3Free plan - 4
PMD
Free planLinuxmacOSSelf-hostedWindows6.8Free plan - 5
Duplo
Free planLinuxmacOSWindows6.5Free plan - 6
dcd
Free planLinuxmacOS6.2Free plan
