IntelliJ IDEA 2021.3 Help

Code duplication analysis settings

Use this dialog to define the sensitivity of search, and set limitation that will help you avoid reporting about every similar code construct. Your preferences are specified in a language-specific context.

Item

Description

Java

To anonymize an element means to define whether identical entities that only differ by names or values should be treated as duplicates. Select elements to anonymize:

  • Anonymize Literals

  • Anonymize Local Variables

  • Anonymize Fields

  • Anonymize Methods

  • Anonymize Types

Configure duplicate parameters:

  • 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 this checkbox is selected, verify that the discarded subelement is valid outside the current construct. If the subelement is senseless, it cannot be discarded and should not be considered duplicated.

  • 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 the element, the higher is the calculated value.

ActionScript

ECMAScript 6

Flow JS

Groovy

JavaScript

TypeScript

TypeScript JSX

To anonymize an element means to define whether identical entities that only differ by names or values should be treated as duplicates. Select elements to anonymize:

  • Anonymize Variables

  • Anonymize Literals

  • Anonymize Functions

Configure duplicate parameters:

  • 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).

  • 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 the element, the higher is the calculated value.

CSS

  • Do not show duplicates containing less than <number> CSS properties: Set the size of duplicated language constructs that are shown in the results window.

XHTML

XML

HTML

  • Do not show duplicates containing less than <number> tags: Set the size of duplicated language constructs that are shown in the results window.

  • Anonymize values of tags and attributes

Last modified: 12 November 2021