Determines a default value to use for anonymizing the given tag.

 @param [String] tag a data element tag
 @return [String, Integer, Float] the default replacement value for a given tag
193937
def default_value(tag)
      name, vr = LIBRARY.name_and_vr(tag)
      conversion = VALUE_CONVERSION[vr]
      case conversion
      when :to_i then return 0
      when :to_f then return 0.0
      else
        # Assume type is string and return an empty string:
        return ''
      end
    end
931237
def make_tag(cls, tag_name):
		
		if cls.cm:
			return cls.cm.make_tag(tag_name)
		return Tag(tag_name.strip())
1179004
def has_tag?(name)
      tags.any? {|tag| tag.tag_name.to_s == name.to_s }
    end
182126
def evaluate_default_value(val)
      if val.respond_to?(:call)
        val.call
      elsif val.duplicable?
        val.dup
      else
        val
      end
    end
671030
def tag(self, value):
        
        if value is None:
            value = sys.argv[0]
        self._tag = value[:self.MAX_TAG_LEN]
391540
def adapt_tag!(parsed_tag)
      # Saving off the original data
      parsed_tag['cuke_modeler_parsing_data'] = Marshal::load(Marshal.dump(parsed_tag))

      parsed_tag['name'] = parsed_tag.delete(:name)
      parsed_tag['line'] = parsed_tag.delete(:location)[:line]
    end
1114172
private GedToken getToken(final String tag) {
        GedToken gedToken = tokens.get(tag);
        if (gedToken == null) {
            // Any unknown token is an attribute, retaining its tag.
            gedToken = new GedToken(tag, ATTR_FACTORY);
        }
        return gedToken;
    }
633210
function getRawTag(value) {
  var isOwn = hasOwnProperty$1.call(value, symToStringTag$1),
      tag = value[symToStringTag$1];

  try {
    value[symToStringTag$1] = undefined;
    var unmasked = true;
  } catch (e) {}

  var result = nativeObjectToString.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag$1] = tag;
    } else {
      delete value[symToStringTag$1];
    }
  }
  return result;
}
1298557
def set_tag(self, tag):
        '''
        
        '''
        if self._world:
            if self._world.get_entity_by_tag(tag):
                raise NonUniqueTagError(tag)
        self._tag = tag
476930
function tagReplace(original, tag, value) {
  var fullTag = `[[${  tag  }]]`;
  return original.split(fullTag).join(value ? value : '');
}
611701
function maybe_name_with_default() {
  skip_horiz_white();
  if (look(/\[/)) {
    match(/\[/);
    maybe_ident_chain("name");
    skip_horiz_white();
    if (look(/=/)) {
      match(/=/);
      skip_horiz_white();
      current_tag["default"] = default_value();
    }
    skip_horiz_white();
    match(/\]/);
    current_tag["optional"] = true;
  }
  else {
    maybe_ident_chain("name");
  }
}
446267
def set_tag(self, key, value):
        
        with self.update_lock:
            if key == ext_tags.SAMPLING_PRIORITY and not self._set_sampling_priority(value):
                return self
            if self.is_sampled():
                tag = thrift.make_tag(
                    key=key,
                    value=value,
                    max_length=self.tracer.max_tag_value_length, )
                self.tags.append(tag)
        return self
642996
def tag_value(prefix)
      tag = nil
      tag = @startup_tags && @startup_tags.detect { |t| t =~ /^#{prefix}/ }
      value = tag[prefix.size + 1..-1] if tag
      value
    end
961696
def set_tag(tag, value):
     
    if not tag.startswith("*auto-tag-"):
        rdict = load_feedback()
        tests = rdict.setdefault("tests", {})
        tests[tag] = (value == True)
        save_feedback(rdict)
110828
def parse_tag(tag):
    
    tag = normalize_characters(tag)
    if tag in EXCEPTIONS:
        return [('grandfathered', tag)]
    else:
        # The first subtag is always either the language code, or 'x' to mark
        # the entire tag as private-use. Other subtags are distinguished
        # by their length and format, but the language code is distinguished
        # entirely by the fact that it is required to come first.
        subtags = tag.split('-')
        if subtags[0] == 'x':
            if len(subtags) == 1:
                raise LanguageTagError("'x' is not a language tag on its own")
            else:
                # the entire language tag is private use, but we know that,
                # whatever it is, it fills the "language" slot
                return [('language', tag)]
        elif len(subtags[0]) >= 2:
            return [('language', subtags[0])] + parse_subtags(subtags[1:])
        else:
            subtag_error(subtags[0], 'a language code')
118099
def reset_tag(self, name):
        
        id_ = str(uuid.uuid4()).replace('-', '')

        self._store.forever(self.tag_key(name), id_)

        return id_
1002489
def tag( params )

            # TODO: make these method args if possible
            tag   = params['tag']
            attr  = params['attr']
            cdata = params['cdata']

            unless attr.kind_of?( HTML::AutoAttr )
                attr = HTML::AutoAttr.new( attr, @sorted )
            end

            # emtpy tag
            unless cdata and cdata.to_s.length
                return ( @indent * @level ) + '<' + tag + attr.to_s + ' />' + @newline
            end

            rendered  = ''
            no_indent = 0

            if cdata.kind_of?( Array )

                if cdata[0].kind_of?( Hash )
                    @level += 1
                    rendered = @newline

                    cdata.each do |hash|
                        rendered += tag( hash )
                    end
                    @level -= 1
                else
                    str = ''
                    cdata.each do |scalar|
                        str += tag( 'tag' => tag, 'attr' => attr, 'cdata' => scalar )
                    end
                    return str
                end

            elsif cdata.kind_of?( Hash )
                @level += 1
                rendered = @newline + tag( cdata )
                @level -= 1

            else
                rendered = @encode ? @encoder.encode( cdata, @encodes ) : cdata
                no_indent = 1
            end

            return (@indent * @level)  \
                + '<' + tag + attr.to_s + '>'  \
                + rendered.to_s + ( no_indent == 1 ? '' : ( @indent * @level ) )  \
                + '</' + tag + '>' + @newline

        end