Creates clone of source {@code MemberMap} additionally including new members.

@param source     source map
@param newMembers new members to add
@return clone map
420727
static MemberMap cloneAdding(MemberMap source, MemberImpl... newMembers) {
        Map<Address, MemberImpl> addressMap = new LinkedHashMap<>(source.addressToMemberMap);
        Map<String, MemberImpl> uuidMap = new LinkedHashMap<>(source.uuidToMemberMap);

        for (MemberImpl member : newMembers) {
            putMember(addressMap, uuidMap, member);
        }

        return new MemberMap(source.version + newMembers.length, addressMap, uuidMap);
    }
632856
function mappingMembers(mapping) {
  const { from, to } = mapping
  const memberUris = [ from, to ].filter(Boolean)
    .map(bundle => reduceSet(bundle[memberField(bundle)] || []))
  return [].concat(...memberUris).sort()
}
822517
function copyAndOffsetMapping(existingMapping) {
    var column     = getColumnAfter(existingMapping.generatedLine - 1, existingMapping.generatedColumn);
    var newMapping = {
      generated: {
        line  : existingMapping.generatedLine,
        column: column
      }
    };
    if (existingMapping.source) {
      newMapping.source   = existingMapping.source;
      newMapping.original = {
        line  : existingMapping.originalLine,
        column: existingMapping.originalColumn
      };
      if (existingMapping.name) {
        newMapping.name = existingMapping.name;
      }
    }
    generator.addMapping(newMapping);
  }
599455
public static <K, V> Map<K, V> wrap(final Multimap<K, V> source) {
        if (source != null && !source.isEmpty()) {
            val inner = source.asMap();
            val map = new HashMap<Object, Object>();
            inner.forEach((k, v) -> map.put(k, wrap(v)));
            return (Map) map;
        }
        return new HashMap<>(0);
    }
510113
private void copyMembers(CmsClientSitemapEntry source) {

        setId(source.getId());
        setName(source.getName());
        setOwnProperties(new HashMap<String, CmsClientProperty>(source.getOwnProperties()));
        setDefaultFileId(source.getDefaultFileId());
        setDefaultFileType(source.getDefaultFileType());
        Map<String, CmsClientProperty> defaultFileProperties = source.getDefaultFileProperties();
        if (defaultFileProperties == null) {
            defaultFileProperties = new HashMap<String, CmsClientProperty>();
        }
        setDefaultFileProperties(new HashMap<String, CmsClientProperty>(defaultFileProperties));
        if (source.getDetailpageTypeName() != null) {
            // do not copy the detail page type name unless it is not null, otherwise newly created detail pages
            // are not displayed correctly in the sitemap editor.
            setDetailpageTypeName(source.getDetailpageTypeName());
        }
        setSitePath(source.getSitePath());
        setVfsPath(source.getVfsPath());
        setLock(source.getLock());
        setEntryType(source.getEntryType());
        setInNavigation(source.isInNavigation());
        setHasForeignFolderLock(source.hasForeignFolderLock());
        setBlockingLockedChildren(source.hasBlockingLockedChildren());
        setFolderDefaultPage(source.isFolderDefaultPage());
        setResourceTypeName(source.getResourceTypeName());
        setChildrenLoadedInitially(source.getChildrenLoadedInitially());
        setFolderDefaultPage(source.isFolderDefaultPage());
        setDateExpired(source.getDateExpired());
        setDateReleased(source.getDateReleased());
        setResleasedAndNotExpired(source.isResleasedAndNotExpired());
        setDefaultFileReleased(source.isDefaultFileReleased());
        setAliases(source.getAliases());
        setRedirectTarget(source.getRedirectTarget());
        setResourceState(source.getResourceState());
        setPermissionInfo(source.m_permissionInfo);
    }
1349613
@Override
    public CommandGroup createCommandGroup(List<? extends Object> members) {
		return createCommandGroup(null, members.toArray(), false, null);
	}
590945
private Map<ExecutableElement, VariableElement> createMemberFields(
      AnnotationTypeDeclaration node, List<AnnotationTypeMemberDeclaration> members) {
    TypeElement type = node.getTypeElement();
    Map<ExecutableElement, VariableElement> fieldElements = new HashMap<>();
    for (AnnotationTypeMemberDeclaration member : members) {
      ExecutableElement memberElement = member.getExecutableElement();
      String propName = NameTable.getAnnotationPropertyName(memberElement);
      VariableElement field = GeneratedVariableElement.newField(
          propName, memberElement.getReturnType(), type);
      node.addBodyDeclaration(new FieldDeclaration(field, null));
      fieldElements.put(memberElement, field);
    }
    return fieldElements;
  }
807233
public static <K, V> ListMultimap<K, V> newLinkedHashListMultimap() {
		return Multimaps.newListMultimap(Maps.<K, Collection<V>> newLinkedHashMap(), new Supplier<List<V>>() {
			@Override
			public List<V> get() {
				return Lists.newArrayList();
			}
		});
	}
426781
protected Multimap<Class<? extends Annotation>, Annotation> mergeMemberInterceptorBindings(Multimap<Class<? extends Annotation>, Annotation> beanBindings,
            Set<Annotation> methodBindingAnnotations) {

        Multimap<Class<? extends Annotation>, Annotation> mergedBeanBindings = SetMultimap.newSetMultimap(beanBindings);
        Multimap<Class<? extends Annotation>, Annotation> methodBindings = SetMultimap.newSetMultimap();

        for (Annotation methodBinding : methodBindingAnnotations) {
            methodBindings.put(methodBinding.annotationType(), methodBinding);
        }
        for (Class<? extends Annotation> key : methodBindings.keySet()) {
            mergedBeanBindings.replaceValues(key, methodBindings.get(key));
        }
        return mergedBeanBindings;
    }
570656
public static Builder newBuilder(TableId destinationTable, List<TableId> sourceTables) {
    return new Builder().setDestinationTable(destinationTable).setSourceTables(sourceTables);
  }
91504
public <T> JdbcMapperBuilder<T> newBuilder(final Type target) {
		ClassMeta<T> classMeta = getClassMeta(target);
		return newBuilder(classMeta);
	}
1292679
public static Builder newBuilder(TableId destinationTable, List<String> sourceUris) {
    return new Builder().setDestinationTable(destinationTable).setSourceUris(sourceUris);
  }
1337536
@NonNull
  public static <K, V> ImmutableMap<K, V> append(
      @NonNull ImmutableMap<K, V> map, @NonNull K newKey, @NonNull V newValue) {
    ImmutableMap.Builder<K, V> builder = ImmutableMap.builder();
    for (Map.Entry<K, V> entry : map.entrySet()) {
      if (!entry.getKey().equals(newKey)) {
        builder.put(entry);
      }
    }
    builder.put(newKey, newValue);
    return builder.build();
  }
83952
public static Builder newBuilder(TableId sourceTable, List<String> destinationUris) {
    return new Builder().setSourceTable(sourceTable).setDestinationUris(destinationUris);
  }
818256
private void merge(Map<String, NodeT> source, Map<String, NodeT> target) {
        for (Map.Entry<String, NodeT> entry : source.entrySet()) {
            String key = entry.getKey();
            if (!target.containsKey(key)) {
                target.put(key, entry.getValue());
            }
        }
    }
1195195
function createFromMap(mapObject, content, url) {
  url = url || '<source>';
  if ('string' == typeof mapObject) {
    try {
      mapObject = JSON.parse(mapObject);
    } catch (err) {
      mapObject = {
        version: 3,
        names: [],
        mappings: '',
        file: ''
      };
    }
  }
  if (emptySources(mapObject)) {
    mapObject.sources = [url];
    mapObject.sourcesContent = [content];
  }

  return SourceMapGenerator.fromSourceMap(new SourceMapConsumer(mapObject));
}
412429
public static <K, V> Map<K, V> newMap(Map<K, V> map) {
        return Optional.ofNullable(map).map(HashMap::new)
                .orElseGet(HashMap::new);
    }