Recursively adds statistics for a component and its children to the stats map.

@param statsMap the stats map to add to.
@param comp the component to analyse.
324188
private void addStats(final Map<WComponent, Stat> statsMap, final WComponent comp) {
		Stat stat = createStat(comp);
		statsMap.put(comp, stat);

		if (comp instanceof Container) {
			Container container = (Container) comp;
			int childCount = container.getChildCount();

			for (int i = 0; i < childCount; i++) {
				WComponent child = container.getChildAt(i);
				addStats(statsMap, child);
			}
		}
	}
1109613
protected void addChildren(CmsTreeItem parent, List<CmsGalleryTreeEntry> children, List<String> selectedGalleries) {

        if (children != null) {
            for (CmsGalleryTreeEntry child : children) {
                // set the category tree item and add to parent tree item
                CmsTreeItem treeItem = createTreeItem(child, selectedGalleries, true);
                if ((selectedGalleries != null) && selectedGalleries.contains(child.getPath())) {
                    parent.setOpen(true);
                    openParents(parent);
                }
                parent.addChild(treeItem);
                addChildren(treeItem, child.getChildren(), selectedGalleries);
            }
        }
    }
1032291
public void cacheBaseStatistics(BaseStatistics statistics, String identifier) {
		synchronized (this.baseStatisticsCache) {
			this.baseStatisticsCache.put(identifier, statistics);
		}
	}
342882
@Override
	public void setSubjectMap(Map<java.util.Locale, String> subjectMap) {
		_commerceNotificationTemplate.setSubjectMap(subjectMap);
	}
834732
@SuppressWarnings("unused")
  public void addAll(ScalingStats stats)
  {
    synchronized (lock) {
      synchronized (stats.lock) {
        recentEvents.addAll(stats.recentEvents);
      }
    }
  }
769711
protected void addComponentMapping(Class<? extends IComponent> klazz, IComponent component) {
        components.put(klazz, component);
    }
833140
public static void addToMap(final Map<String, VerbatimSerializer> serializerMap) {
        PlantUmlVerbatimSerializer serializer = new PlantUmlVerbatimSerializer();
        for (Type type : Type.values()) {
            String name = type.getName();
            serializerMap.put(name, serializer);
        }
    }
1003950
public void statistics(Statistic stats) {
    if(stats != null) {
      log(Level.STATISTICS, stats.getKey() + ": " + stats.formatValue());
    }
  }
515353
public ArrayList listChildStatDescriptors(boolean recursive) {
        ArrayList list = new ArrayList(1);

        ModuleItem[] mi = children();
        if (mi != null) {
            for (int i = 0; i < mi.length; i++) {
                list.add(mi[i].getInstance().get60_StatDescriptor());

                if (recursive) {
                    ArrayList cList = mi[i].listChildStatDescriptors(recursive);

                    for (int k = 0; k < cList.size(); k++)
                        list.add(cList.get(k));
                }
            }
        }
        return list;
    }
287996
@SuppressWarnings({ "rawtypes" })
    static void report(Progressable progressable, Stats stats) {
        progressable = (Progressable) CompatHandler.unwrap(progressable);

        if (progressable == null || progressable == Reporter.NULL) {
            return;
        }

        if (progressable instanceof Reporter) {
            Reporter reporter = (Reporter) progressable;
            for (Counter count : Counter.ALL) {
                oldApiCounter(reporter, count, count.get(stats));
            }
        }

        if (progressable instanceof org.apache.hadoop.mapreduce.TaskInputOutputContext) {
            TaskInputOutputContext compatTioc = CompatHandler.taskInputOutputContext((org.apache.hadoop.mapreduce.TaskInputOutputContext) progressable);
            for (Counter count : Counter.ALL) {
                newApiCounter(compatTioc, count, count.get(stats));
            }
        }
    }
738225
public void setTypeMap(Map<Class<? extends T>, C> map) {
		this.classified = new ConcurrentHashMap<Class<? extends T>, C>(map);
	}
1002814
private synchronized void addSourceMapSourceFiles(SourceMapInput inputSourceMap) {
    // synchronized annotation guards concurrent access to sourceMap during parsing.
    SourceMapConsumerV3 consumer = inputSourceMap.getSourceMap(errorManager);
    if (consumer == null) {
      return;
    }
    Collection<String> sourcesContent = consumer.getOriginalSourcesContent();
    if (sourcesContent == null) {
      return;
    }
    Iterator<String> content = sourcesContent.iterator();
    Iterator<String> sources = consumer.getOriginalSources().iterator();
    while (sources.hasNext() && content.hasNext()) {
      String code = content.next();
      SourceFile source = SourceMapResolver.getRelativePath(
          inputSourceMap.getOriginalPath(), sources.next());
      if (source != null) {
        sourceMap.addSourceFile(source.getOriginalPath(), code);
      }
    }
    if (sources.hasNext() || content.hasNext()) {
      throw new RuntimeException(
          "Source map's \"sources\" and \"sourcesContent\" lengths do not match.");
    }
  }
158206
public void setInfo(SortedMap<String, Object> addInfo) {

        m_addInfoEditable = new TreeMap<String, Object>(addInfo);
    }
280067
public void setSamplingStatisticSummaries(java.util.Collection<SamplingStatisticSummary> samplingStatisticSummaries) {
        if (samplingStatisticSummaries == null) {
            this.samplingStatisticSummaries = null;
            return;
        }

        this.samplingStatisticSummaries = new java.util.ArrayList<SamplingStatisticSummary>(samplingStatisticSummaries);
    }
804337
protected static void dumpHierarchy (Component comp)
    {
        for (String indent = ""; comp != null; indent += " ") {
            log.info(indent + toString(comp));
            comp = comp.getParent();
        }
    }
909288
public void addChildTask(Task child)
   {
      child.m_parent = this;
      m_children.add(child);
      setSummary(true);

      if (getParentFile().getProjectConfig().getAutoOutlineLevel() == true)
      {
         child.setOutlineLevel(Integer.valueOf(NumberHelper.getInt(getOutlineLevel()) + 1));
      }
   }
890838
public void setStatistics(java.util.Collection<String> statistics) {
        if (statistics == null) {
            this.statistics = null;
            return;
        }

        this.statistics = new java.util.ArrayList<String>(statistics);
    }