Builds a Hashtable to targets needing to be rebuilt keyed by compiler
configuration
509443
public static Map<CompilerConfiguration, Vector<TargetInfo>> getTargetsToBuildByConfiguration(
      final Map<String, TargetInfo> targets) {
    final Map<CompilerConfiguration, Vector<TargetInfo>> targetsByConfig = new HashMap<>();
    for (final TargetInfo target : targets.values()) {
      if (target.getRebuild()) {
        // FIXME: Types do not match between the key of targetsByConfig and the return value of target.getConfiguration
        Vector<TargetInfo> targetsForSameConfig = targetsByConfig.get(target.getConfiguration());
        if (targetsForSameConfig != null) {
          targetsForSameConfig.addElement(target);
        } else {
          targetsForSameConfig = new Vector<>();
          targetsForSameConfig.addElement(target);
          targetsByConfig.put((CompilerConfiguration) target.getConfiguration(), targetsForSameConfig);
        }
      }
    }
    return targetsByConfig;
  }
945226
def _build_static_table_mapping():
    
    static_table_mapping = {}
    for index, (name, value) in enumerate(CocaineHeaders.STATIC_TABLE, 1):
        header_name_search_result = static_table_mapping.setdefault(name, (index, {}))
        header_name_search_result[1][value] = index
    return static_table_mapping
425318
def compiled_hash_func(self):
        """"""

        def get_primary_key_str(pkey_name):
            return "str(self.{})".format(pkey_name)

        hash_str = "+ ".join([get_primary_key_str(n) for n in self.primary_keys])
        return ALCHEMY_TEMPLATES.hash_function.safe_substitute(concated_primary_key_strs=hash_str)
768620
def compile(attributes, object_ref, dynamic_attributes)
      if object_ref != :nil || !AttributeParser.available?
        return [:dynamic, AttributeCompiler.runtime_build(attributes, object_ref, dynamic_attributes)]
      end

      parsed_hashes = [dynamic_attributes.new, dynamic_attributes.old].compact.map do |attribute_hash|
        unless (hash = AttributeParser.parse(attribute_hash))
          return [:dynamic, AttributeCompiler.runtime_build(attributes, object_ref, dynamic_attributes)]
        end
        hash
      end
      attribute_values = build_attribute_values(attributes, parsed_hashes)
      AttributeBuilder.verify_attribute_names!(attribute_values.map(&:key))

      [:multi, *group_values_for_sort(attribute_values).map { |value_group|
        compile_attribute_values(value_group)
      }]
    end
935881
private function buildObjects(): void
    {
        //deep dependency level, start to array end for not use array_reverse
        for ($i = \count($this->tree) - 1; $i >= 0; $i--) {

            //class
            foreach ($this->tree[$i] as $class => $arguments) {

                //try to find object in class
                $object = $this->cache[$class] ?? null;

                //if object is not in cache and need arguments try to build
                if ($object === null && \count($arguments)) {

                    //build arguments
                    $args = $this->buildArguments($class, $arguments);

                    //store object with dependencies in cache
                    $this->cache[$class] = (new ReflectionClass($class))->newInstanceArgs($args);

                    continue;
                }

                if ($object === null) {

                    //store object in cache
                    $this->cache[$class] = (new ReflectionClass($class))->newInstance();
                }
            }
        }
    }
274863
protected void buildCache(int maxCacheSize) {
        if (blackPrefixList != null && !blackPrefixList.isEmpty()) {
            int min = Math.min(256, maxCacheSize);
            int max = Math.min(10240, maxCacheSize);
            ConcurrentLinkedHashMap.Builder<String, Boolean> builder = new ConcurrentLinkedHashMap.Builder<String, Boolean>()
                .initialCapacity(min).maximumWeightedCapacity(max);
            this.resultOfInBlackList = builder.build();
        } else {
            this.resultOfInBlackList = null;
        }
    }
186741
protected void rehash(KType[] fromKeys) {
    assert HashContainers.checkPowerOfTwo(fromKeys.length - 1);

    // Rehash all stored keys into the new buffers.
    final KType[] keys = Intrinsics.<KType[]> cast(this.keys);
    final int mask = this.mask;
    KType existing;
    for (int i = fromKeys.length - 1; --i >= 0;) {
      if (!Intrinsics.isEmpty(existing = fromKeys[i])) {
        int slot = hashKey(existing) & mask;
        while (!Intrinsics.isEmpty(keys[slot])) {
          slot = (slot + 1) & mask;
        }
        keys[slot] = existing;
      }
    }
  }
89211
def simple_transpile_modname_source_target(
            self, spec, modname, source, target):
        

        opener = self.opener
        bd_target = self._generate_transpile_target(spec, target)
        logger.info('Transpiling %s to %s', source, bd_target)
        with opener(source, 'r') as reader, opener(bd_target, 'w') as _writer:
            writer = SourceWriter(_writer)
            self.transpiler(spec, reader, writer)
            if writer.mappings and spec.get(GENERATE_SOURCE_MAP):
                source_map_path = bd_target + '.map'
                with open(source_map_path, 'w') as sm_fd:
                    self.dump(encode_sourcemap(
                        filename=bd_target,
                        mappings=writer.mappings,
                        sources=[source],
                    ), sm_fd)

                # just use basename
                source_map_url = basename(source_map_path)
                _writer.write('\n//# sourceMappingURL=')
                _writer.write(source_map_url)
                _writer.write('\n')
918541
def aks_upgrades_table_format(result):
    """"""
    # pylint: disable=import-error
    from jmespath import compile as compile_jmes, Options

    # This expression assumes there is one node pool, and that the master and nodes upgrade in lockstep.
    parsed = compile_jmes("""{
        name: name,
        resourceGroup: resourceGroup,
        masterVersion: controlPlaneProfile.kubernetesVersion || `unknown`,
        nodePoolVersion: agentPoolProfiles[0].kubernetesVersion || `unknown`,
        upgrades: controlPlaneProfile.upgrades || [`None available`] | sort_versions(@) | join(`, `, @)
    }""")
    # use ordered dicts so headers are predictable
    return parsed.search(result, Options(dict_cls=OrderedDict, custom_functions=_custom_functions()))
1107267
def build_compiler
      node_name   = nodename(:function)
      fact_values = facts_hash(node_name)
      trusted_values = trusted_facts_hash(node_name)

      # Allow different Hiera configurations:
      HieraPuppet.instance_variable_set('@hiera', nil) if defined? HieraPuppet

      # if we specify a pre_condition, we should ensure that we compile that
      # code into a catalog that is accessible from the scope where the
      # function is called
      Puppet[:code] = pre_cond

      node_facts = Puppet::Node::Facts.new(node_name, fact_values.dup)

      node_options = {
        :parameters => fact_values,
        :facts => node_facts
      }

      stub_facts! fact_values

      node = build_node(node_name, node_options)

      if Puppet::Util::Package.versioncmp(Puppet.version, '4.3.0') >= 0
        Puppet.push_context(
          {
            :trusted_information => Puppet::Context::TrustedInformation.new('remote', node_name, trusted_values)
          },
          "Context for spec trusted hash"
        )
      end

      compiler = Puppet::Parser::Compiler.new(node)
      compiler.compile
      if Puppet::Util::Package.versioncmp(Puppet.version, '4.0.0') >= 0
        loaders = Puppet::Pops::Loaders.new(adapter.current_environment)
        Puppet.push_context(
          {
            :loaders => loaders,
            :global_scope => compiler.context_overrides[:global_scope]
          },
        "set globals")
      end
      compiler
    end
1138447
def _build(lhs, rhs):
    """"""
    _check_under_condition()
    final_predicate, pred_set = _current_select()
    _check_and_add_pred_set(lhs, pred_set)
    _predicate_map.setdefault(lhs, []).append((final_predicate, rhs))
440236
def compute_targets_to_build(self, targets: Iterable[str]) -> Iterable[BuildTarget]:
        
        normalized_targets = set()
        for target in targets:
            normalized_targets.update(self._normalize_target(target))

        targets_to_parse = deque(normalized_targets)
        targets_seen = set(normalized_targets)
        targets_not_found = []
        build_targets = set()

        while targets_to_parse:
            next_target_string = targets_to_parse.popleft()
            next_target = self._parse_target(next_target_string)
            build_file = self.parser.parse_file(next_target.build_file_directory)
            if next_target.name not in build_file.targets:
                targets_not_found.append(next_target_string)
                continue
            target_to_build = build_file.targets[next_target.name]
            build_targets.add(target_to_build)

            new_targets = [
                dependency
                for dependency in target_to_build.dependencies
                if dependency not in targets_seen
            ]
            targets_to_parse.extend(new_targets)
            targets_seen.update(new_targets)

        if targets_not_found and self.fail_on_unbuilt_target:
            raise BuilderException(
                "Target(s) could not be built: {}".format(", ".join(targets_not_found)),
                targets=targets_not_found,
            )
        return build_targets
917489
function (target) {
        var element = this.hashForMethods[target.id]
        if (element) {
            element.paused = false
        }

        var elementUpdate = this.hashForUpdates[target.id]
        //console.log('foo', target.id, elementUpdate)
        if (elementUpdate) {
            elementUpdate.paused = false
        }
    }
812032
def build_mapping(values)
      {}.tap do |hash|
        values.each_with_index { |key, index| hash[key] = (0b1 << index) }
      end
    end
1174781
function build(ctx, keypath, value) {
  const sets = [];

  // set multiple keypaths in one go
  if (isObject(keypath)) {
    for (const k in keypath) {
      if (hasOwn(keypath, k)) {
        sets.push([findModel(ctx, k).model, keypath[k]]);
      }
    }
  } else {
    // set a single keypath
    sets.push([findModel(ctx, keypath).model, value]);
  }

  return sets;
}
282184
public CHDMinimalPerfectHashFunction<T> build() throws IOException {
			if (built) throw new IllegalStateException("This builder has been already used");
			built = true;
			if (transform == null) {
				if (chunkedHashStore != null) transform = chunkedHashStore.transform();
				else throw new IllegalArgumentException("You must specify a TransformationStrategy, either explicitly or via a given ChunkedHashStore");
			}
			return new CHDMinimalPerfectHashFunction<>(keys, transform, lambda, loadFactor, signatureWidth, tempDir, chunkedHashStore);
		}
887469
private static ImmutableMap<String, Annotation> buildAnnotations(Iterable<String> whitelist) {
    ImmutableMap.Builder<String, Annotation> annotationsBuilder = ImmutableMap.builder();
    annotationsBuilder.putAll(Annotation.recognizedAnnotations);
    for (String unrecognizedAnnotation : whitelist) {
      if (!unrecognizedAnnotation.isEmpty()
          && !Annotation.recognizedAnnotations.containsKey(unrecognizedAnnotation)) {
        annotationsBuilder.put(unrecognizedAnnotation, Annotation.NOT_IMPLEMENTED);
      }
    }
    return annotationsBuilder.build();
  }