Creates a mapping
339177
@RequestMapping(value = "ldap-mapping/create", method = RequestMethod.POST)
    public LDAPMapping newMapping(@RequestBody AccountGroupMappingInput input) {
        securityService.checkGlobalFunction(AccountGroupManagement.class);
        return LDAPMapping.of(accountGroupMappingService.newMapping(LDAPExtensionFeature.LDAP_GROUP_MAPPING, input));
    }
1362553
def make_map(declarations):
    """"""
    mapper = routes.Mapper()
    for route, methods in ROUTE_LIST:
        allowed_methods = []
        for method, func in methods.items():
            mapper.connect(route, action=func,
                           conditions=dict(method=[method]))
            allowed_methods.append(method)
        allowed_methods = ', '.join(allowed_methods)
        mapper.connect(route, action=handle_not_allowed,
                       _methods=allowed_methods)
    return mapper
575913
def create_grid_mapping(area):
    """"""
    try:
        grid_mapping = mappings[area.proj_dict['proj']](area)
        grid_mapping['name'] = area.proj_dict['proj']
    except KeyError:
        raise NotImplementedError

    return grid_mapping
62601
public static <K, V> Mapper<K, V> from(Map<K, V> map) {
		return new Mapper<K, V>(map);
	}
693328
def _create_mapping(grammar):
    # type: (Grammar) -> (Dict[int, Set[Type[Rule]]], Dict[int, Set[Type[Rule]]])
    
    termmap = dict()
    rulemap = dict()
    for r in grammar.rules:
        if len(r.right) == 1:
            # rule to terminal
            h = hash(r.toSymbol)
            if h not in termmap:
                termmap[h] = set()
            termmap[h].add(r)
        else:
            # rule to two nonterms
            key = hash(tuple(r.right))
            if key not in rulemap:
                rulemap[key] = set()
            rulemap[key].add(r)
    return (termmap, rulemap)
408014
private void createReverseMapping() {
    reverseSourceMapping = new HashMap<>();

    for (int targetLine = 0; targetLine < lines.size(); targetLine++) {
      ArrayList<Entry> entries = lines.get(targetLine);

      if (entries != null) {
        for (Entry entry : entries) {
          if (entry.getSourceFileId() != UNMAPPED
              && entry.getSourceLine() != UNMAPPED) {
            String originalFile = sources[entry.getSourceFileId()];

            if (!reverseSourceMapping.containsKey(originalFile)) {
              reverseSourceMapping.put(originalFile,
                  new HashMap<Integer, Collection<OriginalMapping>>());
            }

            Map<Integer, Collection<OriginalMapping>> lineToCollectionMap =
                reverseSourceMapping.get(originalFile);

            int sourceLine = entry.getSourceLine();

            if (!lineToCollectionMap.containsKey(sourceLine)) {
              lineToCollectionMap.put(sourceLine,
                  new ArrayList<OriginalMapping>(1));
            }

            Collection<OriginalMapping> mappings =
                lineToCollectionMap.get(sourceLine);

            Builder builder = OriginalMapping.newBuilder().setLineNumber(
                targetLine).setColumnPosition(entry.getGeneratedColumn());

            mappings.add(builder.build());
          }
        }
      }
    }
  }
176925
def make_mapping(args):
    """"""
    mapping = {}

    if args:
        for arg in args:
            name_value = arg.split('=', 1)
            mapping[name_value[0]] = (name_value[1]
                                      if len(name_value) > 1
                                      else None)

    return mapping
1043460
@Override
    public Iterable<IMapping> mappings() {
        return new Iterable<IMapping>() {

            @Override
            public Iterator<IMapping> iterator() {
                return new MappingIterator();
            }
        };
    }
947201
def mapping_of(cls):
    """"""
    def mapper(data):
        if not isinstance(data, Mapping):
            raise TypeError(
                "data must be a mapping, not %s"
                % type(data).__name__)
        return {
            key: cls(value)
            for key, value in data.items()
        }
    return mapper
255205
function createUriQueryMapper (query) {
  var parameters = extractQueryParameters(query);
  return (queryValues, args) => {
    queryValues = queryValues || Object.create(null);

    Object.keys(queryValues)
      .forEach(queryKey => {
        var parameter = parameters[queryKey];

        if (!parameter) {
          return;
        }

        var value = util.isArray(queryValues[queryKey]) ?
          queryValues[queryKey]
            .map(parameter.map)
            .filter(value => value !== null) :
          parameter.map(queryValues[queryKey]);

        if (value === null) {
          return;
        }

        args[parameter.name] = value;
      });
  };
}
1346435
private ObjectMapper createObjectMapper() {
        ObjectMapper mapper = new ObjectMapper();
        mapper.registerModule(new JodaModule());
        mapper.configure(SerializationFeature.INDENT_OUTPUT, true);
        return mapper;
    }
1003787
function (mapping) {
    const result = {};
    for (const [key, value] of _.toPairs(mapping)) {
      result[key] = _.isString(value) ? value : JSON.stringify(value);
    }
    return result;
  }
741940
private Mapper initializeMapper() {
    try {
      return MapperFactory.getInstance().getMapper(field);
    } catch (NoSuitableMapperException exp) {
      String message = String.format(
          "No suitable mapper found or error occurred creating a mapper for field %s in class %s",
          field.getName(), field.getDeclaringClass().getName());
      throw new NoSuitableMapperException(message, exp);
    }
  }
673881
def make_map(config):
    """"""
    map = Mapper(directory=config['pylons.paths']['controllers'],
                 always_scan=config['debug'])
    map.minimization = False
    map.explicit = False

    # The ErrorController route (handles 404/500 error pages); it should
    # likely stay at the top, ensuring it can always be resolved
    map.connect('/error/{action}', controller='error')
    map.connect('/error/{action}/{id}', controller='error')

    # CUSTOM ROUTES HERE
    map.connect('/{controller}')
    map.connect('/{controller}/{action}')
    map.connect('/{controller}/{action}/{id}')

    map.connect('/', controller='prefix', action='index')

    return map
150161
private Map<String, Type> createUninvertingMap() {

        Map<String, UninvertingReader.Type> uninvertingMap = new HashMap<String, UninvertingReader.Type>();
        CmsSearchField.addUninvertingMappings(uninvertingMap);
        getFieldConfiguration().addUninvertingMappings(uninvertingMap);
        return uninvertingMap;
    }
1051812
def map(self,index_name, index_type, map_value):
        '''
        
        '''
        request = self.session
        url = 'http://%s:%s/%s/%s/_mapping' % (self.host, self.port, index_name, index_type)
        content = { index_type : { 'properties' : map_value } }
        if self.verbose:
            print content
        response = request.put(url,content)
        return response
1117684
function mappingContent(mapping) {
  const { from, to, type } = mapping
  let result = {
    from: reduceBundle(from || {}),
    to: reduceBundle(to || {}),
    type: [
      type && type[0] || "http://www.w3.org/2004/02/skos/core#mappingRelation"
    ]
  }
  for (let side of ["from", "to"]) {
    if ((result[side][memberField(result[side])] || []).length == 0) {
      let scheme = mapping[side + "Scheme"]
      if (scheme && scheme.uri) {
        // Create new object to remove all unnecessary properties.
        result[side + "Scheme"] = { uri: scheme.uri }
      }
    }
  }
  return result
}