== Why is this an issue? include::../description.adoc[] {intro} This rule detects repeatedly adding an element at the same index or key in a collection or adding identical elements to a set. [source,javascript] ---- fruits[1] = "banana"; fruits[1] = "apple"; // Noncompliant myMap.set("key", 1); myMap.set("key", 2); // Noncompliant mySet.add(1); mySet.add(1); // Noncompliant ---- {outro} ifdef::env-github,rspecator-view[] ''' == Implementation Specification (visible only on this page) include::../message.adoc[] include::../highlighting.adoc[] ''' == Comments And Links (visible only on this page) include::../comments-and-links.adoc[] endif::env-github,rspecator-view[]