- Home
- Code Clone Detection Tools
- Deckard
Deckard
What it is
Deckard is a free, open-source repository tool for detecting code clones and reporting bugs related to those clones. It builds vectors from parse trees, then clusters the vectors to identify similar code through an abstract-syntax-tree approach. The documented release supports C, Java 7, PHP 5, and Solidity syntax. Shell scripts provide batch workflows for clone detection, vector generation, and vector clustering, while selected portions of a source file can be converted into vectors. Clone-detection components can run in parallel, with the maximum process count set in the configuration file. Clone and bug reports can be converted to HTML for browser inspection. Code interfaces expose clone subtrees, vectors, parse trees, and reports programmatically. Bug detection is available but is not enabled by default in batch clone detection. Deckard runs on Linux, macOS, and Windows, with API and self-hosted options.
For and against
For
- Free, open-source three-clause BSD license
- Supports C, Java 7, PHP 5, and Solidity
- Parallel processing is configurable
- HTML reports support browser inspection
- Programmable access to vectors and clone reports
Against
- Bug detection is off by default in batch mode
- No listed CI integration
- No listed IDE integration
- Windows Vista and 7 may block executables
The verdict
Deckard combines parse-tree analysis, vector clustering, batch scripts, and programmable interfaces for repository clone detection. Its language coverage and Windows warning should be considered before setup.
Who it suits
Deckard suits developers or teams analyzing application source repositories for duplicated code. It fits users who want shell-based batch processing, programmable report access, or self-hosted operation.
On the record
- Analysis
- The README describes semantic clone analysis as a use of Deckard.github.com · read 7 Oct 2026
- Approach
- Deckard uses parse trees, vector generation, and vector clustering for clone detection.github.com · read 7 Oct 2026
- Batch processing
- The README provides scripts for batch-mode clone detection, vector generation, and vector clustering.github.com · read 7 Oct 2026
- Bug detection
- Clone-related bug detection is available but is not enabled by default in batch clone detection.github.com · read 7 Oct 2026
- Detection method
- It generates vectors from parse trees and clusters them to detect code clones.github.com · read 7 Oct 2026
- Installation
- The README instructs users to build Deckard with a shell script in its src/main directory.github.com · read 7 Oct 2026
- Integration
- The README describes a programmable interface for retrieving vectors and parse trees from clone reports.github.com · read 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.github.com · read 7 Oct 2026
- Languages
- The release notes describe support for C, Java 7, PHP 5, and Solidity syntax.github.com · read 7 Oct 2026
- License
- The repository license permits source and binary redistribution subject to its stated conditions and disclaims warranties.github.com · read 7 Oct 2026
- Maintainer
- The GitHub account associated with the repository identifies its user as Lingxiao Jiang and lists Singapore Management University and Singapore.github.com · read 7 Oct 2026
- Parallel processing
- Clone detection components can run in parallel, with the maximum process count configured in the config file.github.com · read 7 Oct 2026
- Performance
- Version 2.0 supports parallel execution, with the maximum process count set through the MAX_PROCS configuration value.github.com · read 7 Oct 2026
- Programmability
- The README describes retrieving clone subtrees, vectors, and clone reports programmatically through Deckard’s code interfaces.github.com · read 7 Oct 2026
- Purpose
- Deckard is a tree-based code clone detection tool that can also report clone-related bugs.github.com · read 7 Oct 2026
- Reports
- The tool can convert clone or bug reports into HTML for inspection in a browser.github.com · read 7 Oct 2026
- Usage
- Deckard runs through shell scripts in batch mode and can generate vectors for selected portions of a source file.github.com · read 7 Oct 2026
- Windows limitation
- The README warns that Windows Vista and 7 may block compiled executables because of UAC false alarms.github.com · read 7 Oct 2026