IntelliJ IDEA 11.1 Web Help

Analyze | Locate Duplicates | OK


In this dialog can define the sensitivity of search, and set limitation that will help you avoid reporting about every similar code construct.

Item Description
Java In this section, configure your preferences of search in Java constructs.
Enabled If this check box is selected, you can specify which fragments of code must be an exact match to be considered duplicates.
Anonymize

- Local Variables
- Fields
- Methods
- Literals
- Types

Selecting each of these check boxes defines which fragments of code must be exact match to be considered duplicates. For example:
  • If Anonymize Types check box is selected, IntelliJ IDEA does not take into consideration the types of elements, while searching for duplicates.
  • If Anonymize Local Variables check box is selected, then two identical methods that use different local variable names, are considered duplicates.
Anonymize uncommon subexpressions simpler than Set the value of the subelements within language constructs that can be considered similar, to show the construct as duplicate in the result window. The larger is the number, the larger constructs are taken as similar by IntelliJ IDEA.

The values are set as arbitrary weights based on the element size calculated with additive algorithm. The larger is the element, the higher is the calculated value.

Do not show duplicates simpler than Set the size of duplicated language constructs that are shown in the result window. By default, the constructs less than 10 units are not included (and this limitation cannot be changed).
Visible from outside of the scope only If selected, check whether the discarded subelement is valid outside the current construct. If the subelement is senseless, it cannot be discarded and should not be considered duplicated.
CSS In this section, configure your search preferences for CSS constructs.
Enabled If this check box is selected, you can specify the number of matching CSS properties in a class to be considered duplicate.

See Also

Concepts:

Procedures:

Reference:

Web Resources: