Duplicates tool window
The Duplicates tool window displays the results of the search for duplicates.
Panes of the Duplicates tool window
The window consists of the following panes:
The left pane displays the tree view of the duplicate fragments of source code. Each node shows the following information:
The number of duplicated code fragments found in scope.
The 'cost' of the duplicate (which is an arbitrary unit calculated using an additive algorithm on the base of the code block size; generally, the larger is the code fragment, the higher is its cost).
The containing class where the duplicates are located.
The right pane shows the differences between the duplicated fragments of source code, selected in the left pane.
Click this button to rerun the duplicates analysis in the active tab.
Close Active Tab
Click this button to close the active tab.
Navigate with Single Click
If the button is pressed, selecting an entry in the left pane opens the respective file in the editor.
Click this button to extract method from the duplicated code fragments. Refer to the Extract method refactoring for details.
Move to the next/previous difference
Define how the differences viewer should treat whitespaces.
Select the way differences granularity is highlighted.
The available options are:
Jump to Source
Click this button to open the file in the active pane in the editor. The caret will be placed in the same position as in the Duplicates tool window.
Click this button to scroll both differences panes simultaneously. If this button is released, each of the panes can be scrolled independently.
Open a list of available settings.
These commands are also available from the context menu of the differences viewer gutter.
Context menu commands
Jump to Source
Open in the editor the file that contains the selected duplicate, and place the caret at the beginning of the duplicate. The fragment of code is highlighted.
Open in the editor the file that contains the selected duplicate, and highlight the fragment of code.
Send to left/Send to right
Use these commands, or the arrow icons and to place the selected duplicate to the left or right pane of the differences viewer.