Useless to have collector without analyzer but let's check so we don't hang or blow up.
493669
protected void sendCollectorDataToAnalyzerIfPresent(Serializable data) {
		if (analyzerStatusQueue != null) {
			logger.finer("Sending collector partition data: " + data + " to analyzer queue: " + analyzerStatusQueue);
			PartitionDataWrapper dataWrapper = new PartitionDataWrapper();
			dataWrapper.setCollectorData(data);
			dataWrapper.setEventType(PartitionEventType.ANALYZE_COLLECTOR_DATA);
			analyzerStatusQueue.add(dataWrapper);
		} else {
			logger.fine("Analyzer not configured.");
		}
	}
959520
public function stopCollection()
	{
		if ( !$this->enabled() ) {
			return;
		}

		$data = xdebug_get_code_coverage();
		xdebug_stop_code_coverage();

		foreach ( $this->excludedFiles as $file ) {
			unset($data[$file]);
		}

		$unique_id = md5(uniqid(rand(), true));
		file_put_contents(
			$name = $this->getStorageLocationPrefix() . '.' . $unique_id . '.' . $_COOKIE[self::TEST_ID_VARIABLE],
			serialize($data)
		);
	}
488663
protected boolean shouldAnalyze() {
        if (analyzer instanceof FileTypeAnalyzer) {
            final FileTypeAnalyzer fileTypeAnalyzer = (FileTypeAnalyzer) analyzer;
            return fileTypeAnalyzer.accept(dependency.getActualFile());
        }
        return true;
    }
1199361
protected void checkCollectionType(Collection c) {
        if (type != null) {
            for (Object element : c) {
                checkType(element);
            }
        }
    }
1151378
public synchronized void startCollecting() {
		paused = false;
		if (thread != null)
			return;

		packages = new CountMap<String>(MAX_PACKAGES);
		selfMethods = new CountMap<String>(MAX_METHODS);
		stackMethods = new CountMap<String>(MAX_METHODS);
		lines = new CountMap<String>(MAX_LINES);
		total = 0;

		started = true;
		thread = new Thread(this);
		thread.setName("Profiler");
		thread.setDaemon(true);
		thread.start();
	}
438156
def DeregisterHelper(cls, analyzer_helper):
    
    if analyzer_helper.type_indicator not in cls._analyzer_helpers:
      raise KeyError(
          'Analyzer helper object not set for type indicator: {0:s}.'.format(
              analyzer_helper.type_indicator))

    analyzer_helper = cls._analyzer_helpers[analyzer_helper.type_indicator]

    cls._FlushCache(analyzer_helper.format_categories)

    del cls._analyzer_helpers[analyzer_helper.type_indicator]
401220
public boolean mightContain(T item) {
		BucketAndTag pos = hasher.generate(item);
		long i1 = pos.index;
		long i2 = hasher.altIndex(pos.index, pos.tag);
		bucketLocker.lockBucketsRead(i1, i2);
		try {
			if (table.findTag(i1, i2, pos.tag)) {
				return true;
			}
		} finally {
			bucketLocker.unlockBucketsRead(i1, i2);
		}
		return checkIsVictim(pos);
	}
331909
private void read(final ActionCollector collector) throws IOException
   {
      if (!dir.fileExists(REDO_LOG))
      {
         return;
      }
      InputStream in = new IndexInputStream(dir.openInput(REDO_LOG));
      BufferedReader reader = null;
      try
      {
         reader = new BufferedReader(new InputStreamReader(in));
         String line;
         while ((line = reader.readLine()) != null)
         {
            try
            {
               collector.collect(MultiIndex.Action.fromString(line));
            }
            catch (IllegalArgumentException e)
            {
               log.warn("Malformed redo entry: " + e.getMessage());
            }
         }
      }
      finally
      {
         if (reader != null)
         {
            try
            {
               reader.close();
            }
            catch (IOException e)
            {
               log.warn("Exception while closing redo log: " + e.toString());
            }
         }
         if (in != null)
         {
            try
            {
               in.close();
            }
            catch (IOException e)
            {
               log.warn("Exception while closing redo log: " + e.toString());
            }
         }
      }
   }
1136189
function(){
        while(this.numPairs>0){
            var pair=this.pairs[--this.numPairs];
            pair.shape1=null;
            pair.shape2=null;
        }
        this.numPairChecks=0;
        this.collectPairs();
    }
667998
public static boolean notEmptyCollectionCheck(Object parameter, String error){
        if(parameter == null || (parameter instanceof Collection && ((Collection) parameter).size() == 0)){
            throw new IllegalArgumentException(error);
        }
        return true;
    }
606824
def freeze():
    """"""
    echo_waiting('Verifying collected packages...')
    catalog, errors = make_catalog()
    if errors:
        for error in errors:
            echo_failure(error)
        abort()

    static_file = get_agent_requirements()

    echo_info('Static file: {}'.format(static_file))

    pre_packages = list(read_packages(static_file))

    catalog.write_packages(static_file)

    post_packages = list(read_packages(static_file))
    display_package_changes(pre_packages, post_packages)
462935
function getCollector() {
    var collector = new Collector();

    if (global['__coverage__']) {
        collector.add(global['__coverage__']);
    } else {
        console.error('No global coverage found for the node process');
    }
    return collector;
}
616106
def collect(self):
        """"""
        collectors = None
        with self._lock:
            collectors = copy.copy(self._collector_to_names)
        for collector in collectors:
            for metric in collector.collect():
                yield metric
573875
private boolean shouldExtract(ProjectGenerationRequest request,
			ProjectGenerationResponse response) {
		if (request.isExtract()) {
			return true;
		}
		// explicit name hasn't been provided for an archive and there is no extension
		if (isZipArchive(response) && request.getOutput() != null
				&& !request.getOutput().contains(".")) {
			return true;
		}
		return false;
	}
456958
private void collectGarbage() {
		// dispose unused objects if any
		NativePointerPhantomReference toCollect;
		while((toCollect = (NativePointerPhantomReference)collectableObjects.poll()) != null) {
		    liveComObjects.remove(toCollect);
		    toCollect.clear();
		    toCollect.releaseNative();
		}
	}
1005733
protected boolean matchesWithoutDeleteCheck(Object o, Extractor extractor)
    {
        String s = ((StringExtractor) extractor).stringValueOf(o);
        return s != null && s.indexOf(this.getParameter()) < 0;
    }
258650
def filter_collection(ignore_keys)
      return @collection if ignore_keys.blank?
      @collection.select { |kv_item| !ignore_keys.include?(kv_item.keys.first) }
    end