int (@NotNull List<? extends BranchActionGroup> branchActions) { int numOfFavorites = getNumOfFavorites(branchActions); if (branchActions.size() > MAX_NUM) { if (numOfFavorites > 0) return numOfFavorites; return DEFAULT_NUM; } return MAX_NUM; }