Clone Detection

Identify Cloned Code and Reduce Defects

Pattern Insight Clone Detection is an advanced analysis engine that quickly detects duplicate patterns within code and allows you to find code clones and difficult-to-detect copy-paste bugs.

Code reuse is a standard practice in modern software development. The downside of code reuse via replication and copy-paste programming is that it leads to code bloat, increasing the technical depth of software products and making maintenance costly and time consuming.

Another undesirable result of copy-paste programming is the introduction of defects. For example, when a developer copies a piece of code, modifies it, and then pastes it, inconsistencies are frequently introduced into the code: Nine out of 10 variable names will be updated, but the 10th will be neglected.

Deep Pattern Discovery and Analysis

Detecting code clones in a code base is a very difficult problem. According to studies on open source and commercial code, 66% of cloned code is modified, i.e. it's not an identical clone. Also, detecting the maximal clone pattern is very challenging as the input is not known in advance. It is akin to looking for all the pairs or tuples of people that match each other in a very large population. Several search and hashing-based solutions have been suggested in the past, but they all lack accuracy and coverage.

Pattern Insight Clone Detection is a new technology that combines data mining with an understanding of code syntax and semantics. The result is deep pattern discovery and analysis that tolerates function and variable name changes as well as insertion and deletion of statements. At the same time, Pattern Insight Clone Detection is blazingly fast, reporting all code clones in 5 minutes per million lines of code.

Clone Detection first parses the source code and then performs data mining with program analysis on the parsed code. All similar code segments are identified and then an inconsistency detection is performed. The entire procedure is executed in a matter of minutes. Results are stored in a database for future use. A web-based interface supports effective viewing and analysis of all the detected code clones along with potential defects. Command line and API interfaces are available for scripting and custom integrations.

Features

  • Find all similar code patterns within a single version or a branch of a code base.
  • Compare two versions or branches of a single codebase, and identify all code segments that are similar or identical between them.
  • Compare two different code bases and identify all code segments that are similar or identical between them.

Learn why up to 45% of software bugs shipped are previously fixed defects and what you can do about it.


Data Sheet


Faster, More Complete and Easier to Use

Pattern Insight Clone Detection is not like other clone detection tools. Here is a summary of the key differences:

  • It's faster - Clone Detection is among the fastest solutions in terms of patterns detected per second. The data mining technique Clone Detection uses is tailored for mining patterns in large code bases.
  • It's more complete - Clone Detection can find many more duplicates than other tools. Clone Detection can tolerate changes in code duplication detection, including not only variable changes, but also statement insertion and deletion.
  • It detects bugs - Clone Detection is the only tool that can detect copy-paste errors.
  • It's easier to use - Clone Detection doesn't require tedious info such as compiler or build options. The only input required is your source code.
  • It includes enterprise features - Clone Detection is equipped with many enterprise features including full integration with SCM systems and custom workflow, access control and reporting.
  • It's an open platform - Clone Detection allows users to build additional applications on top of its engine. These include custom reporting, duplication detection for custom artifacts, etc.

Learn why up to 45% of software bugs shipped are previously fixed defects and what you can do about it.


Data Sheet


Useful for Developers, Architects and Others

Pattern Insight Clone Detection quickly identifies all duplicate code, even if the code has been modified due to variable name changes, line insertions and deletions. Furthermore, Pattern Insight Clone Detection can identify all the difficult-to-detect copy-paste defects.

Detecting duplicate code is not just limited to a single codebase. Typically, developers need to make sure that a specific piece of code, whether internal or third party, does not end up in a release. This is accomplished quickly and simply by Clone Detection.

Developers

Detect copy-paste related bugs to improve code quality


Architects

Detect clones in software for pragmatic refactoring to reduce software maintenance costs


Legal

Detect clones between your codebase and any third-party software to avoid license violation

Learn why up to 45% of software bugs shipped are previously fixed defects and what you can do about it.


Data Sheet


See It for Yourself

Pattern Insight analyzes billions of lines of code in seconds. It doesn't suffer from the false positive problem that plagues many defect detection tools. It is easily integrated with all major SCM systems. And it fits neatly into your current development and release management processes, reinforcing quality protocols by blocking offending pieces of code or negligent coders.

Clone Detection demo video

Learn why up to 45% of software bugs shipped are previously fixed defects and what you can do about it.


Data Sheet