Example:
List<Integer> list = getListOfElements();
list.remove(""); // remove is highlighted
In the inspection settings, you can disable warnings for potentially correct code like the following:
public boolean accept(Map<Integer, String> map, Object key) {
return map.containsKey(key);
}