Creates the map with directives (name and value) from a String of directives, split by ","
@param directives
977476
private void setDirectiveList(String directives) {
        String[] directiveList = directives.replaceAll("\\s", EMPTY_STRING_VALUE).split(",");
        for (String entry : directiveList) {
            String[] nameValueArray = entry.split("=");
            String directiveName = nameValueArray[0];
            if (checkDirective(directiveName)) {
                if (nameValueArray.length > 1) {
                    parseDirectiveWithValue(directiveName, nameValueArray[1]);
                    continue;
                }
                this.directives.put(Directive.get(directiveName), EMPTY_STRING_VALUE);
            }
        }
    }
499587
function _splitPath (keys) {
  var out

  if (util.isString(keys)) {
    out = []
    keys
      .split('.')
      .map(_segment('.'))
      .forEach(function (k) {
        k = (k || ' ').trim()
          .replace(/^([^[]+)\[(["']?)(.+)\2\]$/, function (m, m1, m2, m3) {
            if (m1 && m3) {
              out.push(m1, m3)
            }
            return ''
          })
        if (k) {
          out.push(k)
        }
      })
    keys = out
  }
  return keys
}
140609
public static List<Map<String, List<String>>> splitToChunksOfSize(Map<String, List<String>> rawMap, int chunkSize) {
		List<Map<String, List<String>>> mapChunks = new LinkedList<Map<String, List<String>>>();

		Set<Map.Entry<String, List<String>>> rawEntries = rawMap.entrySet();

		Map<String, List<String>> currentChunk = new LinkedHashMap<String, List<String>>();
		int rawEntryIndex = 0;
		for(Map.Entry<String, List<String>> rawEntry : rawEntries) {

			if(rawEntryIndex % chunkSize == 0) {
				if(currentChunk.size() > 0) {
					mapChunks.add(currentChunk);
				}
				currentChunk = new LinkedHashMap<String, List<String>>();
			}

			currentChunk.put(rawEntry.getKey(), rawEntry.getValue());

			rawEntryIndex++;

			if(rawEntryIndex == rawMap.size()) {
				// finished iterating
				mapChunks.add(currentChunk);
			}
		}

		return mapChunks;
	}
28641
function mapAttrName(node, text, maps, id, nodeId, isComponent)
  {
    var attrs = text.match(__matchAttr),
        mapText,
        mapValues,
        attr,
        title,
        value,
        item,
        len = attrs.length,
        titleMap,
        localMap,
        x = 0,
        lenn,
        i = 0;
    
    for(x;x<len;x++)
    {
      attr = attrs[x].split(':');
      title = attr[0];
      value = attr[1].replace(__replaceSingleQuotes, '');
      
      if(title.match(__matchInsert))
      {
        titleMap = new mapObject({
          local_id: id,
          node_id: nodeId,
          mapIndex: maps.length,
          mapTextIndex: 0,
          text: title,
          maps: maps,
          mapText: [title],
          type: 'attr',
          isInsert: true,
          node: node,
          isAttr: true,
          isPointer: isComponent,
          isProperty: true
        })
        maps.push(titleMap)
        titleMap.mapText = [maps[(maps.length - 1)]];
      }
      else if(title.match(__matchText))
      {
        titleMap = new mapObject({
          local_id: id,
          node_id: nodeId,
          mapIndex: maps.length,
          mapTextIndex: 0,
          text: title,
          maps: maps,
          mapText: [title],
          type: 'attr',
          node: node,
          isAttr: true,
          listener: 'setAttribute',
          local: node,
          isPointer: isComponent,
          isProperty: true
        })
        maps.push(titleMap);
        titleMap.mapText = [maps[(maps.length - 1)]];
      }
      
      mapText = splitText(value);
      mapValues = (titleMap ? titleMap.mapValues : maps);
      lenn = mapText.length;
      i = 0;
      
      for(i;i<lenn;i++)
      {
        item = mapText[i];
        if(item.match(__matchInsert))
        {
          localMap = new mapObject({
            local_id: id,
            node_id: nodeId,
            mapIndex: mapValues.length,
            mapTextIndex: i,
            text: item,
            mapText: mapText,
            maps: mapValues,
            type: 'attr',
            isInsert: true,
            property: title,
            listener: title,
            node: node,
            isAttr: true,
            isPointer: isComponent,
            isPropertyValue: true
          });
          titleMap.mapValues.push(localMap)
        }
        else if(item.match(__matchText))
        {
          localMap = new mapObject({
            local_id: id,
            node_id: nodeId,
            mapIndex: mapValues.length,
            mapTextIndex: i,
            text: item,
            mapText: mapText,
            maps: mapValues,
            type: 'attr',
            property: title,
            listener: title,
            node: node,
            isAttr: true,
            isPointer: isComponent,
            isPropertyValue: true
          });
          titleMap.mapValues.push(localMap)
        }
        else
        {
          localMap = item;
        }
        mapText[i] = localMap;
      }
      titleMap.values = mapText;
    }
  }
416919
def do_directives(self, line):
        """"""
        for name, cmd in self.adapter.directives.items():
            with colorize('blue'):
                print('bot %s:' % name)
                if cmd.__doc__:
                    for line in cmd.__doc__.split('\n'):
                        print('  %s' % line)
                else:
                    print()
214994
def from_maps(*maps):
        
        result = StringValueMap()
        
        if maps == None or len(maps) == 0:
            return result

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

        return result
993015
private static Map<String, Set<String>> expand(Map<String, Set<String>> viewToPropNames) {

        Set<String> baseProps = viewToPropNames.get(PropertyView.BASE_VIEW);

        if (baseProps == null) {
            baseProps = ImmutableSet.of();
        }

        if (!SquigglyConfig.isFilterImplicitlyIncludeBaseFieldsInView()) {

            // make an exception for full view
            Set<String> fullView = viewToPropNames.get(PropertyView.FULL_VIEW);

            if (fullView != null) {
                fullView.addAll(baseProps);
            }

            return viewToPropNames;
        }

        for (Map.Entry<String, Set<String>> entry : viewToPropNames.entrySet()) {
            String viewName = entry.getKey();
            Set<String> propNames = entry.getValue();

            if (!PropertyView.BASE_VIEW.equals(viewName)) {
                propNames.addAll(baseProps);
            }
        }

        return viewToPropNames;
    }
1039373
private ImmutableMap<String, String> initCustomTagsMap(ImmutableMap<String, String> tags) {
		return ImmutableMap.copyOf(firstNonNull(tags, Collections.<String, String>emptyMap()));
	}
603758
function expandMap( map ) {
		grunt.verbose.writeln( 'BowerMap::expandMap' );
		var expanded = {};

		var mappedNames = Object.keys( map );
		mappedNames.forEach( function( packageName ){
			var value = map[ packageName ];

			//get full source path for package
			var src = path.fix( path.join( bowerPath, packageName ) );
			var exists = grunt.file.exists( src );

			//continue if the source exists
			if ( exists ) {
				if ( grunt.file.isFile( src ) ) {
					//src is a file, it must be mapped to a string value
					if ( typeof value === "string") {
						expanded[ src ] = path.fix( path.join( destPath, value ) );
					}
                    else if (  value === false ){
                        expanded[ src ] = false;
                    }
					else {
						grunt.log.error( 'Invalid mapped value for: ' + src );
					}
				}
				else {
					//src is a component directory,
					//   value can be an object containing specific file mappings
					//      or
					//   value can be a string path

					var fsrc, fpath;
					if ( typeof value === "object" ) {
						//map specific files
						var fileNames = Object.keys( value );
						fileNames.forEach( function( fileName ){
							//get file source
							fsrc = path.fix( path.join( src, fileName ) );
							//get file destination path
							fpath = value[ fileName ] ? path.fix( path.join( destPath, value[ fileName ] ) ) : false;
							if ( grunt.file.isFile( fsrc ) ) {
								//source exists, continue with mapping
								expanded[ fsrc ] = fpath;
							}
							else if ( grunt.file.isDir( fsrc ) ) {
								grunt.verbose.writeln( '   map directory: ' + path.join( fsrc, '**' ) );
								glob.sync( path.join( fsrc, '**' ), { dot: true } ).forEach( function( filename ) {
									filename = path.fix( filename );
									if ( grunt.file.isFile( filename ) ) {
										fpath = fpath ? path.fix( path.join( destPath, value[ fileName ], filename.replace( fsrc, "" ) ) ) : false;
										grunt.verbose.writeln( '     from:' + filename );
										grunt.verbose.writeln( '       to:' + fpath );
										expanded[ filename ] = fpath;
									}
								} );

							}
							else {
								grunt.log.error( 'Could not locate source path: ' + fsrc );
							}
						});
					}
                    else if ( typeof value === "string" ) {
                        //map entire directory
                        grunt.verbose.writeln( '   map directory: ' + path.join( src, '**' ) );
                        glob.sync( path.join( src, '**' ), { dot: true } ).forEach( function( filename ) {
                            if ( grunt.file.isFile( filename ) ) {
                                filename = path.fix( filename );
                                fpath = path.fix( path.join( destPath, value, filename.replace( src, "" ) ) );
                                grunt.verbose.writeln( '     from:' + filename );
                                grunt.verbose.writeln( '       to:' + fpath );

                                expanded[ filename ] = fpath;
                            }
                        } );
                    }
                    else if ( typeof value === false ) {
                        //map entire directory
                        grunt.verbose.writeln( '   map directory: ' + path.join( src, '**' ) );
                        glob.sync( path.join( src, '**' ), { dot: true } ).forEach( function( filename ) {
                            if ( grunt.file.isFile( filename ) ) {
                                filename = path.fix( filename );
                                fpath = false;
                                grunt.verbose.writeln( '     from:' + filename );
                                grunt.verbose.writeln( '       to:' + fpath );

                                expanded[ filename ] = fpath;
                            }
                        } );
                    }
					else {
						grunt.log.error( 'Invalid mapped value for: ' + src );
					}
				}
			}
			else {
				grunt.log.error( 'Could not locate source path: ' + src );
			}

		});
		//console.log( "map:", expanded );
		return expanded;
	}
240574
private void getStringFromValue(final StringBuilder builder, final String directive, final String value) {
        if (value != null) {
            builder.append(directive).append(" ").append(value).append(";");
        }
    }
195422
private static Map<String, String> convertHeaders(Header[] headers) {
        Map<String, String> result = new HashMap<String, String>(headers.length);
		for (Header header : headers) {
			result.put(header.getName(), header.getValue());
		}
        return result;
    }
1307932
private void readMap(final Element map, final Map<String, KeyDef> keyDefs) {
        readKeyDefinition(map, keyDefs);
        for (final Element elem: getChildElements(map)) {
            if (!(SUBMAP.matches(elem) || elem.getAttributeNode(ATTRIBUTE_NAME_KEYSCOPE) != null)) {
                readMap(elem, keyDefs);
            }
        }
    }
362655
private Map<String, ColumnDefinition> makeColumnMap(ColumnDefinition[] columns)
   {
      Map<String, ColumnDefinition> map = new HashMap<String, ColumnDefinition>();
      for (ColumnDefinition def : columns)
      {
         map.put(def.getName(), def);
      }
      return map;
   }
1221309
def parse_directive_locations(lexer: Lexer) -> List[NameNode]:
    """"""
    # optional leading pipe
    expect_optional_token(lexer, TokenKind.PIPE)
    locations: List[NameNode] = []
    append = locations.append
    while True:
        append(parse_directive_location(lexer))
        if not expect_optional_token(lexer, TokenKind.PIPE):
            break
    return locations
71443
@SuppressWarnings("unused")
    private Map<String, String> hashFiles(String... fileNames) {
        Map<String, String> hashes = new HashMap<String, String>();
        for (int i = 0; i < fileNames.length; i++) {
            String hash = hashURL(fileNames[i]);
            hashes.put(fileNames[i], hash);
        }
        return hashes;
    }
755800
public void setHeaders(Map<String, String> map) {
        headers = new MetadataMap<String, String>();
        for (Map.Entry<String, String> entry : map.entrySet()) {
            String[] values = entry.getValue().split(",");
            for (String v : values) {
                if (v.length() != 0) {
                    headers.add(entry.getKey(), v);
                }
            }
        }
    }
196267
@Override
  public Streamlet<R> split(Map<String, SerializablePredicate<R>> splitFns) {
    // Make sure map and stream ids are not empty
    require(splitFns.size() > 0, "At least one entry is required");
    require(splitFns.keySet().stream().allMatch(stream -> StringUtils.isNotBlank(stream)),
            "Stream Id can not be blank");

    SplitStreamlet<R> splitStreamlet = new SplitStreamlet<R>(this, splitFns);
    addChild(splitStreamlet);
    return splitStreamlet;
  }