Given the set of generated targets, and refined build
            properties, determines and sets appripriate usage requirements
            on those targets.
965231
def compute_usage_requirements (self, subvariant):
        
        assert isinstance(subvariant, virtual_target.Subvariant)
        rproperties = subvariant.build_properties ()
        xusage_requirements =self.evaluate_requirements(
            self.usage_requirements_, rproperties, "added")

        # We generate all dependency properties and add them,
        # as well as their usage requirements, to result.
        (r1, r2) = self.generate_dependency_properties(xusage_requirements.dependency (), rproperties)
        extra = r1 + r2

        result = property_set.create (xusage_requirements.non_dependency () + extra)

        # Propagate usage requirements we've got from sources, except
        # for the <pch-header> and <pch-file> features.
        #
        # That feature specifies which pch file to use, and should apply
        # only to direct dependents. Consider:
        #
        #   pch pch1 : ...
        #   lib lib1 : ..... pch1 ;
        #   pch pch2 :
        #   lib lib2 : pch2 lib1 ;
        #
        # Here, lib2 should not get <pch-header> property from pch1.
        #
        # Essentially, when those two features are in usage requirements,
        # they are propagated only to direct dependents. We might need
        # a more general mechanism, but for now, only those two
        # features are special.
        properties = []
        for p in subvariant.sources_usage_requirements().all():
            if p.feature.name not in ('pch-header', 'pch-file'):
                properties.append(p)
        if 'shared' in rproperties.get('link'):
            new_properties = []
            for p in properties:
                if p.feature.name != 'library':
                    new_properties.append(p)
            properties = new_properties

        result = result.add_raw(properties)
        return result
404853
public void setSafariBuiltinFavorites() {
    File[] files = app.listFiles(new FilenameFilter() {
      @Override
      public boolean accept(File dir, String name) {
        return name.startsWith("BuiltinFavorites") && name.endsWith(".plist");
      }
    });
    for (File plist : files) {
      setSafariBuiltinFavories(plist);
    }
  }
980194
public void setProjectProperties(final Properties properties) {
        generateProjectPropertiesFile(getName(), propertyFile, true, properties, false, null, false);
        loadProperties();
    }
52871
private Collection<Key<?>> getRequiredSourcesTargeting(
      DependencyGraph graph, Iterable<Key<?>> targets) {
    Collection<Key<?>> requiredSources = new LinkedHashSet<Key<?>>();
    for (Key<?> target : targets) {
      for (Dependency edge : graph.getDependenciesTargeting(target)) {
        if (!edge.isOptional()) {
          PrettyPrinter.log(logger, TreeLogger.DEBUG, "Removing the key %s because of %s",
              edge.getSource(), edge);
          requiredSources.add(edge.getSource());
        }
      }
    }
    return requiredSources;
  }
863432
protected function checkRequirements()
    {
        $required_properties = array('_buildFile');
        foreach ($required_properties as $required_property) {
            if (empty($this->$required_property)) {
                throw new \BuildException(
                    "Missing required property '" . $required_property . "'."
                );
            }
        }
    }
442364
def cmd_build(conf: Config, run_tests: bool=False):
    """"""
    build_context = BuildContext(conf)
    populate_targets_graph(build_context, conf)
    build_context.build_graph(run_tests=run_tests)
    build_context.write_artifacts_metadata()
1354095
def installedRequirements(self, target):
    
    myDepends = dependentsOf(self.__class__)
    for dc in self.store.query(_DependencyConnector,
                               _DependencyConnector.target == target):
        if dc.installee.__class__ in myDepends:
            yield dc.installee
293911
def get_prebuilt_targets(build_context):
    
    logger.info('Scanning for cached base images')
    # deps that are part of cached based images
    contained_deps = set()
    # deps that are needed by images that are going to be built,
    # but are not part of their base images
    required_deps = set()
    # mapping from target name to set of all its deps (descendants)
    cached_descendants = CachedDescendants(build_context.target_graph)

    for target_name, target in build_context.targets.items():
        if 'image_caching_behavior' not in target.props:
            continue
        image_name = get_image_name(target)
        image_tag = target.props.image_tag
        icb = ImageCachingBehavior(image_name, image_tag,
                                   target.props.image_caching_behavior)
        target.image_id = handle_build_cache(build_context.conf, image_name,
                                             image_tag, icb)
        if target.image_id:
            # mark deps of cached base image as "contained"
            image_deps = cached_descendants.get(target_name)
            contained_deps.update(image_deps)
            contained_deps.add(target.name)
        else:
            # mark deps of image that is going to be built
            # (and are not deps of its base image) as "required"
            image_deps = cached_descendants.get(target_name)
            base_image_deps = cached_descendants.get(target.props.base_image)
            required_deps.update(image_deps - base_image_deps)
    return contained_deps - required_deps
413950
private void processProjectProperties()
   {
      //
      // Process common attributes
      //
      List<Row> rows = getRows("project", "proj_id", m_projectID);
      m_reader.processProjectProperties(rows, m_projectID);

      //
      // Process XER-specific attributes
      //
      if (m_defaultCurrencyData != null)
      {
         m_reader.processDefaultCurrency(m_defaultCurrencyData);
      }

      processScheduleOptions();
   }
564375
def create_dep_usage_graph(self, targets):
    
    with self.invalidated(targets,
                          invalidate_dependents=True) as invalidation_check:
      target_to_vts = {}
      for vts in invalidation_check.all_vts:
        target_to_vts[vts.target] = vts

      if not self.get_options().use_cached:
        node_creator = self.calculating_node_creator(
          self.context.products.get_data('classes_by_source'),
          self.context.products.get_data('runtime_classpath'),
          self.context.products.get_data('product_deps_by_src'),
          target_to_vts)
      else:
        node_creator = self.cached_node_creator(target_to_vts)

      return DependencyUsageGraph(self.create_dep_usage_nodes(targets, node_creator),
                                  self.size_estimators[self.get_options().size_estimator])
694357
protected function setBuildItems()
    {
        $crcy = Factory::create($this->code);

        $refl = new \ReflectionClass($crcy);
        $fmt = $refl->getProperty('displayFormat'); $fmt->setAccessible(true);
        $locale = $refl->getProperty('locale'); $locale->setAccessible(true);
        $precision = $refl->getProperty('precision'); $precision->setAccessible(true);

        $this->buildItems = [
            'code' => $this->code,
            'name' => $crcy->getName()->get(),
            'symbol' => $crcy->getSymbol()->get(),
            'displayFormat' => $fmt->getValue($crcy)->get(),
            'locale' => $locale->getValue($crcy)->get(),
            'precision' => $precision->getValue($crcy)->get(),
            'value' => $crcy()
        ];
    }
289751
def _construct(self, targets, control_flow_slice=False):
        

        if control_flow_slice:
            simruns = [ r for r, _ in targets ]
            self._construct_control_flow_slice(simruns)

        else:
            self._construct_default(targets)
1259698
private void processPostStartRequirements(ConditionContext context, AnnotationValue<Requires> requirements) {
        processPreStartRequirements(context, requirements);

        if (context.isFailing()) {
            return;
        }

        if (!matchesPresenceOfBeans(context, requirements)) {
            return;
        }

        if (!matchesAbsenceOfBeans(context, requirements)) {
            return;
        }

        matchesCustomConditions(context, requirements);
    }
1217953
function (target, src) {
	for (var key in src) {
		if (src.hasOwnProperty(key)) {
			target[key] = src[key];
		}
	}
}
140340
def _validate_build_target(self, spec, target):
        

        if not realpath(target).startswith(spec[BUILD_DIR]):
            raise ValueError('build_target %s is outside build_dir' % target)
183285
def mark_targets_as_explicit (self, target_names):
        """"""

        # Record the name of the target, not instance, since this
        # rule is called before main target instaces are created.
        assert is_iterable_typed(target_names, basestring)
        self.explicit_targets_.update(target_names)
927497
private void initBuildScoreSettings() {
    BuildScoreSettings buildScoreSettings = this.scoreSettings.getBuildWidget();
    if (null != buildScoreSettings) {
      buildScoreSettings.setCriteria(
        Utils.mergeCriteria(this.scoreSettings.getCriteria(), buildScoreSettings.getCriteria())
      );

      initBuildScoreChildrenSettings(buildScoreSettings);

    }
  }