pmd: fix #1030 CPD Java.lang.IndexOutOfBoundsException: Index: