List<ChangeKind> (@NotNull Int2ObjectMap<List<ChangeKind>> pathIdToChangeDataListsMap, int pathId, int parentsCount) { List<ChangeKind> changeDataList = pathIdToChangeDataListsMap.get(pathId); if (changeDataList == null) { if (parentsCount == 1) { changeDataList = new SmartList<>(ChangeKind.NOT_CHANGED); } else { changeDataList = new ArrayList<>(parentsCount); for (int i = 0; i < parentsCount; i++) { changeDataList.add(ChangeKind.NOT_CHANGED); } } pathIdToChangeDataListsMap.put(pathId, changeDataList); } return changeDataList; }