Question: Since version 15, [IntelliJ warns me about code duplicates](https://www.jetbrains.com/help/idea/2016.1/analyzing-duplicates.html?origin=old_help).

In some cases this might be intentional, so I want to ignore/suppress this warning by using the `@SuppressWarnings` annotation. But what is the correct value for this?

Edit: I'm not asking for disabling this kind of inspection completely as in question [Is it possible to disable duplicate code detection in Intellij?](https://stackoverflow.com/questions/36627002/is-it-possible-to-disable-duplicate-code-detection-in-intellij)

Answer: 
This works for me. You have to set it on both classes/methods if you want to suppress the warning both places.

```
@SuppressWarnings("Duplicates")
private void myDuplicatedMethod() {
    ...
}

```
Thank you for all the answers. There is also another more generic approach to suppress warnings:

1. Place the cursor within the code that gives you a warning
2. Hit `Alt`+`Enter`
3. Go to the warning entry (in this case "Navigate to duplicate")
4. Don't hit `Enter` but `→` (right arrow)
5. Now you can select some suppressing options (for class/method/statement)

[![enter image description here](https://i.stack.imgur.com/1dIsT.png)](https://i.stack.imgur.com/1dIsT.png)