Empty map returns null, as does invalid format.
544735
public Map<String,String> getMapFilter(String name) {
        String value = filters.get(name);
        if (value == null)
            return null;
        Map<String,String> map = new LinkedHashMap<>();
        if (value.startsWith("{") && value.endsWith("}")) {
            for (String entry : value.substring(1, value.length() - 1).split(",")) {
                int eq = entry.indexOf('=');
                if (eq > 0 && eq < entry.length() - 1) {
                    String key = entry.substring(0, eq).trim();
                    String val = entry.substring(eq + 1);
                    if ((val.startsWith("\"") && val.endsWith("\"")) || (val.startsWith("'") && val.endsWith("'")) && val.length() > 1) {
                        val = val.substring(1, val.length() - 1);
                    }
                    else {
                        val = val.trim();
                    }
                    map.put(key, val);
                }
            }
        }
        return map.isEmpty() ? null : map;
    }
1034629
function parseMap(map) {
	var result = [];
	for (var i = 0, ii = map.length, cursor = -1, last; i < ii; i++) {
		var isFill = map[i] != ' ' && map[i] != '0';
		if (last != isFill) {
			last = isFill;
			cursor++;
			result.push({fill: isFill, width: 1});
		} else {
			result[cursor].width++;
		}
	}
	return result;
}
643181
@SuppressWarnings("unchecked")
  public static Map<String, String> toStringMap(Object map) {
    if (map == null) {
      return null;
    }

    if (map instanceof Map) {
      Map<Object, Object> rawMap = (Map<Object, Object>) map;
      Map<String, String> stringMap = new HashMap<>();
      for (Entry<Object, Object> entry : rawMap.entrySet()) {
        stringMap.put(entry.getKey().toString(), entry.getValue().toString());
      }
      return stringMap;
    } else {
      throw new AvroRuntimeException("value must be a map");
    }
  }
547962
@SuppressWarnings("unchecked")
    public static <K, V> K[] mapKeyToArray(Map<K, V> map, Class<K> clazz) {
        if (Checker.isNotEmpty(map)) {
            K[] array = (K[]) Array.newInstance(clazz, map.size());
            int i = 0;
            for (K k : map.keySet()) {
                array[i++] = k;
            }
            return array;
        }
        return null;
    }
1266754
public V get(Map<?, V> map){
		for (Object k : keys){
			V v = map.get(k);
			if (v != null){
				return v;
			}
		}
		return null;
	}
306135
public static <K, V> Map<K, V> nullToEmptyMap(Map<K, V> newValue) {
    if (newValue == null) {
      return new HashMap<>();
    }
    return newValue;
  }
725359
public <T extends Map<?, ?>> T notEmpty(final T map, final String message) {
        if (map == null) {
            failNull(message);
        }
        if (map.isEmpty()) {
            fail(message);
        }
        return map;
    }
190549
public static <K, V> Map<K, V> notEmpty(Map<K, V> map) throws IllegalArgumentException {
		return notEmpty(map, "[Assertion failed] - this map must not be empty; it must contain at least one entry");
	}
79392
function empty() {
  return {
    language: null,
    extendedLanguageSubtags: [],
    script: null,
    region: null,
    variants: [],
    extensions: [],
    privateuse: [],
    irregular: null,
    regular: null
  }
}
230825
def get_as_nullable_map(self, key):
        
        value = self.get_as_object(key)
        return AnyValueMap.from_value(value)
777117
def from_maps(*maps):
        
        result = AnyValueMap()
        
        if maps == None or len(maps) == 0:
            return result

        for map in maps:
            for (key, value) in map.items():
                key = StringConverter.to_string(key)
                result.put(key, value)

        return result
917573
Map<String, UserData> getUserDataMapForRead(NodeImpl node) {
        if (nodeToUserData == null) {
            return Collections.emptyMap();
        }
        Map<String, UserData> userDataMap = nodeToUserData.get(node);
        return userDataMap == null
                ? Collections.<String, UserData>emptyMap()
                : userDataMap;
    }
1140603
function $initializeCodesMap() {
        var k    = null,
            code = null;

        // validate codes mapping
        for(k in CODES) {
            code = CODES[k];
            if (code.map !== undefined)  {
                if (CODES[code.map] === undefined) {
                    throw new Error("Invalid mapping for code = '" + k + "'");
                }
            } else if (code.keyCode === undefined) {
                throw new Error("unknown keyCode  for code = '" + k + "'");
            }
        }

        // build codes map table for the cases when "code" property
        CODES_MAP = {};
        for(k in CODES) {
            code = CODES[k];
            if (code.map !== undefined) {
                if (code.keyCode !== undefined) {
                    CODES_MAP[code.keyCode] = code.map;
                }
            } else {
                CODES_MAP[code.keyCode] = k;
            }
        }
    }
1188527
@NonNull
  public static <K, V> Map<K, V> assertNotNullOrEmpty(Map<K, V> data, @Nullable String name) {
    if (isNullOrEmpty(data)) {
      throw new NullPointerException(name + " cannot be null or empty");
    }
    return data;
  }
168134
public static <K, V> NavigableMap<K, V> nullToEmpty(final NavigableMap<K, V> map) {
        return map == null ? N.<K, V> emptyNavigableMap() : map;
    }
541663
void buildMapEntry(LinkedHashMap<Object, Expr> map) {
		Expr keyExpr = expr();
		Object key;
		if (keyExpr instanceof Id) {
			key = ((Id)keyExpr).getId();
		} else if (keyExpr instanceof Const) {
			key = ((Const)keyExpr).getValue();
		} else {
			throw new ParseException("Expression error: the value of map key must be identifier, String, Boolean, null or Number", location);
		}
		
		match(Sym.COLON);
		Expr value = expr();
		if (value == null) {
			throw new ParseException("Expression error: the value on the right side of map entry can not be blank", location);
		}
		map.put(key, value);
	}
272050
static String getValue(Map<String, String> map, String... keys) {
        if (CommonUtils.isEmpty(map)) {
            return null;
        }
        for (String key : keys) {
            String val = map.get(key);
            if (val != null) {
                return val;
            }
        }
        return null;
    }