Do the reflection to gather data.
173093
private function reflect()
    {
        $tokens = token_get_all($this->reflectedFileContent);
        $namespace = null;
        $classLevel = 0;
        $level = 0;
        $res = $uses = array();
        while (list(, $token) = each($tokens)) {
            switch (is_array($token) ? $token[0] : $token) {
                case T_CLASS:
                case T_INTERFACE:
                case T_TRAIT:
                    if ($name = $this->fetch($tokens, array(T_STRING))) {
                        $classLevel = $level + 1;
                        if ($namespace !== null) {
                            $objectFQN = $namespace . '\\' . $name;
                        } else {
                            $objectFQN = $name;
                        }
                        $this->objects[] = new ReflectionClass($objectFQN);
                    }
                    break;
                case T_NAMESPACE:
                    $namespace = '\\' . ltrim($this->fetch($tokens, array(T_STRING, T_NS_SEPARATOR)), '\\');
                    $res[$namespace] = array();
                    $uses = array();
                    break;
                case T_USE:
                    if ($classLevel === 0) {
                        while ($name = $this->fetch($tokens, array(T_STRING, T_NS_SEPARATOR))) {
                            $name = '\\' . ltrim($name, '\\');
                            if ($this->fetch($tokens, array(T_AS))) {
                                $uses[$this->fetch($tokens, array(T_STRING))] = $name;
                            } else {
                                $uses[$name] = $name;
                            }
                            if (!$this->fetch($tokens, array(','))) {
                                break;
                            }
                        }
                        $res[$namespace] = $uses;
                    }
                    break;
                case T_CURLY_OPEN:
                case T_DOLLAR_OPEN_CURLY_BRACES:
                case '{':
                    $level++;
                    break;
                case '}':
                    if ($level === $classLevel) {
                        $classLevel = 0;
                    }
                    $level--;
                    break;
            }
        }

        $this->namespaces = array_keys($res);
        $this->uses = $res;
    }
744998
private function __getReflection()
    {
        if (self::get_objectType() & self::PARSE_FUNC) {
            if (function_exists(self::get_objectName()))
                $this->reflection = new ReflectionFunction( self::get_objectName() ); 
            else
                trigger_error( "[CodeParser] Function '".self::get_objectName()."' not found", E_USER_WARNING );
        }
        elseif (self::get_objectType() & self::PARSE_METHOD) {
            $_s = self::get_objectName();
            if (strpos($_s, ':')) {
                list($_class, $_method) = explode(':', $_s, 2);
                if (class_exists($_class))
                    $this->reflection = new ReflectionMethod( $_class, $_method ); 
                else
                    trigger_error( "[CodeParser] Class '".$_class."' not found", E_USER_WARNING );
            } else {
                trigger_error( "[CodeParser] Class and method not found in '".self::get_objectName()."'", E_USER_WARNING );
            }
        }
        elseif (self::get_objectType() & self::PARSE_CLASS) {
            if (class_exists(self::get_objectName()))
                $this->reflection = new ReflectionClass( self::get_objectName() ); 
            else
                trigger_error( "[CodeParser] Class '".self::get_objectName()."' not found", E_USER_WARNING );
        }
    }
1206043
def populate_data(self, data):
        """"""
        sch = MockItemSchema()
        return Result(**{
            "callname": self.context.get("callname"),
            "result": sch.dump(data),
        })
696711
def get_data(self, entity):
        """"""
        data = self._filter_queryset('view_data', entity.data.all())

        return self._serialize_data(data)
394571
def collect(self):  # pragma: NO COVER
        
        for v_name, view_data in self.view_name_to_data_map.items():
            if v_name not in self.registered_views:
                continue
            desc = self.registered_views[v_name]
            for tag_values in view_data.tag_value_aggregation_data_map:
                agg_data = view_data.tag_value_aggregation_data_map[tag_values]
                metric = self.to_metric(desc, tag_values, agg_data)
                yield metric
109128
protected function saveDevelopmentData()
    {
        foreach (array_keys($this->packageManager->getFrozenPackages()) as $packageKey) {
            $pathAndFilename = $this->getPrecompiledReflectionStoragePath() . $packageKey . '.dat';
            if (!file_exists($pathAndFilename)) {
                $this->log(sprintf('Rebuilding precompiled reflection data for frozen package %s.', $packageKey), LogLevel::DEBUG);
                $this->freezePackageReflection($packageKey);
            }
        }
    }
734659
public function analyze()
	{
		$this->prepare();
		$this->lint();
		$this->phploc(TRUE);
		$this->phpcs(TRUE);
		$this->dependencyReport();
		$this->phpcpdReport();
	}
500286
def fetch_defense_data(self):
    """"""
    if self.defenses_data_initialized:
      return
    logging.info('Fetching defense data from datastore')
    # init data from datastore
    self.submissions.init_from_datastore()
    self.dataset_batches.init_from_datastore()
    self.adv_batches.init_from_datastore()
    # read dataset metadata
    self.read_dataset_metadata()
    # mark as initialized
    self.defenses_data_initialized = True
125134
def collect(self):
        """"""
        start = time()
        self._collect_copy_specs()
        self._collect_cmd_output()
        self._collect_strings()
        fields = (self.name(), time() - start)
        self._log_debug("collected plugin '%s' in %s" % fields)
28950
public void report() {
        synchronized (this) {
            report(registry.getGauges(filter),
                    registry.getCounters(filter),
                    registry.getHistograms(filter),
                    registry.getMeters(filter),
                    registry.getTimers(filter));
        }
    }
695901
final void addData(final AbstractMeter meter, final double data) {
        checkIfMeterExists(meter);
        meterResults.get(meter).add(data);
    }
389087
def _get_reflectance(self, projectables, optional_datasets):
        """"""
        _nir, _tb11 = projectables
        LOG.info('Getting reflective part of %s', _nir.attrs['name'])

        sun_zenith = None
        tb13_4 = None

        for dataset in optional_datasets:
            wavelengths = dataset.attrs.get('wavelength', [100., 0, 0])
            if (dataset.attrs.get('units') == 'K' and
                    wavelengths[0] <= 13.4 <= wavelengths[2]):
                tb13_4 = dataset
            elif ("standard_name" in dataset.attrs and
                  dataset.attrs["standard_name"] == "solar_zenith_angle"):
                sun_zenith = dataset

        # Check if the sun-zenith angle was provided:
        if sun_zenith is None:
            if sun_zenith_angle is None:
                raise ImportError("No module named pyorbital.astronomy")
            lons, lats = _nir.attrs["area"].get_lonlats_dask(CHUNK_SIZE)
            sun_zenith = sun_zenith_angle(_nir.attrs['start_time'], lons, lats)

        return self._refl3x.reflectance_from_tbs(sun_zenith, _nir, _tb11, tb_ir_co2=tb13_4)
235532
protected void processData(RI data) {
        // Check data against all rules
        Collection<RO> results = new ArrayList<RO>(resultHandlers.size());
        for (Rule<RI, RO> rule : rules) {
            results.add(rule.validate(data));
        }

        // Aggregate all results and process the output
        RHI aggregatedResult = resultAggregator.transform(results);
        processResult(aggregatedResult);
    }
926767
def gather(self, iterable):
        
        for result in self.lookup(iterable, gather=True):
            yield result
1241401
def check_data(self, data):
        
        data_objs = {
            data_src: data.objects.get(data_src) for data_src in data.layer
        }
        self._is_data_loaded = all(data_objs.values())
        return data_objs
168666
@Bean
    public Reflections reflections() {
        return new Reflections(new ConfigurationBuilder()
                                    .setUrls(ClasspathHelper.forPackage(scanPackage))
                                    .setScanners(new MethodAnnotationsScanner()));
    }
941396
def _collect_data(directory, input_ext, transcription_ext):
  """"""
  # Directory from string to tuple pair of strings
  # key: the filepath to a datafile including the datafile's basename. Example,
  #   if the datafile was "/path/to/datafile.wav" then the key would be
  #   "/path/to/datafile"
  # value: a pair of strings (media_filepath, label)
  data_files = {}
  for root, _, filenames in os.walk(directory):
    transcripts = [filename for filename in filenames
                   if transcription_ext in filename]
    for transcript in transcripts:
      transcript_path = os.path.join(root, transcript)
      with open(transcript_path, "r") as transcript_file:
        for transcript_line in transcript_file:
          line_contents = transcript_line.strip().split(" ", 1)
          media_base, label = line_contents
          key = os.path.join(root, media_base)
          assert key not in data_files
          media_name = "%s.%s"%(media_base, input_ext)
          media_path = os.path.join(root, media_name)
          data_files[key] = (media_base, media_path, label)
  return data_files