# Duplicates tool window

> **TL;DR**
> `View | Tool Windows | Duplicates`

> **Note:**
> The Duplicates  tool window is available for access through `View | Tool Windows`  after IntelliJ IDEA displays the initial results of the [Locate Duplicates](analyzing-duplicates.html) action.

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.

## Left toolbar

| Item | Shortcut | Description |
| --- | --- | --- |
| ![Rerun](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.rerun.svg)  | Rerun | Click this button to rerun the duplicates analysis in the active tab. |
| ![Close](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.closeSmall.svg) |    Close Active Tab   `Ctrl+Shift+F4` (Windows), `⌃ ⇧ F4` (macOS), `⌘ ⇧ F4` (IntelliJ IDEA Classic (macOS)), `⌃ ⇧ F4` (macOS System Shortcuts), `Ctrl+Shift+F4` (XWin), `Ctrl+Shift+F4` (GNOME), `Ctrl+Shift+4` (KDE), `Ctrl+Shift+F4` (Emacs), `Ctrl+Shift+F4` (Sublime Text), `⌃ ⇧ F4` (Sublime Text (macOS)), `Ctrl+Shift+F4` (NetBeans), `Ctrl+Shift+F4` (Visual Studio), `⌃ ⇧ F4` (Visual Studio (macOS)), `Ctrl+W` (Eclipse), `⌘ W` (Eclipse (macOS)) | Click this button to close the active tab. |
| ![Navigate with Single Click](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.general.autoscrollToSource.svg) | Navigate with Single Click | If the button is pressed, selecting an entry in the left pane opens the respective file in the editor. |
| ![Eliminate Duplicates](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.replace.svg)  | Eliminate Duplicates | Click this button to extract method from the duplicated code fragments. For more information about managing plugins, refer to the [Extract method](extract-method.html)  refactoring.  |

## Upper toolbar

| Item | Tooltip/Image/Shortcut | Description |
| --- | --- | --- |
|  ![Previous](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.down.svg) ![Next](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.up.svg)  | `F7` (Windows), `F7` (macOS), `F7` (IntelliJ IDEA Classic (macOS)), `⌘ ]` (macOS System Shortcuts), `F7` (XWin), `F7` (GNOME), `F7` (KDE), `F7` (Emacs), `F7` (Sublime Text), `F7` (Sublime Text (macOS)), `F7` (NetBeans), `F7` (Visual Studio), `F7` (Visual Studio (macOS)), `Ctrl+F7` (Eclipse), `⌃ F7` (Eclipse (macOS)) / `Shift+F7` (Windows), `⇧ F7` (macOS), `⇧ F7` (IntelliJ IDEA Classic (macOS)), `⌘ [` (macOS System Shortcuts), `Shift+F7` (XWin), `Shift+F7` (GNOME), `Shift+F7` (KDE), `Shift+F7` (Emacs), `Shift+F7` (Sublime Text), `⇧ F7` (Sublime Text (macOS)), `Shift+F7` (NetBeans), `Shift+F7` (Visual Studio), `⇧ F7` (Visual Studio (macOS)), `Shift+F7` (Eclipse), `⇧ F7` (Eclipse (macOS)) | Move to the next/previous difference |
| ![Edit](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.edit.svg) | Jump to Source   `F4` (Windows), `⌘ ↓` (macOS), `F4` (IntelliJ IDEA Classic (macOS)), `F4` (macOS System Shortcuts), `F4` (XWin), `F4` (GNOME), `F4` (KDE), `F4` (Emacs), `F4` (Sublime Text), `F4` (Sublime Text (macOS)), `F4` (NetBeans), `F4` (Visual Studio), `⌘ ↓` (Visual Studio (macOS)), `F12` (Eclipse), `F3` (Eclipse (macOS)) | 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. |
|  ![the Settings button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app-client.expui.general.settings.svg) | Settings |    Some of these commands are also available from the context menu of the Diff Viewer gutter.       Align Changes in Side-by-Side Diff: vertically aligns the corresponding lines by padding differences with empty space.       Synchronize Scrolling: scroll both diff panes simultaneously.       Show Diff in Editor Tab: displays the Diff viewer as an editor tab instead of a separate window.       Show Diff in Separate Window: displays the Diff viewer as a separate window instead of an editor tab.       Ignore Differences: define how the Diff Viewer should treat whitespaces.        * None: white spaces are important, and all the differences are highlighted. This option is selected by default.    * Trim whitespaces: trim whitespaces if they appear in the end and at the beginning of a line (`("\t", " ")`). * If two lines differ in trailing whitespaces only, these lines are considered equal. * If two lines are different, trailing whitespaces are not highlighted in the [By word](#highlight) mode.    * Ignore whitespaces: white spaces are not important, regardless of their location in the source code.    * Ignore whitespaces and empty lines: ignores whitespaces and empty lines. The following entities are ignored: * all whitespaces (as in the 'Ignore whitespaces' option) * all added or removed lines consisting of whitespaces only * all changes that consist of splitting or joining lines without changes to non-whitespace parts. For example, differences between `a b c` and `a \n b c` are not highlighted in this mode.    * Ignore imports and formatting: changes within import statements and whitespaces are ignored (whitespaces within String literals are respected though).      Highlighting Differences: select the way differences granularity is highlighted.        * Words: modified words are highlighted    * Lines: modified lines are highlighted    * Split changes: if this option is selected, big changes are split into smaller changes. For example, `A \n B` and `A X \n B X` are treated as two changes instead of one.    * Characters: modified symbols are highlighted    * None: if this option is selected, the differences are not highlighted at all. Use the None option when you work with the files that were significantly modified. In such cases, highlighting might introduce additional difficulties during a review.    |

## Context menu commands

| Item | Keyboard Shortcut | Description |
| --- | --- | --- |
| Jump to Source | `F4` (Windows), `⌘ ↓` (macOS), `F4` (IntelliJ IDEA Classic (macOS)), `F4` (macOS System Shortcuts), `F4` (XWin), `F4` (GNOME), `F4` (KDE), `F4` (Emacs), `F4` (Sublime Text), `F4` (Sublime Text (macOS)), `F4` (NetBeans), `F4` (Visual Studio), `⌘ ↓` (Visual Studio (macOS)), `F12` (Eclipse), `F3` (Eclipse (macOS)) | 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. |
| Show Source | `Ctrl+Enter` (Windows), `⌘ ⏎` (macOS), `⌘ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ ⏎` (macOS System Shortcuts), `Ctrl+Enter` (XWin), `Ctrl+Enter` (GNOME), `Ctrl+Enter` (KDE), `Ctrl+Enter` (Emacs), `Ctrl+Enter` (Sublime Text), `⌘ ⏎` (Sublime Text (macOS)), `Ctrl+Enter` (NetBeans), `Ctrl+Enter` (Visual Studio), `⌘ ⏎` (Visual Studio (macOS)), `Ctrl+Enter` (Eclipse), `⌘ ⏎` (Eclipse (macOS)) | 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 ![Show as left diff version](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.duplicates.sendToTheLeft.png) and ![Show as right diff version](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.duplicates.sendToTheRight.png) to place the selected duplicate to the left or right pane of the Diff Viewer. |

## See also

### Getting Started

[Tool windows](tool-windows.html)

### Procedures

[Analyze duplicates](analyzing-duplicates.html) [Extract method](extract-method.html)

### Reference

[Diff Viewer for files](differences-viewer.html)

