第一步点击右上角的File。然后在里面找到Setting第二步:点击Editor,然后找到Inspections最后一步,点击Duplicated code fragment右边的那个对号消去。然后点击ok就可以了