create data map from a map (name -* value array) and other params
@param params params of type of Map(String -* String[])
@param others other params
@return new created data map
188259
public static Map<String, String> data(Map<String, String[]> params, Map.Entry<String, String>... others) {
        Map<String, String> result = new HashMap<>();
        // expand params
        for(Map.Entry<String, String[]> entry : params.entrySet()) {
            if (entry.getValue() == null || entry.getValue().length == 0)
                continue;
            else if (entry.getValue().length == 1 && ! entry.getKey().endsWith("[]"))
                result.put(entry.getKey(), entry.getValue()[0]);
            else {
                for(int i = 0; i < entry.getValue().length; i++) {
                    String key = entry.getKey().replaceAll("\\[\\]$", "") + "[" + i + "]";
                    result.put(key, entry.getValue()[i]);
                }
            }
        }
        // merge in others
        for(Map.Entry<String, String> entry : others) {
            result.put(entry.getKey(), entry.getValue());
        }
        return result;
    }
235607
private static Map<String, Object> localizeDecimalParams(final Map<String, Object> params) {
    Map<String, Object> localized = new HashMap<>(params.size());
    final NumberFormat localizedNumberFormatter = DecimalFormat.getNumberInstance();
    for (String key : params.keySet()) {
      final Object value = params.get(key);
      final Object newValue;
      if (value instanceof Float || value instanceof Double) {
        newValue = localizedNumberFormatter.format(value);
      } else
        newValue = value;
      localized.put(key, newValue);
    }
    return Collections.unmodifiableMap(localized);
  }
1206722
public static Map<String, Object> with(Object... params) {
        Map<String, Object> map = new HashMap<>();
        for (int i = 0; i < params.length; i++) {
            map.put(String.valueOf(i), params[i]);
        }
        return map;
    }
1347696
public static <K, V> void putSetAll(Map<K, Set<V>> map, Map<K, Set<V>> other) {
        for (Map.Entry<K, Set<V>> me : other.entrySet()) {
            putSetMult(map, me.getKey(), me.getValue());
        }
    }
606027
public IntBiMap union(IntBiMap other) {
    int newLength = keys.length + other.keys.length;

    int[] newKeys = Arrays.copyOf(keys, newLength);
    ArrayUtils.copy(other.keys, 0, newKeys, keys.length, other.keys.length);
    int[] newValues = Arrays.copyOf(values, newLength);
    ArrayUtils.copy(other.values, 0, newValues, values.length, other.values.length);

    return IntBiMap.fromUnsortedKeyValues(newKeys, newValues);
  }
863972
function to_map(params) {
  var map = {};

  params.forEach(function (param, i) {
    param.index = i;
    map[param.name] = param;
  });

  map.length = params.length;

  return map;
}
1217963
public static Map<String, String[]> getParameterMapFromJSON(JSONObject params) {

        Map<String, String[]> result = new HashMap<String, String[]>();
        Iterator<String> itKeys = params.keys();
        while (itKeys.hasNext()) {
            String key = itKeys.next();
            JSONArray paramValue = params.optJSONArray(key);
            result.put(key, new String[paramValue.length()]);
            for (int i = 0, l = paramValue.length(); i < l; i++) {
                result.get(key)[i] = paramValue.optString(i);
            }
        }
        return result;
    }
277144
public static PagingParams fromMap(AnyValueMap map) {
		Long skip = map.getAsNullableLong("skip");
		Long take = map.getAsNullableLong("take");
		boolean total = map.getAsBooleanWithDefault("total", true);
		return new PagingParams(skip, take, total);
	}
951236
public static <K, V> HashMap<K, V> newHashMap(@NotNull final K[] keys, @NotNull final V[] values) {
		Validate.isTrue(keys.length == values.length, "keys.length is %d but values.length is %d", keys.length,
				values.length);

		HashMap<K, V> map = new HashMap<K, V>(keys.length * 2);

		for (int i = 0; i < keys.length; i++) {
			map.put(keys[i], values[i]);
		}

		return map;
	}
835337
public static Expression newHashMap(
      Iterable<? extends Expression> keys, Iterable<? extends Expression> values) {
    return newMap(keys, values, ConstructorRef.HASH_MAP_CAPACITY, HASH_MAP_TYPE);
  }
286861
public void copyValuesFromTo(Map<String, Object> otherMap, Map<String, Object> map) {
        getMapHelper().copyValuesFromTo(otherMap, map);
    }
639247
public static <K, V> HashMap<K, V> newHashMap(@NotNull final List<K> keys, @NotNull final List<V> values) {
		Validate.isTrue(keys.size() == values.size(), "keys.length is %s  but values.length is %s", keys.size(),
				values.size());

		HashMap<K, V> map = new HashMap<K, V>(keys.size() * 2);
		Iterator<K> keyIt = keys.iterator();
		Iterator<V> valueIt = values.iterator();

		while (keyIt.hasNext()) {
			map.put(keyIt.next(), valueIt.next());
		}

		return map;
	}
367393
private List<Node> createStringsFromParamList(Node params) {
    Node param = params.getFirstChild();
    ArrayList<Node> names = new ArrayList<>();
    while (param != null) {
      if (param.isName()) {
        names.add(IR.string(param.getString()).srcref(param));
      } else if (param.isDestructuringPattern()) {
        compiler.report(JSError.make(param,
            INJECTED_FUNCTION_HAS_DESTRUCTURED_PARAM));
        return new ArrayList<>();
      } else if (param.isDefaultValue()) {
        compiler.report(JSError.make(param,
            INJECTED_FUNCTION_HAS_DEFAULT_VALUE));
        return new ArrayList<>();
      }
      param = param.getNext();
    }
    return names;
  }
243814
protected void fillDefaultValues(Map<String, Value> params) {
        for (MethodParameter parameter : parameters.values()) {
            if (!parameter.isOptional() || parameter.getDefaultValue() == null || params.get(parameter.getName()) != null) continue;
            params.put(parameter.getName(), parameter.getDefaultValue());
        }
    }
522780
public static Map<String, QueryParameter> getParentDependentParameters(List<QueryParameter> params, QueryParameter p) {
        List<String> names = p.getDependentParameterNames();
        Map<String, QueryParameter> result = new HashMap<String, QueryParameter>();
        for (String name : names) {        	
            result.put(name, getParameterByName(params, name));
        }
        return result;
    }
497849
public static Call create(final Map <String, Object>params)  throws Exception
    {
    	assert (params != null);
    	
    	return create(BandwidthClient.getInstance(), params);
    }
881414
public CreateIssueParams customFieldOtherValueMap(Map<Long, String> customFieldOtherValueMap) {
        Set<Long> keySet = customFieldOtherValueMap.keySet();
        for (Long key : keySet) {
            parameters.add(new NameValuePair("customField_" + key.toString() + "_otherValue", customFieldOtherValueMap.get(key)));
        }
        return this;
    }