Check the taglet to see if it is a legacy taglet.  Also
check its name for errors.
347846
private void checkTaglet(Object taglet) {
        if (taglet instanceof Taglet) {
            checkTagName(((Taglet) taglet).getName());
        } else if (taglet instanceof com.sun.tools.doclets.Taglet) {
            com.sun.tools.doclets.Taglet legacyTaglet = (com.sun.tools.doclets.Taglet) taglet;
            customTags.remove(legacyTaglet.getName());
            customTags.put(legacyTaglet.getName(), new LegacyTaglet(legacyTaglet));
            checkTagName(legacyTaglet.getName());
        } else {
            throw new IllegalArgumentException("Given object is not a taglet.");
        }
    }
1166873
private boolean versionCheck(String title) {
        if (this.type != UpdateType.NO_VERSION_CHECK) {
            final String version = caller.getPluginVersion();
            final String remoteVersion = title; // Get the newest file's version number

            if (this.hasTag(version) || version.contains(remoteVersion)) {
                // We already have the latest version, or this build is tagged for no-update
                this.result = Updater.UpdateResult.NO_UPDATE;
                return false;
            }
        }
        return true;
    }
1058571
function checkBlockTag(blockTag) {
    if (blockTag == null) {
        return 'latest';
    }
    if (blockTag === 'earliest') {
        return '0x0';
    }
    if (blockTag === 'latest' || blockTag === 'pending') {
        return blockTag;
    }
    if (typeof (blockTag) === 'number') {
        return bytes_1.hexStripZeros(bytes_1.hexlify(blockTag));
    }
    if (bytes_1.isHexString(blockTag)) {
        return bytes_1.hexStripZeros(blockTag);
    }
    throw new Error('invalid blockTag');
}
1373079
private boolean isValidDoclet() {
        if (!getClass().getName().equals(TOOLKIT_DOCLET_NAME)) {
            configuration.message.error("doclet.Toolkit_Usage_Violation",
                TOOLKIT_DOCLET_NAME);
            return false;
        }
        return true;
    }
586439
public boolean containsTagHandler(String ns, String localName)
    {
        for (int i = 0; i < this.libraries.length; i++)
        {
            if (this.libraries[i].containsTagHandler(ns, localName))
            {
                return true;
            }
        }
        return false;
    }
1237526
def tag_is_directive?(tag_name)
      list = %w(attribute endgroup group macro method scope visibility)
      list.include?(tag_name)
    end
822835
def l_sa_check(template, literal, is_standalone):
    """"""

    # If there is a newline, or the previous tag was a standalone
    if literal.find('\n') != -1 or is_standalone:
        padding = literal.split('\n')[-1]

        # If all the characters since the last newline are spaces
        if padding.isspace() or padding == '':
            # Then the next tag could be a standalone
            return True
        else:
            # Otherwise it can't be
            return False
1094979
def check_format(cls, tags):
        
        common, _, _ = tags
        for tag in common:
            if tag.get_type() != 0:  # Unknown type -> incorrect
                return False
        return True
364932
boolean canContain(Tag parent, Tag child) {
    Validate.notNull(child);

    if (child.isBlock() && !parent.canContainBlock())
      return false;

    if (!child.isBlock() && parent.isData())
      return false;

    if (closingOptional.contains(parent.getName()) && parent.getName().equals(child.getName()))
      return false;

    if (parent.isEmpty() || parent.isData())
      return false;

    // head can only contain a few. if more than head in here, modify to have a list of valids
    // TODO: (could solve this with walk for ancestor)
    if (parent.getName().equals("head")) {
      if (headTags.contains(child.getName()))
        return true;
      else
        return false;
    }

    // dt and dd (in dl)
    if (parent.getName().equals("dt") && child.getName().equals("dd"))
      return false;
    if (parent.getName().equals("dd") && child.getName().equals("dt"))
      return false;

    return true;
  }
728795
function detect_doc(docs, customTags) {
    var ignore_tags = _.union(["param", "return", "author", "version", 
                               "cancelable", "bubbles", "since", "inherits", "todo", "deprecated"], customTags);
    var doc_tags = _.filter(docs, function(tag) { return !_.include(ignore_tags, tag["tagname"]) && !subproperty(tag) });
    return _.compact(_.map(doc_tags, function(tag) { return tag["doc"] })).join(" ");
}
832368
def r_sa_check(template, tag_type, is_standalone):
    """"""

    # Check right side if we might be a standalone
    if is_standalone and tag_type not in ['variable', 'no escape']:
        on_newline = template.split('\n', 1)

        # If the stuff to the right of us are spaces we're a standalone
        if on_newline[0].isspace() or not on_newline[0]:
            return True
        else:
            return False

    # If we're a tag can't be a standalone
    else:
        return False
857768
def valid(cls, data, context=None):
        """"""
        return cls(cls.TagType.VALID, data, context)
377056
public boolean isTagPresent(String tagName) {

        boolean tagPresent = false;

        if (mReadMethod != null) {
            tagPresent = mReadMethod.isTagPresent(tagName);
        }
        if (!tagPresent && mWriteMethod != null) {
            tagPresent = mWriteMethod.isTagPresent(tagName);
        }

        return tagPresent;
    }
115056
def check_tag_data(data):
    ""
    if len(data) < 10:
        raise ValueError("Tag too short")
    if data[0:3] != b"ID3":
        raise ValueError("Missing ID3 identifier")
    if data[3] >= 5 or data[4] != 0:
        raise ValueError("Unknown ID3 version")
    length = stagger.conversion.Syncsafe.decode(data[6:10]) + 10
    if len(data) != length:
        raise ValueError("Tag size mismatch")
1161069
def check(self, value, namespace):
        
        return namespace.is_compatible(self.typevar, type(value))
121155
function isItemTag (tagName, prefix, local, feedType) {
  return tagName === 'item' || tagName === 'entry'
    || (local === 'item' && (prefix === '' || feedType === 'rdf'))
    || (local === 'entry' && (prefix === '' || feedType === 'atom'));
}
1147855
private boolean isMavenVersionTag(GraphContext context, FileLocationModel model)
    {
        if (isMavenFile(context, model))
        {
            Document doc = ((XmlFileModel) model.getFile()).asDocument();
            for (Element elm : $(doc).find("version"))
            {
                String text = StringUtils.trim($(elm).text());
                if (StringUtils.equals(text, model.getSourceSnippit()))
                {
                    return true;
                }
            }
        }
        return false;
    }