Large global bank
CloneDR analyzed 10M+ lines of Java and C# to identify software plagiarism. Findings in two weeks.
Large software systems typically contain an estimated 10–25% or more redundant code, according to Semantic Designs. This redundancy often results from a common programming practice: copying and pasting existing code fragments, or cloning, and then modifying them to meet new application requirements.
A bug in one code fragment may also exist in its hidden clones. Every copy creates another opportunity for a bug fix to be missed, increases modernization costs, and forces reviewers to examine the same logic repeatedly.
Modernize Software’s CloneDR, is an AST-based code clone detector built on Semantic Designs’ DMS compiler technology. CloneDR identifies exact and near-miss clones, including code fragments with renamed variables or other edits. It detects duplication in both executable code and data declarations.
With the DMS Reengineering Toolkit, Modernize Software can go further by automating clone remediation: consolidating duplicated code into shared routines or structures and updating the corresponding call sites. The result is less redundant code, easier maintenance, and a more efficient modernization process.
Book A Free Clone AssessmentIn 1998 our founder, Dr. Ira Baxter, co-authored "Clone Detection Using Abstract Syntax Trees" (ICSM 1998), one of the founding papers of AST-based clone detection. CloneDR is that idea turned into a production tool.
CloneDR analyzed 10M+ lines of Java and C# to identify software plagiarism. Findings in two weeks.
On a 250,000-line Java application, partial clone removal guided by CloneDR eliminated 27,000 lines. That is more than a tenth of the system, gone.
DMS refactored 4M+ lines of C++, updating call sites across 5,000+ modules in under 3 months. The same rewrite machinery updates every call site when a clone set becomes one function.
Researchers sort clones into four types; Roy and Cordy's definitions are the standard reference. Here is what each looks like and what CloneDR does with it.
Line-hash and token-window tools, including the duplicate checks in most linters and quality dashboards, compare text. Developers don't copy text. They copy code, then edit it.
DMS parses each file with a full grammar for its language and builds an abstract syntax tree. Text artifacts are gone before matching starts.
CloneDR hashes arbitrary substructures of the program, which turns an all-pairs comparison into roughly linear work. It spreads across every processor on your server.
Small matches merge with their neighbors into larger clones. Points of variation become parameters, within the similarity threshold you choose.
For each clone set, CloneDR produces a detected code skeleton: the shared code, with parameter slots marked. It is the blueprint for removal.
The report gives the percentage of cloned code and the clone sets themselves, each with its skeleton and every location. For a fuller picture of a system, pair it with our code analysis services.
Most clone tools stop at a report and leave the refactoring to your backlog. Our clone removal service turns clone sets into shared code, to your specification, without changing what the system does.
Together we choose which clone sets go, the minimum size worth removing, the target form (function, method, copybook or macro), naming, and where shared code lives.
Each covering abstraction becomes one shared routine. Its parameter slots become arguments, named and typed to your standards.
Each copy becomes a call that passes its own values. DMS resolves names and types before changing a line and regenerates source with comments and layout intact. Clone sets too irregular for a rule are refactored by our engineers, guided by the skeleton.
Every change compiles and passes your test suite. Our test coverage tools show the tests actually exercise the refactored code, and a structural diff keeps review fast.
Cloned-code percentage by subsystem, the largest clone sets with their skeletons, and a removal estimate. A fast way to size a migration or a cleanup.
We remove the agreed clone sets to your spec, verified by your tests. Fixed price after assessment. Often part of a wider code refactoring program.
Two or more codebases, a similarity threshold, and an evidence report your counsel can read. Under NDA, on your premises if required.
Licensed CloneDR on your own servers, run on a schedule or per release so the clone rate stops climbing. Configured for your languages and thresholds.
Get a clone report on your own code before you migrate, merge or maintain another line of it.
Book A Free Clone AssessmentGeneral questions
Clone detection finds code that was copied and then kept, edited or renamed, anywhere in your system. Clone removal replaces each set of copies with one shared function, method, copybook or macro and updates every call site. We detect with CloneDR, Semantic Designs' AST-based detector, and remove with DMS rewrite rules plus engineer-led refactoring, all to your specification and verified by your tests.
Those tools compare lines or token sequences. They catch exact copies well, but an inserted statement or a renamed variable can break the match, and boilerplate inflates the count. CloneDR parses code with a compiler-grade front end, matches syntax trees and turns differences into parameters. Near-miss clones are found, each clone is a unit you can actually extract, and you get the covering abstraction needed for removal.
Type 1 exact clones, Type 2 renamed or parameterized clones, and Type 3 near-miss clones with statements added, changed or removed, within a difference threshold you set. It finds them in procedural code and in data declarations. It does not claim Type 4 semantic clones, where the same computation is written in different syntax. We would rather give you a precise report than a long one.
CloneDR handles thousands of files and millions of lines and uses every processor on your server. A large global bank had 10M+ lines of Java and C# analyzed for plagiarism in two weeks. Evaluation versions exist for Java, C#, C++, COBOL, JavaScript and PHP. Because CloneDR is built on DMS, which parses 40+ languages, we can build one for almost any language, legacy dialects included.
It supplies the technical evidence. CloneDR compares codebases and reports matching fragments side by side at a similarity level you control, even after renaming and reformatting. Whether a match is infringement is a legal question for your counsel. For due diligence, duplication rates show maintenance liability. We compare the code you supply; we don't maintain an open-source fingerprint database, so pair us with a software composition analysis scan for license compliance.
We agree the rules first: which clone sets, what form the shared code takes, and naming. DMS resolves names and types before it changes a line, rewrites each copy into a call and regenerates source with comments intact. Every change compiles and passes your tests, and our coverage tools confirm the tests exercise the refactored code. Irregular clone sets are refactored by our engineers, guided by the detected skeleton.
No. Detection runs on a snapshot and never touches your repository. Removal lands in batches, one subsystem or clone set at a time, so each change arrives as a normal reviewable merge. Because DMS transformations are deterministic, we rerun them on your latest code instead of freezing the codebase while we work.
A supporting one. Clone detection and call-site rewriting are deterministic symbolic AI: same input, same output, every time. Gen AI helps around that core, drafting documentation for new shared routines, summarizing clone sets for reviewers and generating test cases. It never decides what counts as a clone or what code changes. Here is why.
Yes. CloneDR and DMS run on your own servers, including air-gapped networks, and every engagement starts under NDA. Your source never has to leave your site. You own the refactored code, the reports and the clone data. If you license CloneDR for your team, there are no runtime royalties on anything it helps you produce.
Send us rough line counts, languages and what you want from the scan: a clone rate, a plagiarism answer, or less code. We start with a free codebase assessment under NDA and return complexity and duplication findings, an automation estimate and a rough timeline in about five business days. Fixed price follows the assessment. Contact us to begin.