int (@NotNull List<String> targetGroupPath, @NotNull List<String> groupPath) { for (int i = 0; i < Math.min(targetGroupPath.size(), groupPath.size()); i++) { if (!targetGroupPath.get(i).equals(groupPath.get(i))) { return i; } } return Math.min(targetGroupPath.size(), groupPath.size()); }