>
fun indexedAccess(list: MutableList&lt;Int&gt;, map: MutableMap&lt;String, Int&gt;, grid: Grid) {
    list.get(1) // Noncompliant
    list.set(1, 42) // Noncompliant
    map.get("b") // Noncompliant
    map.set("b", 42) // Noncompliant
    grid.get(1, 2) // Noncompliant
    grid.set(1, 2, 42) // Noncompliant
}
</pre>
<h4>Compliant solution</h4>
<pre data-diff-id="1" data-diff-type="compliant">
fun indexedAccess(list: MutableList&lt;Int&gt;, map: MutableMap&lt;String, Int&gt;, grid: Grid) {
    list[1] // 