Checks the description version tag.

@param pIssue
the issue
@throws IssueParseException
the description version tag doesn't describe the expected version
{@link IssueDescriptionUtils#DESCRIPTION_VERSION}
779546
private void checkDescriptionVersion(final Issue pIssue) throws IssueParseException {

        final Matcher m = DESCRIPTION_VERSION_PATTERN.matcher(pIssue.getDescription());
        final int version;
        if (m.find()) {
            version = Integer.parseInt(m.group(1));
        } else {
            // default version is 1
            version = 1;
        }
        if (IssueDescriptionUtils.DESCRIPTION_VERSION != version) {
            throw new IssueParseException(String.format(
                    "Issue #%s has unsupported description: %d. Expected version %d ",
                    pIssue.getId(), version, IssueDescriptionUtils.DESCRIPTION_VERSION));
        }
    }
317241
private String getStacktraceMD5(final Issue pIssue) throws IssueParseException {

        final int stackCfId = ConfigurationManager.getInstance().CHILIPROJECT_STACKTRACE_MD5_CF_ID;
        final Predicate findStacktraceMD5 = new CustomFieldIdPredicate(stackCfId);
        final CustomField field = (CustomField) CollectionUtils.find(pIssue.getCustomFields(),
                findStacktraceMD5);
        if (null == field) {
            throw new IssueParseException(String.format(
                    "Issue %d doesn't contains a custom_field id=%d", pIssue.getId(), stackCfId));
        }
        return field.getValue();
    }
1357781
public static VersionInfoProperties versionInfoProperties(final String version, final String commit, final String urlTemplate) {
        final VersionInfoProperties p = new VersionInfoProperties();
        p.version = version;
        p.commit = commit;
        p.urlTemplate = urlTemplate;
        return p;
    }
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;
    }
1006545
private static boolean validateVersion(Context ctx, ChangeLog clog){

        // Get Preferences
        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
        int lastSeen = prefs.getInt(PREF_CHANGELOG_LAST_SEEN, -1);

        // Second sort versions by it's code
        int latest = Integer.MIN_VALUE;
        for(Version version: clog.versions){
            if(version.code > latest){
                latest = version.code;
            }
        }

        // Get applications current version
        if(latest > lastSeen){
            if(!BuildConfig.DEBUG) prefs.edit().putInt(PREF_CHANGELOG_LAST_SEEN, latest).apply();
            return true;
        }

        return false;
    }
1068788
public static boolean isCatalogVersionValid(String catalogVersionStr)
    {
        // Do we have a version string?
        if (catalogVersionStr == null || catalogVersionStr.isEmpty()) {
            return false;
        }

        //Check that it is a properly formed version string
        Object[] catalogVersion = MiscUtils.parseVersionString(catalogVersionStr);
        if (catalogVersion == null) {
            return false;
        }

        // It's valid.
        return true;
    }
1319245
public void doTag()
            throws JspException
    {
        if (hasErrors()) {
            reportErrors();
            return;
        }

        JspTag tag = SimpleTagSupport.findAncestorWithClass(this, IBehaviorConsumer.class);
        if (tag == null) {
            String s = Bundle.getString("Tags_BehaviorInvalidParent");
            registerTagError(s, null);
            reportErrors();
            return;
        }

        IBehaviorConsumer ac = (IBehaviorConsumer) tag;
        ac.setBehavior(_name, _value, _facet);
        return;
    }
1193344
public static void displayVersionInfo(String command) {

    String version = ProxyInitStrategy.class.getPackage()
      .getImplementationVersion();

    if (version == null) {
      version = "N/A";
    }

    System.out.format("%s v. %s (%s)\n", command, version,
      getAPIVersionString());
  }
1164748
def check_tag(version):
    

    output = run('git', 'tag', stdout=subprocess.PIPE).communicate()[0]
    tags = set(output.decode('utf-8').splitlines())

    if 'v{}'.format(version) in tags:
        error('version already exists')
235830
protected final long parseVersionAndFlags(ByteBuffer content) {
        version = IsoTypeReader.readUInt8(content);
        flags = IsoTypeReader.readUInt24(content);
        return 4;
    }
890887
public void checkVersion(String version) throws ConnectionException {
        MetaModel meta = createMetaModel();
        meta.getAssetType("Member");

        if ((version != null) && (version.length() > 0)
                && ((meta.getVersion() == null) || (meta.getVersion()
                .compareTo(new Version(version)) < 0))) {
            throw new ConnectionException(MessageFormat.format(
                    "VersionOne Release {0} or above is required (found {1}).",
                    version, meta.getVersion()));
        }
    }
514509
public static void doMetaCheckVersion(AdminClient adminClient) {
            Map<Properties, List<Integer>> versionsNodeMap = new HashMap<Properties, List<Integer>>();

            for(Integer nodeId: adminClient.getAdminClientCluster().getNodeIds()) {
                Versioned<Properties> versionedProp = doMetaGetVersionsForNode_ExitOnError(adminClient,
                                                                                           nodeId);
                Properties props = versionedProp.getValue();
                if(versionsNodeMap.containsKey(props) == false) {
                    versionsNodeMap.put(props, new ArrayList<Integer>());
                }
                versionsNodeMap.get(props).add(nodeId);
            }

            if(versionsNodeMap.keySet().size() <= 0) {
                System.err.println("No Versions found in the system store... something seriously wrong");
            } else if(versionsNodeMap.keySet().size() == 1) {
                System.err.println("All the nodes have the same metadata versions.");
                printProperties(versionsNodeMap.keySet().iterator().next());
            } else {
                System.err.println("Mismatching versions detected !!! . All are supposed to be written by the same client "
                                   + ""
                                   + " and hence they should exactly match but something different, let us analyze deeper ");
                Map<String, Map<String, List<Integer>>> propertyValueMap = new HashMap<String, Map<String, List<Integer>>>();
                for(Entry<Properties, List<Integer>> entry: versionsNodeMap.entrySet()) {
                    System.out.println("**************************** Node(s): "
                                       + Arrays.toString(entry.getValue().toArray())
                                       + " ****************************");
                    Properties props = entry.getKey();
                    printProperties(props);

                    for(String propName: props.stringPropertyNames()) {
                        String propValue = props.getProperty(propName);

                        if(propertyValueMap.containsKey(propName) == false) {
                            propertyValueMap.put(propName, new HashMap<String, List<Integer>>());
                        }
                        Map<String, List<Integer>> valuetoNodeMap = propertyValueMap.get(propName);
                        if(valuetoNodeMap.containsKey(propValue) == false) {
                            valuetoNodeMap.put(propValue, new ArrayList<Integer>());
                        }
                        valuetoNodeMap.get(propValue).addAll(entry.getValue());
                    }
                }
                
                System.out.println("########## Properties discrepancy report ########");
                for(Entry<String, Map<String, List<Integer>>> entry: propertyValueMap.entrySet()) {
                    Map<String, List<Integer>> valueToNodeMap = entry.getValue();
                    String propName = entry.getKey();
                    List<Integer> allNodeIds = new ArrayList<Integer>();
                    allNodeIds.addAll(adminClient.getAdminClientCluster().getNodeIds());
                    
                    List<Integer> nodesWithValues = new ArrayList<Integer>();
                    if(valueToNodeMap.size() != 1) {
                        System.out.println("Properties with multiple values");
                        for(Entry<String, List<Integer>> valueToNodeEntry: valueToNodeMap
                                                                              .entrySet()) {
                            String propValue = valueToNodeEntry.getKey();
                            nodesWithValues.addAll(valueToNodeEntry.getValue());
                            printProperty(propName, propValue, valueToNodeEntry.getValue());
                        }
                    } else  {
                        Map.Entry<String, List<Integer>> valueToNodeEntry = valueToNodeMap.entrySet()
                                                                                          .iterator()
                                                                                          .next();

                        nodesWithValues.addAll(valueToNodeEntry.getValue());
                        if(nodesWithValues.size() < allNodeIds.size()) {
                            String propValue = valueToNodeEntry.getKey();
                            printProperty(propName, propValue, valueToNodeEntry.getValue());
                        }
                    }

                    allNodeIds.removeAll(nodesWithValues);
                    if(allNodeIds.size() > 0) {
                        System.out.println("The Property " + propName + " is present in the nodes "
                                           + Arrays.toString(nodesWithValues.toArray())
                                           + " but missing from the nodes "
                                           + Arrays.toString(allNodeIds.toArray()));
                    }
                }
            }
        }
174268
function tagRelease(done) {
  fs.readFile(config.pkg, 'utf-8', (err, content) => {
    if (err) {
      done(err);
      return;
    }

    const pkg = JSON.parse(content);
    const version = pkg.version;
    git.tag(`v${version}`, `release: tag version ${version}`, done);
  });
}
1093733
public void setVersion(String version)
    {
        if (_state!=__MSG_EDITABLE)
            throw new IllegalStateException("Not EDITABLE");
        if (version.equalsIgnoreCase(__HTTP_1_1))
        {
            _dotVersion=1;
            _version=__HTTP_1_1;
        }
        else if (version.equalsIgnoreCase(__HTTP_1_0))
        {
            _dotVersion=0;
            _version=__HTTP_1_0;
        }
        else if (version.equalsIgnoreCase(__HTTP_0_9))
        {
            _dotVersion=-1;
            _version=__HTTP_0_9;
        }
        else
            throw new IllegalArgumentException("Unknown version");
    }
1022836
@Override
    public void setVersion(String version) {
        try {
            this.message.setVersion(version);
        } catch (UnsupportedProtocolVersionException e) {
            this.message.setVersion(VersionValues.V11);
        }
    }
530696
public static function validateTag($tag, AssetTypeInterface $assetType, VersionParser $parser = null)
    {
        if (\in_array($tag, array('master', 'trunk', 'default'), true)) {
            return false;
        }

        if (null === $parser) {
            $parser = new VersionParser();
        }

        try {
            $tag = $assetType->getVersionConverter()->convertVersion($tag);
            $tag = $parser->normalize($tag);
        } catch (\Exception $e) {
            $tag = false;
        }

        return $tag;
    }
921485
def validate_version(version)
      return if SemanticPuppet::Version.valid?(version)

      err = _("version string cannot be parsed as a valid Semantic Version")
      raise ArgumentError, _("Invalid 'version' field in metadata.json: %{err}") % { err: err }
    end