Simple way of adding additional parameters to the end of the define calls.

This is used to add extra information to the generaic compiled modules (like
the dependencyMap object or the list of inverse dependencies).
974315
function addParamsToDefineCall(
  code: string,
  ...paramsToAdd: Array<mixed>
): string {
  const index = code.lastIndexOf(')');
  const params = paramsToAdd.map(param =>
    param !== undefined ? JSON.stringify(param) : 'undefined',
  );

  return code.slice(0, index) + ',' + params.join(',') + code.slice(index);
}
24472
public void addParameter( String name, String value )
    {
        if ( _additionalParameters == null )
        {
            _additionalParameters = new HashMap();
        }
        
        _additionalParameters.put( name, value );
    }
914544
def call_extra(self, methods, kwargs):
        
        old = list(self._nonwrappers), list(self._wrappers)
        for method in methods:
            opts = dict(hookwrapper=False, trylast=False, tryfirst=False)
            hookimpl = HookImpl(None, "<temp>", method, opts)
            self._add_hookimpl(hookimpl)
        try:
            return self(**kwargs)
        finally:
            self._nonwrappers, self._wrappers = old
666328
protected void addDependenciesRecursively(Namespace namespace, List<Namespace> namespaceList, String dependencyId, List<String> extendedDependencies) throws XmlException {
        if(extendedDependencies.contains(dependencyId)) {
            return;
        }
        if(namespace.getId().equals(dependencyId)) {
            throw new XmlException("Circular dependency found in " + namespace.getId());
        }

        Namespace dependency = find(namespaceList, dependencyId);
        extendedDependencies.add(dependency.getId());
        for(String indirectDependencyId: dependency.getDirectDependencyIds()) {
            addDependenciesRecursively(namespace, namespaceList, indirectDependencyId, extendedDependencies);
        }
    }
379672
public function appendAdditionalParams(): void
    {
        if (!empty($this->additionalSearchFields)) {
            $this->normalSearchFields = array_merge_recursive($this->normalSearchFields, $this->additionalSearchFields);
        }

        if (!empty($this->additionalCustomSearchFields)) {
            $this->customSearchFields = array_merge_recursive($this->customSearchFields, $this->additionalCustomSearchFields);
        }

        if (!empty($this->additionalRelationSearchFields)) {
            $this->relationSearchFields = array_merge_recursive($this->relationSearchFields, $this->additionalRelationSearchFields);
        }
    }
971919
function(additional){
		return [function(name, load){
			if(load.address.indexOf("node_modules") >= 0 || load.metadata.format === "defined") {
				return true;
			}
		}].concat(additional || []);
	}
40636
function (options, callback) {
        options = extend({}, DEPENDENCY_WRITE_DEFAULTS, options)
        var json = require(options.jsonUri)

        // the JSON DSL has the option to have "/foo" in <moduleNameLeft>
        after.reduce(json, createFoldersIntoFilesIterator(options.uri), 
            {}, runDependencyMapper)

        function runDependencyMapper(err, data) {
            if (err) {
                return callback(err)
            }
            after.map(data, mapToDependencies, callback)
        }

        function mapToDependencies(dependencies, moduleName, callback) {
            if (isFile.test(moduleName)) {
                // the JSON DSL has the option to have "/foo" or ["/foo"]
                // in <moduleNameRight>.
                after.map(dependencies, createConvertToProxyNameIterator({
                    moduleName: moduleName,
                    uri: options.uri
                }), callback)
            }
        }
    }
473504
private static void addDependency(List<Dependency> dependencies, MavenCoordinates requiredArtifact, Constants.ArtifactType type, String scope) {
		Dependency dependency = new Dependency();
		dependency.setGroupId(requiredArtifact.getGroupId());
		dependency.setArtifactId(requiredArtifact.getArtifactId());
		dependency.setVersion(requiredArtifact.getVersion());

		if(scope!=null){
			dependency.setScope(scope);
		}
		if (type != null) {
			dependency.setType(type.getType());
		}
		dependencies.add(dependency);
	}
1117426
public static MethodNode addGeneratedMethod(ClassNode cNode, String name,
                                int modifiers,
                                ClassNode returnType,
                                Parameter[] parameters,
                                ClassNode[] exceptions,
                                Statement code) {
        MethodNode result = cNode.addMethod(name, modifiers, returnType, parameters, exceptions, code);
        markAsGenerated(cNode, result);
        return result;
    }
18866
def add_plugin(self, plugin, call):
        
        meth = getattr(plugin, call, None)
        if meth is not None:
            self.plugins.append((plugin, meth))
1026331
@Override
    public void endDefinitionList(Map<String, String> parameters)
    {
        saveEvent(EventType.END_DEFINITION_LIST, parameters);
    }
431598
private void expandArg(IntDependency dependency, short valBinDist, double count) {
    IntTaggedWord headT = getCachedITW(dependency.head.tag);
    IntTaggedWord argT = getCachedITW(dependency.arg.tag);
    IntTaggedWord head = new IntTaggedWord(dependency.head.word, tagBin(dependency.head.tag)); //dependency.head;
    IntTaggedWord arg = new IntTaggedWord(dependency.arg.word, tagBin(dependency.arg.tag)); //dependency.arg;
    boolean leftHeaded = dependency.leftHeaded;

    // argCounter stores stuff in both the original and the reduced tag space???
    argCounter.incrementCount(intern(head, arg, leftHeaded, valBinDist), count);
    argCounter.incrementCount(intern(headT, arg, leftHeaded, valBinDist), count);
    argCounter.incrementCount(intern(head, argT, leftHeaded, valBinDist), count);
    argCounter.incrementCount(intern(headT, argT, leftHeaded, valBinDist), count);

    argCounter.incrementCount(intern(head, wildTW, leftHeaded, valBinDist), count);
    argCounter.incrementCount(intern(headT, wildTW, leftHeaded, valBinDist), count);

    // the WILD head stats are always directionless and not useDistance!
    argCounter.incrementCount(intern(wildTW, arg, false, (short) -1), count);
    argCounter.incrementCount(intern(wildTW, argT, false, (short) -1), count);

    if (useSmoothTagProjection) {
      // added stuff to do more smoothing.  CDM Jan 2007
      IntTaggedWord headP = new IntTaggedWord(dependency.head.word, tagProject(dependency.head.tag));
      IntTaggedWord headTP = new IntTaggedWord(ANY_WORD_INT, tagProject(dependency.head.tag));
      IntTaggedWord argP = new IntTaggedWord(dependency.arg.word, tagProject(dependency.arg.tag));
      IntTaggedWord argTP = new IntTaggedWord(ANY_WORD_INT, tagProject(dependency.arg.tag));

      argCounter.incrementCount(intern(headP, argP, leftHeaded, valBinDist), count);
      argCounter.incrementCount(intern(headTP, argP, leftHeaded, valBinDist), count);
      argCounter.incrementCount(intern(headP, argTP, leftHeaded, valBinDist), count);
      argCounter.incrementCount(intern(headTP, argTP, leftHeaded, valBinDist), count);

      argCounter.incrementCount(intern(headP, wildTW, leftHeaded, valBinDist), count);
      argCounter.incrementCount(intern(headTP, wildTW, leftHeaded, valBinDist), count);

      // the WILD head stats are always directionless and not useDistance!
      argCounter.incrementCount(intern(wildTW, argP, false, (short) -1), count);
      argCounter.incrementCount(intern(wildTW, argTP, false, (short) -1), count);
      argCounter.incrementCount(intern(wildTW, new IntTaggedWord(dependency.head.word, ANY_TAG_INT), false, (short) -1), count);
    }
    numWordTokens++;
  }
674019
public void addDependency(String notation, String scope ) {
        Map<String, String> notationMap = Notation.parse(notation);
        Dependency dependency = new Dependency();
        dependency.setGroupId(notationMap.get("groupId"));
        dependency.setArtifactId(notationMap.get("artifactId"));
        dependency.setType(notationMap.get("type"));
        dependency.setVersion(notationMap.get("version"));
        dependency.setScope( scope );
        addDependency(dependency);
    }
1007582
def add_dependency(id=None, name=None, dependency_id=None, dependency_name=None):
    
    data = add_dependency_raw(id, name, dependency_id, dependency_name)
    if data:
        return utils.format_json_list(data)
83572
private void addToProvideMap(
      Iterable<DependencyInfo> depInfos,
      Map<String, DependencyInfo> providesMap,
      boolean isFromDepsFile) {
    for (DependencyInfo depInfo : depInfos) {
      List<String> provides = new ArrayList<>(depInfo.getProvides());

      // Add a munged symbol to the provides map so that lookups by path requires work as intended.
      if (isFromDepsFile) {
        // Don't add the dependency file itself but every file it says exists instead.
        provides.add(
            loader
                .resolve(
                    PathUtil.makeAbsolute(depInfo.getPathRelativeToClosureBase(), closurePathAbs))
                .toModuleName());
      } else {
        // ES6 modules already provide these munged symbols.
        if (!"es6".equals(depInfo.getLoadFlags().get("module"))) {
          provides.add(loader.resolve(depInfo.getName()).toModuleName());
        }
      }

      // Also add the relative closure path as a provide. At some point we'll swap out the munged
      // symbols for these relative paths. So looks ups by either need to work.
      provides.add(depInfo.getPathRelativeToClosureBase());

      for (String provide : provides) {
        DependencyInfo prevValue = providesMap.put(provide, depInfo);
        // Check for duplicate provides.
        if (prevValue != null) {
          reportDuplicateProvide(provide, prevValue, depInfo);
        }
      }
    }
  }
850019
protected void generateFormalParameterBuilderImpl() {
		final TypeReference builderInterface = getFormalParameterBuilderInterface();
		final TypeReference builder = getFormalParameterBuilderImpl();
		final StringConcatenationClient content = new StringConcatenationClient() {
			@Override
			protected void appendTo(TargetStringConcatenation it) {
				it.append("/** Builder of a " + getLanguageName() //$NON-NLS-1$
						+ " formal parameter."); //$NON-NLS-1$
				it.newLine();
				it.append(" */"); //$NON-NLS-1$
				it.newLine();
				it.append("@SuppressWarnings(\"all\")"); //$NON-NLS-1$
				it.newLine();
				it.append("public class "); //$NON-NLS-1$
				it.append(builder.getSimpleName());
				it.append(" extends "); //$NON-NLS-1$
				it.append(getAbstractBuilderImpl());
				it.append(" implements "); //$NON-NLS-1$
				it.append(builderInterface);
				it.append(" {"); //$NON-NLS-1$
				it.newLineIfNotEmpty();
				it.newLine();
				it.append(generateMembers(false, false));
				it.append("}"); //$NON-NLS-1$
				it.newLineIfNotEmpty();
				it.newLine();
			}
		};
		final JavaFileAccess javaFile = getFileAccessFactory().createJavaFile(builder, content);
		javaFile.writeTo(getSrcGen());
	}
912481
function genAddDependency(basePath, provideMap, requireMap) {
  var provide = provideMap.getAllProvides();
  var require = requireMap.getAllRequires();
  var set = new Set();

  provide.forEach(function(value, key) {
    set.add(key);
  });
  require.forEach(function(value, key) {
    set.add(key);
  });

  var results = [];
  set.forEach(function(key) {
    var relativeServePath = pathMod.join(
        '../../', pathMod.relative(basePath, key));

    if (osMod.platform().indexOf('win') != -1) {
      // For the case of Windows relativeServePath contains backslashes. Need to
      // escape the backward slash, otherwise it will not appear in the deps.js
      // file correctly. An alternative would be to convert backslashes to
      // forward slashes which works just as fine in the context of a browser.
      relativeServePath = relativeServePath.replace(/\\/g, '\\\\');
    }
    var line = 'goog.addDependency("' + relativeServePath + '", ';

    var isModule = false;
    if (provide.has(key)) {
      var value = /** @type {!Array<string>} */ (provide.get(key));
      line += JSON.stringify(value) + ', ';
      isModule = provideMap.isModule(key);
    } else {
      line += '[], ';
    }

    if (require.has(key)) {
      line += JSON.stringify(require.get(key));
    } else {
      line += '[]';
    }

    line += isModule ? ', true);' : ');';
    results.push(line);
  });

  return results;
}