Initialize source mapping chain
332297
function init(options) {
  var debug = require('../debug').spawn('init');

  function sourceMapInit(file, encoding, callback) {
    // pass through if file is null or already has a source map
    if (file.isNull() || file.sourceMap) {
      this.push(file);
      return callback();
    }

    if (file.isStream()) {
      return callback(new Error(utils.PLUGIN_NAME + '-init: Streaming not supported'));
    }

    if (options === undefined) {
      options = {};
    }
    debug(function() {
      return options;
    });

    var fileContent = file.contents.toString();
    var sourceMap, preExistingComment;
    var internals = initInternals(options, file, fileContent);

    if (options.loadMaps) {
      var result = internals.loadMaps();
      sourceMap = result.map;
      fileContent = result.content;
      preExistingComment = result.preExistingComment;
    }

    if (!sourceMap && options.identityMap) {
      debug(function() { return '**identityMap option is deprecated, update to use sourcemap.identityMap stream**'; });
      debug(function() {
        return 'identityMap';
      });
      var fileType = path.extname(file.path);
      var source = unixStylePath(file.relative);
      var generator = new SourceMapGenerator({ file: source });

      if (fileType === '.js') {
        var tokenizer = acorn.tokenizer(fileContent, { locations: true });
        while (true) {
          var token = tokenizer.getToken();
          if (token.type.label === 'eof') {
            break;
          }
          var mapping = {
            original: token.loc.start,
            generated: token.loc.start,
            source: source,
          };
          if (token.type.label === 'name') {
            mapping.name = token.value;
          }
          generator.addMapping(mapping);
        }
        generator.setSourceContent(source, fileContent);
        sourceMap = generator.toJSON();
      } else if (fileType === '.css') {
        debug('css');
        var ast = css.parse(fileContent, { silent: true });
        debug(function() {
          return ast;
        });
        var registerTokens = function(ast) {
          if (ast.position) {
            generator.addMapping({ original: ast.position.start, generated: ast.position.start, source: source });
          }

          function logAst(key, ast) {
            debug(function() {
              return 'key: ' + key;
            });
            debug(function() {
              return ast[key];
            });
          }

          for (var key in ast) {
            logAst(key, ast);
            if (key !== 'position') {
              if (Object.prototype.toString.call(ast[key]) === '[object Object]') {
                registerTokens(ast[key]);
              } else if (Array.isArray(ast[key])) {
                debug(function() {
                  return '@@@@ ast[key] isArray @@@@';
                });
                for (var i = 0; i < ast[key].length; i++) {
                  registerTokens(ast[key][i]);
                }
              }
            }
          }
        };
        registerTokens(ast);
        generator.setSourceContent(source, fileContent);
        sourceMap = generator.toJSON();
      }
    }

    if (!sourceMap) {
      // Make an empty source map
      sourceMap = {
        version: 3,
        names: [],
        mappings: '',
        sources: [unixStylePath(file.relative)],
        sourcesContent: [fileContent],
      };
    } else if (preExistingComment !== null && typeof preExistingComment !== 'undefined') {
      sourceMap.preExistingComment = preExistingComment;
    }

    sourceMap.file = unixStylePath(file.relative);
    file.sourceMap = sourceMap;

    this.push(file);
    callback();
  }

  return through.obj(sourceMapInit);
}
1280997
def init(paths, output, **kwargs):
    
    dp = goodtables.init_datapackage(paths)

    click.secho(
        json_module.dumps(dp.descriptor, indent=4),
        file=output
    )

    exit(dp.valid)
1280680
def initialize():
        
        from zsl.interface.web.performers.default import create_not_found_mapping
        from zsl.interface.web.performers.resource import create_resource_mapping

        create_not_found_mapping()
        create_resource_mapping()
825620
public final <T1 extends SourceFile, T2 extends SourceFile> void init(
      List<T1> externs, List<T2> sources, CompilerOptions options) {
    JSModule module = new JSModule(JSModule.STRONG_MODULE_NAME);
    for (SourceFile source : sources) {
      module.add(new CompilerInput(source));
    }

    List<JSModule> modules = new ArrayList<>(1);
    modules.add(module);
    initModules(externs, modules, options);
    addFilesToSourceMap(sources);
  }
1102867
private void initializeMapper() {
    if (valueClass == null) {
      valueMapper = CatchAllMapper.getInstance();
    } else {
      try {
        valueMapper = MapperFactory.getInstance().getMapper(valueClass);
      } catch (NoSuitableMapperException exp) {
        valueMapper = CatchAllMapper.getInstance();
      }

    }
  }
785625
function SourceMap(options) {
    options = defaults(options, {
        file : null,
        root : null,
        orig : null,

        orig_line_diff : 0,
        dest_line_diff : 0,
    });
    var generator = new MOZ_SourceMap.SourceMapGenerator({
        file       : options.file,
        sourceRoot : options.root
    });
    var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig);

    if (orig_map && Array.isArray(options.orig.sources)) {
        orig_map._sources.toArray().forEach(function(source) {
            var sourceContent = orig_map.sourceContentFor(source, true);
            if (sourceContent) {
                generator.setSourceContent(source, sourceContent);
            }
        });
    }

    function add(source, gen_line, gen_col, orig_line, orig_col, name) {
        if (orig_map) {
            var info = orig_map.originalPositionFor({
                line: orig_line,
                column: orig_col
            });
            if (info.source === null) {
                return;
            }
            source = info.source;
            orig_line = info.line;
            orig_col = info.column;
            name = info.name || name;
        }
        generator.addMapping({
            generated : { line: gen_line + options.dest_line_diff, column: gen_col },
            original  : { line: orig_line + options.orig_line_diff, column: orig_col },
            source    : source,
            name      : name
        });
    };
    return {
        add        : add,
        get        : function() { return generator },
        toString   : function() { return JSON.stringify(generator.toJSON()); }
    };
}
473075
def _init_map(self):
        """"""
        ItemTextsFormRecord._init_map(self)
        ItemFilesFormRecord._init_map(self)
        edXBaseFormRecord._init_map(self)
        IRTItemFormRecord._init_map(self)
        TimeValueFormRecord._init_map(self)
        ProvenanceFormRecord._init_map(self)
        super(edXItemFormRecord, self)._init_map()
1052544
@Override
    protected void initInputSource(WstxInputSource newInput, boolean isExt, String entityId)
        throws XMLStreamException
    {
        if (mFlattenWriter != null) {
            // Anything to flush from previous buffer contents?
            mFlattenWriter.flush(mInputBuffer, mInputPtr);
            mFlattenWriter.disableOutput();
            try {
                /* Then let's let base class do the 'real' input source setup;
                 * this includes skipping of optional XML declaration that we
                 * do NOT want to output
                 */
                super.initInputSource(newInput, isExt, entityId);
            } finally {
                // This will effectively skip declaration
                mFlattenWriter.enableOutput(mInputPtr);
            }
        } else {
            super.initInputSource(newInput, isExt, entityId);
        }
    }
695664
private void initMappings() throws Exception {
        checkClient();
        // We extract indexes and mappings to manage from mappings definition
        if (mappings != null && mappings.length > 0) {
            Map<String, Collection<String>> indices = getIndexMappings(mappings);

            // Let's initialize indexes and mappings if needed
            for (String index : indices.keySet()) {
                createIndex(client.getLowLevelClient(), classpathRoot, index, forceMapping);
                if (mergeSettings) {
                    updateSettings(client.getLowLevelClient(), classpathRoot, index);
                }

                createMapping(client, classpathRoot, index, mergeMapping);
            }
        }
    }
47506
private void initFunMap() {
		funTable.put("ADV", "formFuncDisc");
		funTable.put("NOM", "formFuncDisc");

		funTable.put("DTV", "gramRole");
		funTable.put("LGS", "gramRole");
		funTable.put("PRD", "gramRole");
		funTable.put("PUT", "gramRole");
		funTable.put("SBJ", "gramRole");
		funTable.put("VOC", "gramRole");

		funTable.put("BNF", "adv");
		funTable.put("DIR", "adv");
		funTable.put("EXT", "adv");
		funTable.put("LOC", "adv");
		funTable.put("MNR", "adv");
		funTable.put("PRP", "adv");
		funTable.put("TMP", "adv");

		funTable.put("CLR", "misc");
		funTable.put("CLF", "misc");
		funTable.put("HLN", "misc");
		funTable.put("TTL", "misc");

		funTable.put("COOD", "syn");

	}
536260
function initialize(server, callback) {
		source = new Backend(server, options);
		source.initialize(callback);
	}
240090
def _build_inheritance_chain(cls, bases, *names, merge=False):
        """"""
        result = []
        for name in names:
            maps = []
            for base in bases:
                bmap = getattr(base, name, None)
                if bmap is not None:
                    assert isinstance(bmap, (dict, ChainMap))
                    if len(bmap):
                        if isinstance(bmap, ChainMap):
                            maps.extend(bmap.maps)
                        else:
                            maps.append(bmap)
            result.append(ChainMap({}, *maps))
        if merge:
            result = [dict(map) for map in result]
        if len(names) == 1:
            return result[0]
        return result
769432
def _init_map(self, record_types=None, **kwargs):
        """"""
        osid_objects.OsidRelationshipForm._init_map(self, record_types=record_types)
        self._my_map['assignedVaultIds'] = [str(kwargs['vault_id'])]
        self._my_map['functionId'] = str(kwargs['function_id'])
        self._my_map['qualifierId'] = str(kwargs['qualifier_id'])
        self._my_map['agentId'] = None
        self._my_map['resourceId'] = None
        self._my_map['trustId'] = None
        self._my_map['implicit'] = None
        if 'agent_id' in kwargs:
            self._my_map['agentId'] = str(kwargs['agent_id'])
        if 'resource_id' in kwargs:
            self._my_map['resourceId'] = str(kwargs['resource_id'])
1144714
public void initBasedOnOptions() {
    inputSourceMaps.putAll(options.inputSourceMaps);
    // Create the source map if necessary.
    if (options.sourceMapOutputPath != null) {
      sourceMap = options.sourceMapFormat.getInstance();
      sourceMap.setPrefixMappings(options.sourceMapLocationMappings);
      if (options.applyInputSourceMaps) {
        sourceMap.setSourceFileMapping(this);
        if (options.sourceMapIncludeSourcesContent) {
          for (SourceMapInput inputSourceMap : inputSourceMaps.values()) {
            addSourceMapSourceFiles(inputSourceMap);
          }
        }
      }
    }
  }
1285601
def map_init(interface, params):
    """"""
    import numpy as np
    import random
    np.random.seed(params['seed'])
    random.seed(params['seed'])
    return params
898977
public void init(final Map<String, Map<String, YamlDataSourceParameter>> schemaDataSources, final Map<String, RuleConfiguration> schemaRules) {
        init(schemaRules.keySet(), schemaDataSources, schemaRules, false);
    }
545283
@Override
    public void init(CollectorManager collectorManager) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Subscribing to sources " + this, taskMap.keySet());
        }
        try {
            this.collectorMgr = collectorManager;
            //Get the source Ids from the task map and subscribe to relevant sources
            collectorMgr.subscribe(this, new ArrayList<String>(taskMap.keySet()));
        } catch (Exception e) {

        } finally {
            latch.countDown();
        }
    }