map_type : MAP '<' field_type ',' field_type '>' annotations
766625
def p_map_type(self, p):
        ''''''
        p[0] = ast.MapType(key_type=p[3], value_type=p[5], annotations=p[7])
994438
def p_list_type(self, p):
        ''''''
        p[0] = ast.ListType(value_type=p[3], annotations=p[5])
243873
def _remap_fields(cls, kwargs):
        """"""
        mapped = {}
        for key in kwargs:
            if key in cls._remap:
                mapped[cls._remap[key]] = kwargs[key]
            else:
                mapped[key] = kwargs[key]
        return mapped
902190
private static Map<String, Object> changeAnnotationValuesToMap(Annotation annotation,
			Class<? extends Annotation> type) {
		Map<String, Object> result = new HashMap<String, Object>();
		result.put("AnnotationExist", true);
		for (Method method : type.getDeclaredMethods())
			try {
				result.put(method.getName(), method.invoke(annotation, (Object[]) null));
			} catch (Exception e) {// NOSONAR
			}
		return result;
	}
992358
function getMappingType(mapping) {
  if (is.array(mapping)) {
    return every(isMixed, mapping) ? 'mixed' : 'array';
  }
  if (is.object(mapping)) return 'map';
  return 'unknown';
}
1369514
private Mapper createMapper(Field field, boolean indexed) {
    lock.lock();
    try {
      Mapper mapper;
      Class<?> fieldType = field.getType();
      Type genericType = field.getGenericType();
      String cacheKey = computeCacheKey(genericType, indexed);
      mapper = cache.get(cacheKey);
      if (mapper != null) {
        return mapper;
      }
      if (List.class.isAssignableFrom(fieldType)) {
        mapper = new ListMapper(genericType, indexed);
      } else if (Set.class.isAssignableFrom(fieldType)) {
        mapper = new SetMapper(genericType, indexed);
      } else {
        // we shouldn't be getting here
        throw new IllegalArgumentException(
            String.format("Field type must be List or Set, found %s", fieldType));
      }
      cache.put(cacheKey, mapper);
      return mapper;
    } finally {
      lock.unlock();
    }
  }
500480
def point_type(name, fields, srid_map):
    

    def srid(self):
        try:
            return srid_map[len(self)]
        except KeyError:
            return None

    attributes = {"srid": property(srid)}

    for index, subclass_field in enumerate(fields):

        def accessor(self, i=index, f=subclass_field):
            try:
                return self[i]
            except IndexError:
                raise AttributeError(f)

        for field_alias in {subclass_field, "xyz"[index]}:
            attributes[field_alias] = property(accessor)

    cls = type(name, (Point,), attributes)

    with __srid_table_lock:
        for dim, srid in srid_map.items():
            __srid_table[srid] = (cls, dim)

    return cls
213923
def dump_annotations(type_info, files):
    
    with open(type_info) as f:
        data = json.load(f)
    for item in data:
        path, line, func_name = item['path'], item['line'], item['func_name']
        if files and path not in files:
            for f in files:
                if path.startswith(os.path.join(f, '')):
                    break
            else:
                continue  # Outer loop
        print("%s:%d: in %s:" % (path, line, func_name))
        type_comments = item['type_comments']
        signature = unify_type_comments(type_comments)
        arg_types = signature['arg_types']
        return_type = signature['return_type']
        print("    # type: (%s) -> %s" % (", ".join(arg_types), return_type))
329141
def build_map_type_validator(item_validator):
    
    def validate_mapping(value):
        return dict(item_validator(item) for item in validate_list(value))
    return validate_mapping
1050429
function map (type) {
  if (!type) throw new Error('got falsey "type" to map ('+type+'). this should NOT happen!');
  if (type.type) type = type.type;
  if (isStruct(type)) return getStruct(type);
  type = type.replace(methodEncodingsTest, '')
  // if the first letter is a ^ then it's a "pointer" type
  if (type[0] === '^') return 'pointer'
  // now we can try matching from the typeEncodings map
  var rtn = typeEncodings[type]
  if (rtn) return rtn
  // last shot... try the last char? this may be a bad idea...
  rtn = typeEncodings[type[type.length-1]]
  if (rtn) return rtn
  // couldn't find the type. throw a descriptive error as to why:
  if (type[0] == '[') return 'pointer';
    //throw new Error('Array types not yet supported: ' + type)
  if (type[0] == '(') return 'pointer';
    //throw new Error('Union types not yet supported: ' + type)
  if (type[0] == 'b') return 'pointer';
    //throw new Error('Bit field types not yet supported: ' + type)
  throw new Error('Could not convert type: ' + type)
}
546750
function mapInputType(model) {
    const modelName = `${model.modelName}Input`;

    types[modelName] = {
        generated: false,
        name: modelName,
        meta: {
            category: 'TYPE',
            input: true,
            fields: {}
        }
    };

    _.forEach(model.definition.properties, (property, key) => {
        mapProperty(model, property, modelName, key, true);
    });
}
696543
function routeTypes(routeMap) {
	var typeSet = {};

	var keys = Object.keys(routeMap);
	for (var i = 0, len = keys.length; i < len; i++) {
		var route = routeMap[keys[i]];
		var type = routeType(route);
		typeSet[type] = true;
	}

	// Use RouteTypeFields ordering
	var typeList = [];
	var fields = Object.keys(RouteTypeFields);
	for (var i = 0, len = fields.length; i < len; i++) {
		var type = RouteTypeFields[fields[i]];
		if (typeSet[type]) {
			typeList.push(type)
		}
	}

	return typeList;
}
179326
static List[] findTypos(Collection<String> fields, Mapping mapping) {
        Set<String> keys = mapping.flatten().keySet();

        // find missing
        List<String> missing = new ArrayList<String>(fields.size());

        for (String field : fields) {
            if (!keys.contains(field) && !isBuiltIn(field)) {
                missing.add(field);
            }
        }
        if (missing.isEmpty()) {
            return null;
        }
        Map<String, String> unwrapped = new LinkedHashMap<String, String>();
        // find similar
        for (String key : keys) {
            int match = key.lastIndexOf(".");
            if (match > 0) {
                String leafField = key.substring(match + 1);
                // leaf fields are secondary to top-level ones (in case of overwrite, the top level ones win)
                if (!unwrapped.containsKey(leafField)) {
                    unwrapped.put(leafField, key);
                }
            }
            unwrapped.put(key, key);
        }

        List<String> typos = new ArrayList<String>();

        Set<String> similar = unwrapped.keySet();
        for (String string : missing) {
            List<String> matches = StringUtils.findSimiliar(string, similar);
            for (String match : matches) {
                // get actual field
                typos.add(unwrapped.get(match));
            }
        }

        return new List[] { missing, typos };
    }
289392
def type_map(gtype, fn):
    """"""

    cb = ffi.callback('VipsTypeMap2Fn', fn)
    return vips_lib.vips_type_map(gtype, cb, ffi.NULL, ffi.NULL)
818203
private String printConfigMappingTypes(
      Map<QName, MtasParserType<MtasParserMapping<?>>> types) {
    StringBuilder text = new StringBuilder();
    for (Entry<QName, MtasParserType<MtasParserMapping<?>>> entry : types
        .entrySet()) {
      text.append("- " + entry.getKey().getLocalPart() + ": "
          + entry.getValue().items.size() + " mapping(s)\n");
      for (int i = 0; i < entry.getValue().items.size(); i++) {
        text.append("\t" + entry.getValue().items.get(i) + "\n");
      }
    }
    return text.toString();
  }
970704
static void buildTypeVariableMap(final Type[] types, final Map<TypeVariable<?>, Type> map) {
        for (Type type : types) {
            if (type instanceof ParameterizedType) {
                ParameterizedType parameterizedType = (ParameterizedType) type;
                buildTypeVariableMap(parameterizedType, map);
                Type rawType = parameterizedType.getRawType();
                if (rawType instanceof Class)
                    buildTypeVariableMap(((Class<?>) rawType).getGenericInterfaces(), map);
            } else if (type instanceof Class) {
                buildTypeVariableMap(((Class<?>) type).getGenericInterfaces(), map);
            }
        }
    }
595258
private <T extends PackageDoc> void mapAnnotations(Map<String,List<T>> map, PackageDoc doc,
            T holder) {
        for (AnnotationDesc annotation : doc.annotations()) {
            AnnotationTypeDoc annotationDoc = annotation.annotationType();
            refList(map, annotationDoc).add(holder);
        }
    }