Linux:Settings —> Editor —> Inspections —> General —> Duplicated Code

Mac:Preferences --> Editor —> Inspections —> General —> Duplicated Code fragment

将对应的勾去掉。

图1

具体请参考:https://www.jetbrains.com/help/idea/analyzing-duplicates.html