Calling nCopies('a', 10) returns a list with 97 copies of 10, not a list with 10 copies of ‘a’.
nCopies('a', 10)
Suppress false positives by adding the suppression annotation @SuppressWarnings("NCopiesOfChar") to the enclosing element.
@SuppressWarnings("NCopiesOfChar")