PHP CloneDR

The PHP CloneDR identifies and displays code segments within a system that are identical or nearly identical (clones), supporting the consolidation of clones to reduce the size and increase the clarity and reliability of the source code. It is a member of Semantic Designs family of Clone Detection and Removal tools, described more completely here.

PHP CloneDR Features

  • Dialects: PHP 4 and PHP 5
  • Not dependent on any particular compiler
  • Works with arbitrary subsets of source code base
  • Can handle thousands of source files
  • Analysis can be parameterized by clone similarity threshold, clone size, maximum number of clone parameters, and other limits
  • Each clone tuple characterized individually by mass, number of instances, number of parameters, similarity ratio, language syntax category, length, and location, with each instance pictured
  • Produces a summary report in HTML including statistics sorted by various attributes and with links to HTML pages describing individual clones. For a sample report of detected clones on the Joomla PHP package, summary report (22% code involved in clones) and this individual clone report.

Download an evaluation version

Other PHP Clone Detectors

You can get PHPCPD, an open source PHP Clone Detector, to compare to what our tool can do. CloneDR typically finds 10-20% redundant code. The example documented on the PHPCDP link shows about 2%, roughly one-tenth of what CloneDR can find. The reason is simple: PHPCDP only looks for exact matches, but most clones are created by copy-paste-edit which means they are NOT the same!.

Semantic Designs also offers other PHP tools.

For more information: info@semanticdesigns.com    Follow us at Twitter: @SemanticDesigns

PHP Clone Doctor