456457458459460461462463
if (sz > 1) { return new SumScoreComponent(scoreComponents); } else if (sz == 1) { return scoreComponents.get(0); } else { throw new ApiException("InvalidScorePattern", "No scorer found in (sub)pattern"); } }