Int2IntMap (final String[] propertyWords) { int classNameIndex = myOldClassName.length - 1; Int2IntMap matches = new Int2IntOpenHashMap(); for (int i = propertyWords.length - 1; i >= 0; i--) { final String propertyWord = propertyWords[i]; Match match = null; for (int j = classNameIndex; j >= 0 && match == null; j--) { match = checkMatch(j, i, propertyWord); } if (match != null) { matches.put(match.oldClassNameIndex, i); classNameIndex = match.oldClassNameIndex - 1; } } return matches; }