List<ArrangementSectionRule> () { synchronized (myExtendedSectionRules) { if (myExtendedSectionRules.isEmpty()) { final Map<String, StdArrangementRuleAliasToken> tokenIdToDefinition = new HashMap<>(myRulesAliases.size()); for (StdArrangementRuleAliasToken alias : myRulesAliases) { final String id = alias.getId(); tokenIdToDefinition.put(id, alias); } final List<ArrangementSectionRule> sections = getSections(); for (ArrangementSectionRule section : sections) { final List<StdArrangementMatchRule> extendedRules = new ArrayList<>(); for (StdArrangementMatchRule rule : section.getMatchRules()) { appendExpandedRules(rule, extendedRules, tokenIdToDefinition); } myExtendedSectionRules.add(ArrangementSectionRule.create(section.getStartComment(), section.getEndComment(), extendedRules)); } } } return myExtendedSectionRules; }