DecoratorContext decorateResource(Resource resource, Collection<Decorator> decorators, boolean executeDecorators) {
List<DecoratorContext> childrenContexts = Lists.newArrayList();
for (Resource child : index.getChildren(resource)) {
boolean isModule = child instanceof Project;
DefaultDecoratorContext childContext = (DefaultDecoratorContext) decorateResource(child, decorators, !isModule);
childrenContexts.add(childContext.end());
}
DefaultDecoratorContext context = new DefaultDecoratorContext(resource, index, childrenContexts, measurementFilters, measureCache, metricFinder, duplicationCache);
context.init();
if (executeDecorators) {