2.3.2. Examine Duplicate Code

Duplicate code is another type of issue shown in the Issues view. Details of duplicates are shown in the Duplicate Code Blocks view that can be opened via the context menu. This view shows more details about individual duplicates, i.e. the block length, tolerance, and involved files.

Duplicate Code Blocks View
Figure 2.10. Duplicate Code Blocks View

The Duplicate Source view highlights the duplicate block and marks the lines within a block that are different.

Duplicate Code Blocks View
Figure 2.11. Duplicate Source View

For more details about configuring the duplicate code analysis, check out Section 8.13.1, “Configuration of Duplicate Code Blocks Computation”.