Merges all objects, sections and objectGroups from spec
175724
public void merge(PageSpec spec) {
        if (spec == null) {
            throw new IllegalArgumentException("Cannot merge null spec");
        }
        objects.putAll(spec.getObjects());
        sections.addAll(spec.getSections());
        objectGroups.putAll(spec.getObjectGroups());
	}
900920
def merge(self, obj):
        
        for attribute in dir(obj):
            if '__' in attribute:
                continue
            setattr(self, attribute, getattr(obj, attribute))
548902
function merge (src, dest) {
  if (src != null &&
        dest != null &&
        !Array.isArray(src) &&
        !Array.isArray(dest) &&
        typeof src === 'object' &&
        typeof dest === 'object') {
    Object.getOwnPropertyNames(src)
            .forEach(function (prop) {
              var descriptor = Object.getOwnPropertyDescriptor(src, prop);
              descriptor.value = merge(descriptor.value, dest[prop]);
              Object.defineProperty(dest, prop, descriptor);
            });

    return dest;
  }

  return src;
}
209106
function mergeChanges(filename, extlang, lines, objects) {

    if (objects.length > 0) {

      console.log(filename, extlang);

      var obj = new DataObject({name: filename, extlang: extlang});
      obj.lines = lines;

      for (var i in objects) {
        var o = objects[i];
        var data = lines.slice(o.lines[0], o.lines[1]).join('\n');
        obj.set(o, {hash:md5(data), lines: o.lines});
      }

      storage.set(obj);
    }
  }
331030
def unify_partitions(self):
        

        partitions = self.collect_segment_partitions()

        # For each group, copy the segment partitions to the parent partitions, then
        # delete the segment partitions.

        with self.progress.start('coalesce', 0, message='Coalescing partition segments') as ps:

            for name, segments in iteritems(partitions):
                ps.add(item_type='partitions', item_count=len(segments),
                       message='Colescing partition {}'.format(name))
                self.unify_partition(name, segments, ps)
1063143
function merge(acc, item) {
  if (!item) {
    return acc;
  }

  return deepmerge(acc, item, {
    clone: false, // No need to clone deep, it's way faster.
  });
}
1054346
public function mergeWith(self $specs): self
    {
        $clone = clone $this;
        if (null === $clone->constructor) {
            $clone->constructor = $specs->constructor;
        }
        
        $clone->properties = $this->properties->mergeWith($specs->properties);
        $clone->calls = $this->calls->mergeWith($specs->calls);

        return $clone;
    }
850327
def mergeclean(args):
    
    from itertools import groupby
    from jcvi.formats.base import FileShredder

    p = OptionParser(mergeclean.__doc__)
    p.set_sep(sep="_", help="Separator to group per prefix")
    opts, args = p.parse_args(args)

    if len(args) < 1:
        sys.exit(not p.print_help())

    files = sorted(args)
    sep = opts.sep
    key = lambda x: x.split(sep)[0]
    mtime = lambda x: os.stat(x).st_mtime
    for pf, fs in groupby(files, key=key):
        fs = list(fs)
        if len(fs) == 1:
            continue
        newest_f = max(fs, key=mtime)
        print("|".join(fs), "=>", newest_f, file=sys.stderr)
        fs.remove(newest_f)
        FileShredder(fs)
1011571
public void merge(SrcTree srcTree) {
        mergeTestClassTable(srcTree.rootClassTable, rootClassTable);
        mergeTestClassTable(srcTree.subClassTable, subClassTable);
        mergeTestMethodTable(srcTree.rootMethodTable, rootMethodTable);
        mergeTestMethodTable(srcTree.subMethodTable, subMethodTable);
        mergeTestFieldTable(srcTree.fieldTable, fieldTable);
    }
1332532
def merged(cls, *flatterms: 'FlatTerm') -> 'FlatTerm':
        
        return cls(cls._combined_wildcards_iter(sum(flatterms, cls.empty())))
750841
def merge_all_config_sections_into_a_single_dict(desired_type: Type[T], config: ConfigParser, logger: Logger,
                                                 conversion_finder: ConversionFinder, **kwargs) -> Dict[str, Any]:
    

    # convert the whole config to a dictionary by flattening all sections. If a key is found twice in two different
    # sections an error is raised
    results = dict()
    for section, props in config.items():
        for key, value in props.items():
            if key in results.keys():
                # find all sections where it appears
                sections_where_it_appears = [s for s, p in config.items() if key in p.keys()]
                raise MultipleKeyOccurenceInConfigurationError.create(key, sections_where_it_appears)
            else:
                results[key] = value

    return ConversionFinder.convert_collection_values_according_to_pep(results, desired_type, conversion_finder,
                                                                       logger, **kwargs)
407909
public void addSpec(String sectionName, String objectName, String specText) {
        PageSection pageSection = findSection(sectionName);

        if (pageSection == null) {
            pageSection = new PageSection(sectionName);
            sections.add(pageSection);
        }

        ObjectSpecs objectSpecs = new ObjectSpecs(objectName);
        objectSpecs.addSpec(new SpecReader().read(specText));
        pageSection.addObjects(objectSpecs);
    }
222463
function merge(defaultObject, objectToMerge) {
		var key;
		if (!objectToMerge) {
			return defaultObject;
		}

		for (key in objectToMerge) {
			defaultObject[key] = objectToMerge[key];
		}

		return defaultObject;
	}
1338724
def merge!(*args)
      val = args.pop
      keys = args.flatten
      StorageFile.merge!(path, [*@parents, *keys], val)
    end
1166986
def merge_in(old)
      merge(@class_methods, old.class_methods)
      merge(@instance_methods, old.instance_methods)
      merge(@attributes, old.attributes)
      merge(@constants, old.constants)
      merge(@includes, old.includes)
      if @comment.nil? || @comment.empty?
        @comment = old.comment
      else
        unless old.comment.nil? or old.comment.empty? then
          @comment << SM::Flow::RULE.new
          @comment.concat old.comment
        end
      end
    end
613137
function merge() {
    var observables = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        observables[_i] = arguments[_i];
    }
    return function (source) { return source.lift.call(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"].apply(void 0, [source].concat(observables))); };
}
418458
def merge_inner(clsdict):
    
    samelist = False
    done = {}
    while not samelist:
        samelist = True
        classlist = list(clsdict.keys())
        for classname in classlist:
            parts_name = classname.rsplit('$', 1)
            if len(parts_name) > 1:
                mainclass, innerclass = parts_name
                innerclass = innerclass[:-1]  # remove ';' of the name
                mainclass += ';'
                if mainclass in clsdict:
                    clsdict[mainclass].add_subclass(innerclass,
                                                    clsdict[classname])
                    clsdict[classname].name = innerclass
                    done[classname] = clsdict[classname]
                    del clsdict[classname]
                    samelist = False
                elif mainclass in done:
                    cls = done[mainclass]
                    cls.add_subclass(innerclass, clsdict[classname])
                    clsdict[classname].name = innerclass
                    done[classname] = done[mainclass]
                    del clsdict[classname]
                    samelist = False