---------------- COMMON ----------------
4280
public static org.apache.hadoop.mapred.JobConf asJobConf(Configuration cfg) {
        return cfg instanceof org.apache.hadoop.mapred.JobConf
            ? (org.apache.hadoop.mapred.JobConf) cfg
            : new org.apache.hadoop.mapred.JobConf(cfg);
    }
618434
public ArrayList<Pair<String, V>> commonPrefixSearch(String key, int offset, int maxResults)
    {
        byte[] keyBytes = key.getBytes(utf8);
        List<Pair<Integer, Integer>> pairList = commonPrefixSearch(keyBytes, offset, maxResults);
        ArrayList<Pair<String, V>> resultList = new ArrayList<Pair<String, V>>(pairList.size());
        for (Pair<Integer, Integer> pair : pairList)
        {
            resultList.add(new Pair<String, V>(new String(keyBytes, 0, pair.first), valueArray[pair.second]));
        }
        return resultList;
    }
1371326
def select_common_params(from:)
      return from if @common_params.empty?
      from.select {|k,v| valid_common_param?(k)}
    end
960389
def print_common_terms(common_terms):
    
    if not common_terms:
        print('No duplicates')
    else:
        for set_pair in common_terms:
            set1, set2, terms = set_pair
            print('{} and {} have in common:'.format(set1, set2))
            for term in terms:
                print('    {}'.format(term))
444052
def __update_common(self):
        """"""

        if "TCON" in self:
            # Get rid of "(xx)Foobr" format.
            self["TCON"].genres = self["TCON"].genres

        mimes = {"PNG": "image/png", "JPG": "image/jpeg"}
        for pic in self.getall("APIC"):
            if pic.mime in mimes:
                newpic = APIC(
                    encoding=pic.encoding, mime=mimes[pic.mime],
                    type=pic.type, desc=pic.desc, data=pic.data)
                self.add(newpic)
426577
public function commonItems()
    {
        return array_intersect(array_keys($this->input->getColumnsInfo()),
            array_keys($this->output->getColumnsInfo()));
    }
278740
public MatcherPath commonPrefix(MatcherPath that) {
        checkArgNotNull(that, "that");
        if (element.level > that.element.level) return parent.commonPrefix(that);
        if (element.level < that.element.level) return commonPrefix(that.parent);
        if (this == that) return this;
        return (parent != null && that.parent != null) ? parent.commonPrefix(that.parent) : null;
    }
1208321
public static Collector<CharSequence, ?, String> commonPrefix() {
        return Collectors.collectingAndThen(
            Collectors.reducing((CharSequence s1, CharSequence s2) -> {
                if (s1 == null || s2 == null)
                    return "";

                int l = Math.min(s1.length(), s2.length());
                int i;
                for (i = 0; i < l && s1.charAt(i) == s2.charAt(i); i++);

                return s1.subSequence(0, i);
            }),
            s -> s.map(Objects::toString).orElse("")
        );
    }
426950
public function common_terms(string $field, string $query, float $cutoffFrequency): Common
    {
        return new Common($field, $query, $cutoffFrequency);
    }
347821
public static Class commonClass(Class c1, Class c2)
    {
        if (c1 == c2)
        {
            return c1;
        }

        if ((c1 == Object.class) || c1.isAssignableFrom(c2))
        {
            return c1;
        }

        if (c2.isAssignableFrom(c1))
        {
            return c2;
        }

        if (c1.isPrimitive() || c2.isPrimitive())
        {
            // REVISIT: we could try to autoconvert to Object or something appropriate
            throw new IllegalArgumentException("incompatible types " + c1 + " and " + c2);
        }

        // REVISIT: we could try to find a common supper class or interface
        return Object.class;
    }
260618
private Map<Product, Product> diffProducts(List<Product> pcm1Products, List<Product> pcm2Products, PCMElementComparator comparator, DiffResult result) {
        List<Product> commonProducts = new ArrayList<Product>();
        List<Product> productsOnlyInPCM1 = new ArrayList<Product>();
        List<Product> productsOnlyInPCM2 = new ArrayList<Product>(pcm2Products);

        Map<Product, Product> equivalentProducts = new HashMap<Product, Product>();

        for (Product p1 : pcm1Products) {

            boolean similarProduct = false;

            for (Product p2 : pcm2Products) {
                similarProduct = comparator.similarProduct(p1, p2);
                if (similarProduct) {
                    commonProducts.add(p1);
                    productsOnlyInPCM2.remove(p2);
                    equivalentProducts.put(p1, p2);
                    break;
                }
            }

            if (!similarProduct) {
                productsOnlyInPCM1.add(p1);
            }

        }

        result.setCommonProducts(commonProducts);
        result.setProductsOnlyInPCM1(productsOnlyInPCM1);
        result.setProductsOnlyInPCM2(productsOnlyInPCM2);

        return equivalentProducts;
    }
179433
public LinkedList<Map.Entry<String, V>> commonPrefixSearchWithValue(String key)
    {
        char[] chars = key.toCharArray();
        return commonPrefixSearchWithValue(chars, 0);
    }
1157824
function common_end(params, configs) {
      params.code = params.code || configs.compiler.compile(params);
      if (typeof params.attach == "object") {
        for (var i in params.attach) {
          params.data[i] = params.attach[i];
        }
      } else if (typeof params.attach == "function") {
        var ret = params.attach(params.data);
        params.data = (ret) ? ret : params.data;
      }
      params.result = params.result || configs.compiler.run(params);
      /* execute end functions */
      for (var i in configs.end) {
        configs.end[i].call(configs, params);
      }
      return params.result;
    }
650283
public Stream<Triple> common() {
        return stream(spliteratorUnknownSize(common.find(ANY, ANY, ANY), IMMUTABLE), false);
    }
677253
def set_common_attributes(span):
    """"""
    common = {
        attributes_helper.COMMON_ATTRIBUTES.get('AGENT'): AGENT,
    }
    common_attrs = Attributes(common)\
        .format_attributes_json()\
        .get('attributeMap')

    _update_attr_map(span, common_attrs)
1257665
function common_doc(string, status, type){
    if( ! string ){ string = ''; }
    if( ! status ){ status = 200; }
    if( ! type ){ type = 'text/html'; }
    return {
	body: [string],
	headers: {'Content-Type': type},
	status: status
    };
}
242805
@Nonnull
  @MayContainNull
  @Weight(Weight.Unit.NORMAL)
  public static <T> T[] joinArrays(@MayContainNull final T[]... arrays) {
    int commonLength = 0;
    for (final T[] array : arrays) {
      if (array != null) {
        commonLength += array.length;
      }
    }
    @SuppressWarnings("unchecked")
    final T[] result = (T[]) Array.newInstance(arrays.getClass().getComponentType().getComponentType(), commonLength);
    int position = 0;
    for (final T[] array : arrays) {
      if (array != null) {
        System.arraycopy(array, 0, result, position, array.length);
        position += array.length;
      }
    }
    return result;
  }