Emits the is<TAG_NAME> methods and tagName method signatures for
         determining tag state and retrieving human-readable value of tag
         state, respectively.
350840
def _generate_union_tag_access_signatures(self, union):
        """"""
        for field in union.all_fields:
            self.emit(comment_prefix)
            base_str = 'Retrieves whether the union\'s current tag state has value "{}".'
            self.emit_wrapped_text(
                base_str.format(field.name), prefix=comment_prefix)
            self.emit(comment_prefix)
            if not is_void_type(field.data_type):
                warning_str = (
                    '@note Call this method and ensure it returns true before '
                    'accessing the `{}` property, otherwise a runtime exception '
                    'will be thrown.')
                self.emit_wrapped_text(
                    warning_str.format(fmt_var(field.name)),
                    prefix=comment_prefix)
                self.emit(comment_prefix)
            base_str = '@return Whether the union\'s current tag state has value "{}".'
            self.emit_wrapped_text(
                base_str.format(field.name), prefix=comment_prefix)
            self.emit(comment_prefix)

            is_tag_signature = fmt_signature(
                func='is{}'.format(fmt_camel_upper(field.name)),
                args=[],
                return_type='BOOL')
            self.emit('{};'.format(is_tag_signature))
            self.emit()

        get_tag_name_signature = fmt_signature(
            func='tagName', args=None, return_type='NSString *')

        self.emit(comment_prefix)
        self.emit_wrapped_text(
            "Retrieves string value of union's current tag state.",
            prefix=comment_prefix)
        self.emit(comment_prefix)
        base_str = "@return A human-readable string representing the union's current tag state."
        self.emit_wrapped_text(base_str, prefix=comment_prefix)
        self.emit(comment_prefix)
        self.emit('{};'.format(get_tag_name_signature))
        self.emit()
994237
def __render_tag(info, state):
    
    new_contexts, context_match = get_tag_context(info['tag_key'], state)
    replacement = ''

    if context_match or context_match == 0:
        replacement = context_match
    elif info['tag_key'] == '.':
        replacement = state.context()
    else:
        replacement = ''

    # Call all callables / methods / lambdas / functions
    if replacement and callable(replacement):
        replacement = make_unicode(replacement())

        state.push_tags(state.default_tags)
        replacement = __render(template=replacement, state=state)
        state.pop_tags()

    for i in xrange(new_contexts): state.context.pop()

    if state.escape():
        return html_escape(replacement)
    return replacement
1275279
def qualified_tag_name(name)
        nesting_parts = @tag_binding_stack.collect { |tag| tag.name }
        nesting_parts << name unless nesting_parts.last == name
        specific_name = nesting_parts.join(':') # specific_name always has the highest specificity
        unless @definitions.has_key? specific_name
          possible_matches = @definitions.keys.grep(/(^|:)#{name}$/)
          specificity = possible_matches.inject({}) { |hash, tag| hash[numeric_specificity(tag, nesting_parts)] = tag; hash }
          max = specificity.keys.max
          if max != 0
            specificity[max]
          else
            name
          end
        else
          specific_name
        end
      end
1233570
def tagMap(self):
        "
        if self.tagSet:
            return Set.tagMap.fget(self)
        else:
            return self.componentType.tagMapUnique
871061
def tagReportCallback(llrpMsg):
    """"""
    global tagReport
    tags = llrpMsg.msgdict['RO_ACCESS_REPORT']['TagReportData']
    if len(tags):
        logger.info('saw tag(s): %s', pprint.pformat(tags))
    else:
        logger.info('no tags seen')
        return
    for tag in tags:
        tagReport += tag['TagSeenCount'][0]
        if "OpSpecResult" in tag:
            # copy the binary data to the standard output stream
            data = tag["OpSpecResult"].get("ReadData")
            if data:
                if sys.version_info.major < 3:
                    sys.stdout.write(data)
                else:
                    sys.stdout.buffer.write(data)                     # bytes
                logger.debug("hex data: %s", binascii.hexlify(data))
1236405
def get_tag(self, tagname, tagidx):
        
        return '%s=%s' % (tagname, decode(getattr(self, tagname)[tagidx]))
147753
public static String getMetricNameWithTags(String name, String... tags) {
    Preconditions.checkArgument(tags.length % 2 == 0,
        "The tag arguments should be tag name and tag value pairs");
    StringBuilder sb = new StringBuilder();
    sb.append(name);
    for (int i = 0; i < tags.length; i += 2) {
      sb.append('.').append(tags[i]).append(TAG_SEPARATOR).append(tags[i + 1]);
    }
    return sb.toString();
  }
857650
def tagged(self, tag):
    """"""
    return Scm(self.connection, self.developer_connection, self.url, tag=tag)
398908
def as_name(value)
      case true
      when value.tag?
        element(value).name
      when value.dicom_name?
        @methods_from_names.has_key?(value) ? value.to_s : nil
      when value.dicom_method?
        @names_from_methods[value.to_sym]
      else
        nil
      end
    end
616467
def tags_impl(self):
    
    if self._db_connection_provider:
      # Read tags from the database.
      db = self._db_connection_provider()
      cursor = db.execute('''
        SELECT
          Tags.tag_name,
          Tags.display_name,
          Runs.run_name
        FROM Tags
        JOIN Runs
          ON Tags.run_id = Runs.run_id
        WHERE
          Tags.plugin_name = ?
      ''', (metadata.PLUGIN_NAME,))
      result = {}
      for (tag_name, display_name, run_name) in cursor:
        if run_name not in result:
          result[run_name] = {}
        result[run_name][tag_name] = {
            'displayName': display_name,
            # TODO(chihuahua): Populate the description. Currently, the tags
            # table does not link with the description table.
            'description': '',
        }
    else:
      # Read tags from events files.
      runs = self._multiplexer.Runs()
      result = {run: {} for run in runs}

      mapping = self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME)
      for (run, tag_to_content) in six.iteritems(mapping):
        for (tag, _) in six.iteritems(tag_to_content):
          summary_metadata = self._multiplexer.SummaryMetadata(run, tag)
          result[run][tag] = {'displayName': summary_metadata.display_name,
                              'description': plugin_util.markdown_to_safe_html(
                                  summary_metadata.summary_description)}

    return result
13038
def instantiate_tags(tag_classes)
      tag_classes.each do |cls|
        tag = cls.new()

        Array(tag.pattern).each do |pattern|
          @patterns[pattern] = tag
        end

        if tag.tagname
          @tagnames[tag.tagname] = tag
        end

        if tag.signature
          tag.signature[:tagname] = tag.tagname
          @signatures << tag.signature
        end

        @tags << tag
      end
    end
1316630
function identifyCommentType(tag) {
    var commentType = null;
    for (var tagName in tag) {
        if (tag.hasOwnProperty(tagName)) {
            switch (tagName) {
                case exports.TAG_NAMES.API:
                case exports.TAG_NAMES.METHOD:
                case exports.TAG_NAMES.METHOD_SIGNATURE:
                case exports.TAG_NAMES.METHOD_NAME:
                case exports.TAG_NAMES.PARAM:
                case exports.TAG_NAMES.RETURN:
                case exports.TAG_NAMES.THROWS:
                    commentType = exports.COMMENT_TYPES.METHOD;
                    break;
                case exports.TAG_NAMES.MODULE:
                case exports.TAG_NAMES.REQUIRES:
                    commentType = exports.COMMENT_TYPES.MODULE;
                    break;
                case exports.TAG_NAMES.CLASS:
                    commentType = exports.COMMENT_TYPES.TYPE;
                    break;
                case exports.TAG_NAMES.VARIABLE_NAME:
                    commentType = exports.COMMENT_TYPES.VARIABLE;
                    break;
            }
        }
    }

    return commentType;
}
82873
def tag(self, name, attrs=None, selfclosing=None):
        """"""
        if self.disable_tags > 0:
            return

        if name in self.linkable_tags and attrs and len(attrs) > 0:
            for attrib in attrs:
                if attrib[0] in self.linkable_attrs:
                    attrib[1] = INTERNAL_LINK.sub('{\g<1>}', attrib[1])

        super().tag(name, attrs, selfclosing)
1166084
def get_current_tag(self) -> typing.Optional[str]:
        
        tags = list(self.repo.tags)
        if not tags:
            LOGGER.debug('no tag found')
            return None
        for tag in tags:
            LOGGER.debug('tag found: %s; comparing with commit', tag)
            if tag.commit == self.latest_commit():
                tag_name: str = tag.name
                LOGGER.debug('found tag on commit: %s', tag_name)
                return tag_name

        LOGGER.debug('no tag found on latest commit')
        return None
61888
def get_tags(self):
        
        # Lazily load info
        if self.info is None:
            self.get_info()

        if 'tags' in self.info:
            return [structure['tag']['tag'] for structure in self.info['tags']]
        else:
            return []
673497
@Around(value = "execution(* *(.., @TagParameter (*), ..))")
	public Object doTagging(ProceedingJoinPoint pjp) throws Throwable {
		MethodSignature methodSig = (MethodSignature) pjp.getSignature();
		Annotation[][] annotations = methodSig.getMethod().getParameterAnnotations();
		Object[] args = pjp.getArgs();

		for (int i = 0; i < args.length; i++) {
			for (Annotation annotation : annotations[i]) {
				if (TagParameter.class.isInstance(annotation)) {
					TagParameter tagParameter = (TagParameter) annotation;
					MoSKitoContext.addTag(tagParameter.name(), args[i] == null ? null : args[i].toString(), TagType.ANNOTATED, pjp.getSignature().toShortString());
				}
			}
		}
		return pjp.proceed();
	}
29181
private String getMethodCommentText() {

        String text = null;

        // Check the read method first
        if (mReadMethod != null) {
            text = mReadMethod.getCommentText();
        }
        if (text == null && mWriteMethod != null) {
            // Try the write method
            text = mWriteMethod.getCommentText();
        }

        if (text == null || text.trim().length() == 0) {
            // Try the "@return" tag
            text = getTagValue("return");
        }

        return text;
    }