Add debian/control Conflicts field.
@param name
@param version
@param dependency
@return
10711
@Override
    public DEBBuilder addConflict(String name, String version, Condition... dependency)
    {
        control.addConflict(release, version, dependency);
        return this;
    }
390045
@Override
    public DEBBuilder addProvide(String name, String version, Condition... dependency)
    {
        control.addProvides(name);
        return this;
    }
611195
private void extractConfigureScriptEvidence(Dependency dependency,
            final String name, final String contents) {
        final Matcher matcher = PACKAGE_VAR.matcher(contents);
        while (matcher.find()) {
            final String variable = matcher.group(1);
            final String value = matcher.group(2);
            if (!value.isEmpty()) {
                if (variable.endsWith("NAME")) {
                    dependency.addEvidence(EvidenceType.PRODUCT, name, variable, value, Confidence.HIGHEST);
                } else if ("VERSION".equals(variable)) {
                    dependency.addEvidence(EvidenceType.VERSION, name, variable, value, Confidence.HIGHEST);
                } else if ("BUGREPORT".equals(variable)) {
                    dependency.addEvidence(EvidenceType.VENDOR, name, variable, value, Confidence.HIGH);
                } else if ("URL".equals(variable)) {
                    dependency.addEvidence(EvidenceType.VENDOR, name, variable, value, Confidence.HIGH);
                }
            }
        }
    }
24819
@Override
    public RPMBuilder addProvide(String name, String version, Condition... dependency)
    {
        addString(RPMTAG_PROVIDENAME, name);
        addString(RPMTAG_PROVIDEVERSION, version);
        addInt32(RPMTAG_PROVIDEFLAGS, Dependency.or(dependency));
        ensureVersionReq(version);
        return this;
    }
1215938
public void addVariant(CmsDocumentDependency dep) {

        // check if already exists
        for (CmsDocumentDependency lang : m_variants) {
            if (lang.getLocale().equals(dep.getLocale())) {
                return;
            }
        }
        dep.setType(DependencyType.variant);
        m_variants.add(dep);
        addDependency(dep);
    }
753537
@Override
    public DEBBuilder addRequire(String name, String version, Condition... dependency)
    {
        control.addDepends(release, version, dependency);
        return this;
    }
355528
public static void validateVersion(String name) throws InvalidNameException {
        if (StringUtils.isEmpty(name)) {
            throw ExceptionFactory.invalidVersionException(Messages.i18n.format("FieldValidator.EmptyVersionError")); //$NON-NLS-1$
        }
    }
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);
    }
1316924
public Widget addControl(String name, int resId, Widget.OnTouchListener listener) {
        return addControl(name, resId, null, listener, -1);
    }
905903
public void addDependency(final Dependency dependency) {
        if(dependency != null && !dependencies.contains(dependency)){
            this.dependencies.add(dependency);
        }
    }
1097637
@SuppressWarnings("ReferenceEquality")
    public synchronized void addRelatedDependency(Dependency dependency) {
        if (this == dependency) {
            LOGGER.warn("Attempted to add a circular reference - please post the log file to issue #172 here "
                    + "https://github.com/jeremylong/DependencyCheck/issues/172");
            LOGGER.debug("this: {}", this);
            LOGGER.debug("dependency: {}", dependency);
        } else if (!relatedDependencies.add(dependency)) {
            LOGGER.debug("Failed to add dependency, likely due to referencing the same file as another dependency in the set.");
            LOGGER.debug("this: {}", this);
            LOGGER.debug("dependency: {}", dependency);
        }
    }
791527
public Dependency getDependency(final DbDependency dbDependency, final String sourceName, final String sourceVersion) {
        final DbArtifact dbArtifact = repositoryHandler.getArtifact(dbDependency.getTarget());
        final Artifact artifact;

        if (dbArtifact == null) {
            artifact = DataUtils.createArtifact(dbDependency.getTarget());
        } else {
            artifact = getArtifact(dbArtifact);
        }

        final Dependency dependency = DataModelFactory.createDependency(artifact, dbDependency.getScope());
        dependency.setSourceName(sourceName);
        dependency.setSourceVersion(sourceVersion);

        return dependency;
    }
768752
private function initConsole(string $name, string $version)
    {
        $this->console = $this->container->get(SymfonyConsoleApplication::class);
        $this->console->setName($name);
        $this->console->setVersion($version);
        $this->console->setCatchExceptions(false);
        $this->console->setAutoExit(false);

        /** @var CommandCollectionContract $commands */
        $commands = $this->container->get(CommandCollectionContract::class);
        foreach ($commands as $command) {
            $this->console->add($this->resolveCommand($command));
        }
    }
1267936
private boolean handleOverridesAndConflicts(JvmOperation operation, Multimap<String, AbstractResolvedOperation> processedOperations) {
		String simpleName = operation.getSimpleName();
		if (!processedOperations.containsKey(simpleName)) {
			return true;
		}
		List<AbstractResolvedOperation> conflictingOperations = null;
		for (AbstractResolvedOperation candidate : processedOperations.get(simpleName)) {
			OverrideTester overrideTester = candidate.getOverrideTester();
			IOverrideCheckResult checkResult = overrideTester.isSubsignature(candidate, operation, false);
			if (checkResult.getDetails().contains(OverrideCheckDetails.DEFAULT_IMPL_CONFLICT)) {
				// The current operation conflicts with the candidate
				if (conflictingOperations == null)
					conflictingOperations = Lists.newLinkedList();
				conflictingOperations.add(candidate);
			} else if (checkResult.isOverridingOrImplementing()) {
				return false;
			}
		}
		if (conflictingOperations != null) {
			if (conflictingOperations.size() == 1 && conflictingOperations.get(0) instanceof ConflictingDefaultOperation) {
				// The current operation contributes to the already existing conflict
				ConflictingDefaultOperation conflictingDefaultOperation = (ConflictingDefaultOperation) conflictingOperations.get(0);
				boolean isOverridden = false;
				for (IResolvedOperation conflictingOp : conflictingDefaultOperation.getConflictingOperations()) {
					if (conflictingOp.getResolvedDeclarator().isSubtypeOf(operation.getDeclaringType())) {
						isOverridden = true;
						break;
					}
				}
				if (!isOverridden)
					conflictingDefaultOperation.getConflictingOperations().add(createResolvedOperation(operation));
				return false;
			}
			// A new conflict of default implementations was found
			if (operation.isAbstract()) {
				ConflictingDefaultOperation resolvedOperation = createConflictingOperation(conflictingOperations.get(0).getDeclaration());
				resolvedOperation.getConflictingOperations().add(createResolvedOperation(operation));
				for (AbstractResolvedOperation conflictingOp : conflictingOperations) {
					processedOperations.remove(simpleName, conflictingOp);
					if (conflictingOp.getDeclaration() != resolvedOperation.getDeclaration()) {
						resolvedOperation.getConflictingOperations().add(conflictingOp);
					}
				}
				processedOperations.put(simpleName, resolvedOperation);
			} else {
				ConflictingDefaultOperation resolvedOperation = createConflictingOperation(operation);
				for (AbstractResolvedOperation conflictingOp : conflictingOperations) {
					processedOperations.remove(simpleName, conflictingOp);
					resolvedOperation.getConflictingOperations().add(conflictingOp);
				}
				processedOperations.put(simpleName, resolvedOperation);
			}
			return false;
		}
		return true;
	}
311492
function addModuleToDependencies(cwd, name, version) {
  version = version || 'latest';
  let pkgFile = { dependencies: {} };
  const pkgPath = path.join(cwd, 'package.json');
  if (fs.existsSync(pkgPath)) {
    pkgFile = fs.readJsonSync(pkgPath);
  }
  pkgFile.dependencies[name] = version;
  fs.outputJsonSync(pkgPath, pkgFile);
}
1225452
public static final ApiVersionAlreadyExistsException apiVersionAlreadyExistsException(String apiName, String version) {
        return new ApiVersionAlreadyExistsException(Messages.i18n.format("ApiVersionAlreadyExists", apiName, version)); //$NON-NLS-1$
    }
975347
public static Module createModule(final String name,final String version){
        final Module module = new Module();

        module.setName(name);
        module.setVersion(version);
        module.setPromoted(false);

        return module;

    }