Clone Finder output formats
Basic output
Full Clone Finder results are available in the file report.json
located in the results-dir
folder.
Command-line output summary
An example of the Clone Finder command-line summary output:
UI-compatible output
In addition to programmatic output, you can generate a human-readable report in the HTML format by using the --save-report
argument. See Open an HTML Report for details.
A sample decorated diff
In addition to the sunburst diagram and other features of the Qodana HTML report, Clone Finder makes the analysis of code duplicates more helpful and convenient.
The detected clones are prioritized and displayed in the order of their importance.
When you expand an item, the duplicate code fragments are provided with decorated code diffs and are annotated with tags, licenses, languages, and file paths.
A diff example in PHP.
A diff example in Java with a license mismatch warning.
Clone Finder highlights similar lines and presents the following information to help you investigate the problem:
Score
Lists all detected duplicate functions ranked by their importance.
Tags
Categorizes detected copies using 256 topics (see Figure 3 for a dendrogram of supported topics).
Licenses
Lists licenses related to duplicate code fragments detected in the compared projects. By the way, to supplement this feature, we are working on another tool that will list the licenses for third-party libraries used in the queried project and warn about incompatibilities between the queried project's license and third-party licenses. Stay tuned!
License mismatch warnings
Displays a warning when the licenses in duplicate code fragments are different.
Language
Displays the programming language of the clones. The EAP version of Clone Finder supports PHP, Java, and Kotlin.
Topics dendrogram.
Learn more
How to open a generated report in your browser: Open an HTML Report
Basic structure and configuration of Qodana HTML reports: UI Overview
More information on command-line arguments for Clone Finder: Docker Image Paths and Configuration Options