Given a tag name, add it to the set of tags it belongs to.
340656
private void checkTagName(String name) {
        if (standardTags.contains(name)) {
            overridenStandardTags.add(name);
        } else {
            if (name.indexOf('.') == -1) {
                potentiallyConflictingTags.add(name);
            }
            unseenCustomTags.add(name);
        }
    }
927397
def add_tag(self, tag):
        
        if tag not in self._tags:
            self._tags[tag] = dict()
1029742
public MetadataBuilder addTags(String tag, String... tags)
    {
        if (!StringUtils.isBlank(tag))
            this.tags.add(tag.trim());

        if (tags != null)
        {
            for (String t : tags)
            {
                if (!StringUtils.isBlank(t))
                    this.tags.add(t.trim());
            }
        }

        return this;
    }
501268
def _put_bucket_tagging(self):
        """"""
        all_tags = self.s3props['tagging']['tags']
        all_tags.update({'app_group': self.group, 'app_name': self.app_name})
        tag_set = generate_s3_tags.generated_tag_data(all_tags)

        tagging_config = {'TagSet': tag_set}

        self.s3client.put_bucket_tagging(Bucket=self.bucket, Tagging=tagging_config)
        LOG.info("Adding tagging %s for Bucket", tag_set)
1237361
function moveNestedTags(i) {
  var this$1 = this;

  each(Object.keys(this.tags), function (tagName) {
    moveChildTag.apply(this$1.tags[tagName], [tagName, i]);
  });
}
67833
private void addChildElements() {
		for (Node node : nodes) {
			Collection<? extends Node> childNodes = helper.getChildNodes(node);
			for (Node child : childNodes)
				if (matchTag(child))
					result.add(child);
		}
	}
229859
public Whitelist addTags(String... tags) {
        Validate.notNull(tags);

        for (String tagName : tags) {
            Validate.notEmpty(tagName);
            tagNames.add(TagName.valueOf(tagName));
        }
        return this;
    }
304639
def tag(self, *tags):
        
        if any([not isinstance(tag, collections.Hashable) for tag in tags]):
            raise TypeError('Every tag should be hashable')

        if not all(isinstance(tag, collections.Hashable) for tag in tags):
            raise TypeError('Tags must be hashable')
        self.tags.update(tags)
        return self
782651
@SuppressWarnings("unchecked")
	public T tags(final Collection<String> tags) {
		if (this.tags == null) {
			this.tags = new HashSet<>();
		}

		this.tags.addAll(tags);

		return (T) this;
	}
806243
def set_tags(self, tags):
        
        for key, value in tags.items():
            self.set_tag(key, value)
1308120
def _add_match(self, match):
        
        if self.__name_dict is not None:
            if match.name:
                _BaseMatches._base_add(self._name_dict[match.name], (match))
        if self.__tag_dict is not None:
            for tag in match.tags:
                _BaseMatches._base_add(self._tag_dict[tag], match)
        if self.__start_dict is not None:
            _BaseMatches._base_add(self._start_dict[match.start], match)
        if self.__end_dict is not None:
            _BaseMatches._base_add(self._end_dict[match.end], match)
        if self.__index_dict is not None:
            for index in range(*match.span):
                _BaseMatches._base_add(self._index_dict[index], match)
        if match.end > self._max_end:
            self._max_end = match.end
1047459
public void addTag(Tag tag) {
    set(PackageMetadata.TAGS, concat(getTags(), singletonList(tag)));
  }
456015
def set_tags(self, tags):
        

        c_old_tags = []
        old_tags = []
        c_new_tags = []
        new_tags = []

        to_remove = []
        to_add = []

        tags_on_server = self.get_tags()

        for tag in tags_on_server:
            c_old_tags.append(tag.get_name().lower())
            old_tags.append(tag.get_name())

        for tag in tags:
            c_new_tags.append(tag.lower())
            new_tags.append(tag)

        for i in range(0, len(old_tags)):
            if not c_old_tags[i] in c_new_tags:
                to_remove.append(old_tags[i])

        for i in range(0, len(new_tags)):
            if not c_new_tags[i] in c_old_tags:
                to_add.append(new_tags[i])

        self.remove_tags(to_remove)
        self.add_tags(to_add)
62843
public CreateNewNoteIntentBuilder addTags(@Nullable ArrayList<String> tags) {
        ArrayList<String> list = mArgs.getStringArrayList(EvernoteIntent.EXTRA_TAG_NAME_LIST);
        if (list == null) {
            list = tags;

        } else if (tags != null) {
            list.addAll(tags);
        }

        return setTags(list);
    }
867506
def add_tags(self, md5, tags):
        """"""
        if not tags: return
        tag_set = set(self.get_tags(md5)) if self.get_tags(md5) else set()
        if isinstance(tags, str):
            tags = [tags]
        for tag in tags:
            tag_set.add(tag)
        self.data_store.store_work_results({'tags': list(tag_set)}, 'tags', md5)
157139
public void setTags(java.util.Collection<Tag> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new java.util.ArrayList<Tag>(tags);
    }
298336
def set_tags(
            self,
            tags=""):
        
        self.refresh
        tagList = []
        regex = re.compile(r'@[^@]*', re.S)
        matchList = regex.findall(tags)
        for m in matchList:
            tagList.append(m.strip().replace("@", ""))

        self.refresh
        oldContent = self.to_string(indentLevel=1)
        self.tags = tagList
        newContent = self.to_string(indentLevel=1)

        # ADD DIRECTLY TO CONTENT IF THE PROJECT IS BEING ADDED SPECIFICALLY TO
        # THIS OBJECT
        self.parent._update_document_tree(
            oldContent=oldContent,
            newContent=newContent
        )
        self.refresh
        return None