Make sure this isn't a conflicted copy before adding (we don't send these to the server in a sync)
344378
function addNonConflicted(sourceNode, callback) {
    conflict.isConflictedCopy(fs, sourceNode.path, function(err, conflicted) {
      if(err) {
        return callback(err);
      }

      if(!conflicted) {
        sources.push(sourceNode);
      }

      callback(null, sources);
    });
  }
324412
def add(self, record):
        """"""
        self._field.validate_value(record)
        self._elements[record.id] = record
        self._sync_field()
1158434
private void addNonPermanent(AddOnModel addOnModel, IzouSoundLineBaseClass izouSoundLine) {
        debug("adding " + izouSoundLine + " from " + addOnModel + " to non-permanent");
        if (izouSoundLine.isPermanent())
            izouSoundLine.setToNonPermanent();
        List<WeakReference<IzouSoundLineBaseClass>> weakReferences = nonPermanent.get(addOnModel);
        if (weakReferences == null)
            weakReferences = Collections.synchronizedList(new ArrayList<>());
        nonPermanent.put(addOnModel, weakReferences);
        weakReferences.add(new WeakReference<>(izouSoundLine));
    }
553741
def merge!(errors)
      if errors
        errors.each_pair do |field, messages|
          messages.each do |message|
            add(field, message)
          end
        end
      end
    end
374114
function add() {
        var root = FileUtils.stripTrailingSlash(ProjectManager.getProjectRoot().fullPath),
            recentProjects = getRecentProjects(),
            index = recentProjects.indexOf(root);

        if (index !== -1) {
            recentProjects.splice(index, 1);
        }
        recentProjects.unshift(root);
        if (recentProjects.length > MAX_PROJECTS) {
            recentProjects = recentProjects.slice(0, MAX_PROJECTS);
        }
        PreferencesManager.setViewState("recentProjects", recentProjects);
    }
570789
public void addDefaultSimons() {
		addTime("A", 100);
		addTime("B", 200);
		addTime("C", 300);
		addTime("A", 200);
		addTime("A", 300);
		addTime("B", 100);
		addCounter("X", 1L);
		addCounter("X", 4L);
		addCounter("X", 2L);
		addStopwatchSplits(SimonManager.getStopwatch("$Proxy"), 5);
	}
779489
def add(response)
      if @list.key? response.name
        raise DuplicateResponse, "A response named #{response.name} already exists"
      end
      @list[response.name] = response
    end
822229
function add(changeList, property, index, values) {
        changeList.push({
            type:'add',
            path: property,
            index: index,
            vals: values
        })
    }
1259224
synchronized void checkForUpdates() {

        if (!m_updateSet.isEmpty()) {
            Set<CmsUUID> copiedIds = Sets.newHashSet(m_updateSet);
            m_updateSet.clear();

            if (copiedIds.contains(CmsUUID.getNullUUID())) {
                LOG.info("Updating detail name cache: reloading...");
                reload();
            } else {
                LOG.info("Updating detail name cache. Number of changed files: " + copiedIds.size());
                CmsManyToOneMap<String, CmsUUID> cacheCopy = new CmsManyToOneMap<String, CmsUUID>(m_detailIdCache);
                for (CmsUUID id : copiedIds) {
                    Set<String> urlNames = getUrlNames(id);
                    cacheCopy.removeValue(id);
                    for (String urlName : urlNames) {
                        cacheCopy.put(urlName, id);
                    }
                }
                m_detailIdCache = cacheCopy;
            }
        }
    }
687594
def union_update(self, other, ignore_conflicts=False):
        """"""
        if not ignore_conflicts:
            ensure_compatible(self, other)
        self._objects |= other._objects
        self._properties |= other._properties
        self._pairs |= other._pairs
1318097
private void addAncilliaryEntityData(StructAsym asym, int entityId, Entity entity, EntityInfo entityInfo) {
		// Loop through each of the entity types and add the corresponding data
		// We're assuming if data is duplicated between sources it is consistent
		// This is a potentially huge assumption...


		for (EntitySrcGen esg : entitySrcGens) {

			if (! esg.getEntity_id().equals(asym.getEntity_id()))
				continue;

			addInformationFromESG(esg, entityId, entityInfo);

		}

		for (EntitySrcNat esn : entitySrcNats) {
			if (! esn.getEntity_id().equals(asym.getEntity_id()))
				continue;
			addInformationFromESN(esn, entityId, entityInfo);

		}

		for (EntitySrcSyn ess : entitySrcSyns) {
			if (! ess.getEntity_id().equals(asym.getEntity_id()))
				continue;
			addInfoFromESS(ess, entityId, entityInfo);

		}
	}
764359
function copyIfNotExists (src, dst) {
    if (!fs.existsSync(dst) && src) {
        fs.copySync(src, dst);
    }
}
2778
def registerAddon(cls, name, addon, force=False):
        
        prop = '_{0}__addons'.format(cls.__name__)
        cmds = getattr(cls, prop, {})

        if name in cmds and not force:
            raise errors.AddonAlreadyExists(cls, name, addon)

        cmds[name] = addon
        try:
            if issubclass(addon, cls):
                setattr(addon, '_{0}__addonName'.format(addon.__name__), name)
        except StandardError:
            pass

        setattr(cls, prop, cmds)
1262722
def add_write(key, value, binary = false)
      if (@is_commit)
        raise RuntimeError.new('No further request supported after a commit!')
      end
      @requests << {'write' => {key => JSONConnection.encode_value(value, binary)}}
      self
    end
762459
def add_if_unique(self, name):
        
        with self.lock:
            if name not in self.names:
                self.names.append(name)
                return True
        return False
548922
private void addNewRepos(List<ArtifactoryRepo> repos, List<ArtifactoryRepo> existingRepos, ArtifactoryCollector collector) {
        long start = System.currentTimeMillis();
        int count = 0;

        List<ArtifactoryRepo> newRepos = new ArrayList<>();
        for (ArtifactoryRepo repo : repos) {
            ArtifactoryRepo existing = null;
            if (!CollectionUtils.isEmpty(existingRepos) && (existingRepos.contains(repo))) {
                existing = existingRepos.get(existingRepos.indexOf(repo));
            }

            if (existing == null) {
                repo.setCollectorId(collector.getId());
                repo.setEnabled(false); // Do not enable for collection. Will be enabled later
                repo.setDescription(repo.getRepoName());
                newRepos.add(repo);
                count++;
            }
        }
        //save all in one shot
        if (!CollectionUtils.isEmpty(newRepos)) {
            artifactoryRepoRepository.save(newRepos);
        }
        log("New repos", start, count);
    }
459722
function insertProxy(proxies, namespace, serverType, proxy) {
    proxies[namespace] = proxies[namespace] || {};
    if (proxies[namespace][serverType]) {
        for (const attr in proxy) {
            if (proxy.hasOwnProperty(attr)) {
                proxies[namespace][serverType][attr] = proxy[attr];
            }
        }
    } else proxies[namespace][serverType] = proxy;
}