Removes cumulated stats from producers inside decorator.
@param decorator {@link ProducerDecoratorBean}
185060
private void removeCumulatedStats(ProducerDecoratorBean decorator) {
        if (decorator == null) {
            LOGGER.warn("Decorator is empty");
            return;
        }

        for (ProducerAO producer : decorator.getProducers()) {
            for (Iterator<StatLineAO> statLineIterator = producer.getLines().listIterator(); statLineIterator.hasNext(); ) {
                if (CUMULATED_STAT_NAME_VALUE.equals(statLineIterator.next().getStatName())) {
                    statLineIterator.remove();
                }
            }
        }
    }
111376
public void dispose(){
        classAnalysisMap.clear();
        classAnalysisEngineMap.clear();
        analysisLocals.clear();
        databaseFactoryMap.clear();
        databaseMap.clear();
        methodAnalysisEngineMap.clear();
    }
647713
public void removeBeanContextMembershipListener(BeanContextMembershipListener listener)
	{
		if (listener == null)
		{
			throw new NullPointerException();
		}
		synchronized (bcmListeners)
		{
			bcmListeners.remove(listener);
		}
	}
251721
public static void clearClassLoader(final ClassLoader classLoader) {
        BeanPropertiesCache.clear(classLoader);
        final Iterator<Map.Entry<CacheKey, String>> it = CLASS_CACHE.entrySet().iterator();
        while (it.hasNext()) {
            final CacheKey key = it.next().getKey();
            if (key.loader == classLoader) {
                it.remove();
            }
        }
    }
167272
public void addDecorator(DayViewDecorator decorator) {
    if (decorator == null) {
      return;
    }
    dayViewDecorators.add(decorator);
    adapter.setDecorators(dayViewDecorators);
  }
1259352
private void populateGraphData(final IDecorator decorator, final Map<String, GraphDataBean> graphData, final List<StatLineAO> allStatLines) {
		final int cumulatedIndex = getCumulatedIndex(allStatLines);

		for (int i = 0; i < allStatLines.size(); i++) {
			if (i == cumulatedIndex)
				continue;

			//TODO fix filterzero.
//			if (!filterZero || !s.isEmpty(intervalName)){

			final StatLineAO line = allStatLines.get(i);
			final List<StatValueAO> statValues = line.getValues();

			for (StatValueAO statValue : statValues) {
				final String graphKey = decorator.getName() + '_' + statValue.getName();
				final GraphDataValueBean value = new GraphDataValueBean(line.getStatName(), statValue.getRawValue());

				final GraphDataBean graphDataBean = graphData.get(graphKey);
				if (graphDataBean != null)
					graphDataBean.addValue(value);
			}
		}
	}
415358
public Decorators<Beans<T>> getOrCreateDecorators()
   {
      List<Node> nodeList = childNode.get("decorators");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new DecoratorsImpl<Beans<T>>(this, "decorators", childNode, nodeList.get(0));
      }
      return createDecorators();
   }
913159
@SuppressWarnings("PMD.GuardLogStatement")
    public void remove(Object obj) {
        synchronized (this) {
            running -= 1;
            if (generators != null) {
                generators.remove(obj);
                generatorTracking.finest(() -> "Removed generator " + obj
                    + ", " + generators.size() + " generators registered: "
                    + generators.keySet());
            }
            if (running == 0) {
                generatorTracking
                    .finest(() -> "Zero generators, notifying all.");
                keepAlive.interrupt();
                notifyAll();
            }
        }
    }
1012922
@SuppressWarnings("javadoc")
	public void removeFactory(ValidatorFactory factory) {
		// this is to avoid adding items to the cache that were removed while
		// iterating
		synchronized (map) {
			providers.remove(factory);
			map.clear();
		}
	}
423650
public void flush() {
        for (ProducerType type : ProducerType.ALL_TYPES) {
            KafkaProducer<String, byte[]> producer = getJavaProducer(type);
            if (producer != null) {
                producer.flush();
            }
        }
    }
972747
protected final T getStats(OnDemandStatsProducer producer, String name) {
        try {
            return getStatsClass().cast(producer.getStats(name));
        } catch (ClassCastException e) {
            LOGGER.error("getStats(): Unexpected stats type", e);
        } catch (OnDemandStatsProducerException e) {
            LOGGER.error("getStats(): Failed to get stats for name=" + name, e);
        }

        return null;
    }
595033
public void purgeMethodAnalyses(MethodDescriptor methodDescriptor) {
        Set<Map.Entry<Class<?>, Map<MethodDescriptor, Object>>> entrySet = methodAnalysisObjectMap.entrySet();
        for (Iterator<Map.Entry<Class<?>, Map<MethodDescriptor, Object>>> i = entrySet.iterator(); i.hasNext();) {
            Map.Entry<Class<?>, Map<MethodDescriptor, Object>> entry = i.next();

            Class<?> cls = entry.getKey();

            // FIXME: hack
            if (!DataflowAnalysis.class.isAssignableFrom(cls) && !Dataflow.class.isAssignableFrom(cls)) {
                // There is really no need to purge analysis results
                // that aren't CFG-based.
                // Currently, only dataflow analyses need
                // to be purged.
                continue;
            }

            entry.getValue().remove(methodDescriptor);
        }
    }
514374
private void unregisterEventsForResourceBuilder(ResourceBuilderModel resourceBuilder) {
        resourceBuilder.announceEvents().stream()
                .map(eventSubscribers::get)
                .filter(Objects::nonNull)
                .forEach(list -> list.remove(resourceBuilder));
    }
322978
def remove_hairs_decorator(fn=None, hairs=HAIRS):
    
    def decorator_wrapper(fn):
        @wraps(fn)
        def decorator(*args, **kwargs):
            out = fn(*args, **kwargs)

            return remove_hairs(out, hairs)

        return decorator

    if fn:
        return decorator_wrapper(fn)

    return decorator_wrapper
939740
def _onDecorator( self, name, line, pos, absPosition ):
        "  "
        # A class or a function must be on the top of the stack
        self.objectsStack[ -1 ].decorators.append(
                                            Decorator( name, line, pos,
                                                       absPosition ) )
        return
651292
public void addLabelDecorator(ILabelDecorator decorator)
	{
		if (fLabelDecorators == null)
		{
			fLabelDecorators = new ArrayList<ILabelDecorator>(2);
		}
		fLabelDecorators.add(decorator);
	}
989947
private void cleanup() {
        StatsDataReference ref = null;
        while ((ref = (StatsDataReference) statisticsReferenceQueue.poll()) != null) {
            StatsData oldStats = null;
            StatsData updatedStats = null;
            do {
                oldStats = terminatedThreadStats.get();
                updatedStats = aggregateStats(oldStats, ref.statsData);
            } while (!terminatedThreadStats.compareAndSet(oldStats, updatedStats));
            allReferences.remove(ref);
        }
    }