What is the version the upgrade wizard has run the last time and upgraded to?.
If {@link #getUpdateStateFile()} is missing, presumes the baseline is 1.0
@return Current baseline. {@code null} if it cannot be retrieved.
763578
@Restricted(NoExternalUse.class)
    @CheckForNull
    public VersionNumber getCurrentLevel() {
        VersionNumber from = new VersionNumber("1.0");
        File state = getUpdateStateFile();
        if (state.exists()) {
            try {
                from = new VersionNumber(defaultIfBlank(readFileToString(state), "1.0").trim());
            } catch (IOException ex) {
                LOGGER.log(Level.SEVERE, "Cannot read the current version file", ex);
                return null;
            }
        }
        return from;
    }
970724
static String getVersionForFile(final File file)  {
        try {
            final PluginMeta pluginMeta = loadMeta(file);
            return pluginMeta.getVersion();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
1220430
public VersionComparator getSchemaVersion() {
        PreparedStatement statement = null;
        ResultSet results = null;
        try {
            statement = connection.prepareStatement("SELECT \"VERSION\" FROM \"SCHEMAVERSION\"");
            results = statement.executeQuery();

            if (results.next()) {
                return new VersionComparator(results.getString(1));
            }
        } catch (SQLException e) {
            // throw it away
        } finally {
            DbUtil.close(results);
            DbUtil.close(statement);
            //DbUtil.close(connection); // do not close connection
        }
        return null;
    }
533971
public static String getVersion()
  {
    String rev = getBuildRevision();
    Date date = getBuildDate();
    StringBuilder result = new StringBuilder();

    result.append(getReleaseName());
    if (!"".equals(rev) || date != null)
    {
      result.append(" (");

      boolean added = false;
      if (!"".equals(rev))
      {
        result.append("rev. ");
        result.append(rev);
        added = true;
      }
      if (date != null)
      {
        result.append(added ? ", built " : "");

        SimpleDateFormat d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        result.append(d.format(date));
      }

      result.append(")");
    }

    return result.toString();
  }
1267279
private static String getVersionFromPom() {

        final String absolutePath = new File(BuildVersion.class.getResource(BuildVersion.class
                .getSimpleName() + ".class").getPath())
                .getParentFile().getParentFile().getParentFile().getParentFile().getParentFile()
                .getParentFile().getParentFile().getAbsolutePath();

        final File file = new File(absolutePath + "/pom.xml");

        try (InputStreamReader reader = new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)) {

            final MavenXpp3Reader xpp3Reader = new MavenXpp3Reader();
            Model model = xpp3Reader.read(reader);
            return model.getVersion();

        } catch (NoClassDefFoundError e) {
            // if you want to get the version possibly in development add in to your pom
            // pax-url-aether.jar
            return null;
        } catch (Exception e) {
            return null;
        }
    }
587209
public String getBackupVersion() {
        try {
            try (JarFile backupWar = new JarFile(new File(Lifecycle.get().getHudsonWar() + ".bak"))) {
                Attributes attrs = backupWar.getManifest().getMainAttributes();
                String v = attrs.getValue("Jenkins-Version");
                if (v == null)   v = attrs.getValue("Hudson-Version");
                return v;
            }
        } catch (IOException e) {
            LOGGER.log(Level.WARNING, "Failed to read backup version ", e);
            return null;}

    }
309141
public Versioned<E> next() {
        if(!hasNext())
            throw new NoSuchElementException();

        Versioned<VListNode<E>> tmpNode = _nextNode;
        VListNode<E> tmpNodeValue = _nextNode.getValue();
        _lastId = tmpNodeValue.getId();
        _lastCall = LastCall.NEXT;

        if(tmpNodeValue.getNextId() != VStack.NULL_ID) {
            _nextNode = _stack.getListNode(tmpNodeValue.getNextId());
        } else {
            _nextNode = null;
        }

        _previousNode = tmpNode;
        _isPreviousSet = true;

        return new Versioned<E>(tmpNodeValue.getValue(), tmpNode.getVersion());
    }
172047
@Exported
    public String getBackupVersion() {
        File backup = getBackupFile();
        if (backup.exists()) {
            try {
                try (JarFile backupPlugin = new JarFile(backup)) {
                    return backupPlugin.getManifest().getMainAttributes().getValue("Plugin-Version");
                }
            } catch (IOException e) {
                LOGGER.log(WARNING, "Failed to get backup version from " + backup, e);
                return null;
            }
        } else {
            return null;
        }
    }
646819
@Override
    public DBObject getUpdateClause() {
        if (clear) {
            // If new items were added, they'll be placed on the updateList.  Either way We use $set to ensure old
            // values are removed from the underlying store.
            BasicDBList updateList = new BasicDBList();
            updateList.addAll(updates);

            return new BasicDBObject($set.name(), new BasicDBObject(getNameFromPrefix(),  updateList));
        } else {
            if (updates.isEmpty()) {
                return new BasicDBObject();     // If there are no updates, return an empty DBObject
            } else {
                BasicDBList updateList = new BasicDBList();
                updateList.addAll(updates);
                
                if (operation.equals($addToSet)) {
                    return new BasicDBObject($addToSet.name(), new BasicDBObject(getNameFromPrefix(), new BasicDBObject(EACH, updateList)));
                } else {
                    return new BasicDBObject(operation.name(), new BasicDBObject(getNameFromPrefix(), updateList));
                }
            }
        }
    }
86035
public function getUpdated()
    {
        return $this->getCachedProperty(
            'updated',
            function () {
                $element = $this->query('atom:updated', Node::SINGLE | Node::REQUIRED);

                /** @var Element $this */
                return $this->getExtensions()->parseElement($this, $element);
            }
        );
    }
1322064
public boolean needUpdate() {

        String pool = "default";

        double currentVersion = 8.5;
        m_detectedVersion = 8.5;

        CmsSetupDb setupDb = new CmsSetupDb(null);

        try {
            setupDb.setConnection(
                getDbDriver(pool),
                getDbUrl(pool),
                getDbParams(pool),
                getDbUser(pool),
                m_dbPools.get(pool).get("pwd"));

            if (!setupDb.hasTableOrColumn("CMS_USERS", "USER_OU")) {
                m_detectedVersion = 6;
            } else if (!setupDb.hasTableOrColumn("CMS_ONLINE_URLNAME_MAPPINGS", null)) {
                m_detectedVersion = 7;
            } else if (!setupDb.hasTableOrColumn("CMS_USER_PUBLISH_LIST", null)) {
                m_detectedVersion = 8;
            }
        } finally {
            setupDb.closeConnection();
        }

        return currentVersion != m_detectedVersion;
    }
776278
public function getUpdatedAt() : ?string 
    {
        if ( ! $this->hasUpdatedAt()) {
            $this->setUpdatedAt($this->getDefaultUpdatedAt());
        }
        return $this->updatedAt;
    }
1140547
@Override
    public VersionInfo getVersion() {
        int version = tailoring.version;
        int rtVersion = VersionInfo.UCOL_RUNTIME_VERSION.getMajor();
        return VersionInfo.getInstance(
                (version >>> 24) + (rtVersion << 4) + (rtVersion >> 4),
                ((version >> 16) & 0xff), ((version >> 8) & 0xff), (version & 0xff));
    }
339367
protected String getVersion() throws IOException {
        InputStream stream = null;
        try {
            Properties version = new Properties();
            stream = Cob2XsdMain.class.getResourceAsStream(VERSION_FILE_NAME);
            version.load(stream);
            return version.getProperty("version");
        } finally {
            if (stream != null) {
                stream.close();
            }
        }
    }
187559
@Override
	public String getBrowserVersion() {
		if (wd != null) {
			Capabilities capabilities = ((HasCapabilities) wd)
					.getCapabilities();
			if (capabilities != null) {
				return capabilities.getVersion();
			}
			return null;
		}
		return null;
	}
423804
public Versioned<E> previous() {
        if(hasPrevious()) {
            E resultValue = _previousNode.getValue().getValue();
            _lastId = _previousNode.getValue().getId();
            _lastCall = LastCall.PREVIOUS;
            _nextNode = _previousNode;
            _isNextSet = true;
            _isPreviousSet = false;
            return new Versioned<E>(resultValue, _previousNode.getVersion());
        } else {
            throw new NoSuchElementException();
        }
    }
797559
public static int getVersionAsInteger() {
        StringTokenizer stk = new StringTokenizer(revNumber);
        String release = null;
        for (int i=0 ; stk.hasMoreTokens() ; i++) {
            String s = stk.nextToken();
            if (i==1) {
                release = s;
                break;
            }
        }
        stk = new StringTokenizer(release, ".");
        release = "";
        while (stk.hasMoreTokens()) {
            release += stk.nextToken();
        }
        int version = 0;
        try {
            version = Integer.parseInt(release);
        } catch (NumberFormatException e) {
            //
        }
        return version;
    }