returns the version of the backed up plugin,
or null if there's no back up.
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;
        }
    }
514234
def version(self):
        
        if self.find:
            return self.meta.sp + split_package(self.find)[1]
        return ""
109849
public static String getArtifactoryPluginVersion() {
        String pluginsSortName = "artifactory";
        //Validates Jenkins existence because in some jobs the Jenkins instance is unreachable
        if (Jenkins.getInstance() != null
                && Jenkins.getInstance().getPlugin(pluginsSortName) != null
                && Jenkins.getInstance().getPlugin(pluginsSortName).getWrapper() != null) {
            return Jenkins.getInstance().getPlugin(pluginsSortName).getWrapper().getVersion();
        }
        return "";
    }
1361945
private String getVersion(boolean verbose) {
        try {
            InputStream stream = getClass().getResourceAsStream("/version.properties");
            Properties props = new Properties();
            props.load(stream);
            if (verbose) {
                return String.format("Version=%s, build date=%s",
                        props.getProperty("version"),
                        props.getProperty("buildDate"));
            } else {
                return props.getProperty("version");
            }
        } catch (IOException e) {
            log.error("Unable to retrieve version", e);
            return "unknown";
        }
    }
208385
def get_version(self):
        
        return Version.objects.get(
            content_type=self.content_type,
            object_id=self.object_id,
            version_number=self.publish_version,
        )
745170
private static Version extractVersion() {
		VersionInfo versionInfo = VersionInfo.getVersionInfo();
		String versionString = versionInfo.getVersion();
		String[] splits = versionString.split("\\.");
		int major = 0;
		int minor = 0;
		int patch = 0;
		int build = 0;
		try {
			major = Integer.parseInt(splits[0]);
			minor = Integer.parseInt(splits[1]);
			patch = Integer.parseInt(splits[2]);
			build = Integer.parseInt(splits[3]);
		} catch (Exception ignored) {

		}
		return new Version(major, minor, patch, build);
	}
405556
public static String getVersion() {
        if (version != null)
            return version;
        try (InputStream stream = CDK.class.getResourceAsStream(RESOURCE_LOCATION)) {
            if (stream == null) {
                // load from JAR (as packaged with maven)
                version = CDK.class.getPackage().getImplementationVersion();
            }
            Properties props = new Properties();
            props.load(stream);
            version = props.getProperty("version");
            return version;
        } catch (IOException exception) {
            // there is no back up
            logger.error("Error while loading the build.props file: ", exception.getMessage());
            logger.debug(exception);
        }
        return null;
    }
721393
function get_flash_version() {
    // ie
    try {
        try {
            // avoid fp6 minor version lookup issues
            // see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
            var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
            try {
                axo.AllowScriptAccess = 'always';
            } catch (e) {
                return '6,0,0';
            }
        } catch (e) {}
        return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
        // other browsers
    } catch (e) {
        try {
            if (navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
                return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1];
            }
        } catch (e) {}
    }
    return '0,0,0';
}
715780
public static String getBuildPluginVersion(AbstractWisdomMojo mojo, String plugin) {
        List<Plugin> plugins = mojo.project.getBuildPlugins();
        for (Plugin plug : plugins) {
            if (plug.getArtifactId().equals(plugin)) {
                return plug.getVersion();
            }
        }
        // Not found.
        return null;
    }
68717
function detectFlashVersion() {
  var playerVersion = null;

  var plugins = navigator.plugins;
  var mimeTypes = navigator.mimeTypes;

  var d = null;

  if (plugins && plugins['Shockwave Flash'] && mimeTypes &&
      mimeTypes['application/x-shockwave-flash'] &&
      mimeTypes['application/x-shockwave-flash'].enabledPlugin) {
    d = plugins['Shockwave Flash'].description;
    d = d.replace(/^.*\s+(\S+\s+\S+$)/, '$1');
    playerVersion = [0, 0, 0];
    playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, '$1'), 10);
    playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, '$1'), 10);
    playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, '$1'), 10) : 0;
  }
  else if (window.ActiveXObject) {
    try {
      var a = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
      if (a && (d = a.GetVariable('$version'))) {
        d = d.split(' ')[1].split(',');
        playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
      }
    }
    catch (e) {}
  }

  return playerVersion;
}
1064398
def version(self):
        

        if self._version != 'auto':
            return self._version

        if self._version == 'auto':
            try:
                data = self.execute_get('configuration/about/')
                self._version = data['configuration'][0]['version']
            except GhostException:
                return self.DEFAULT_VERSION

        return self._version
304752
def check_version(self, check, timeout=None, metadata=None,
                      credentials=None):
        """"""
        return self.stub.CheckVersion(check, timeout=timeout,
                                      metadata=metadata,
                                      credentials=credentials)
1359196
public @CheckForNull Plugin getPlugin() {
        PluginInstanceStore pis = Jenkins.lookup(PluginInstanceStore.class);
        return pis != null ? pis.store.get(this) : null;
    }
899686
protected String getVersion(String version) {
        return this.version == null || this.version.length() == 0
                ? version
                : this.version;
    }
28947
public function getVersion()
    {
        $returnValue = (string) '';

        if (!empty($this->version)){
        	$returnValue = $this->version;
        }

        return (string) $returnValue;
    }
468893
def get_version():
    """"""

    path = os.path.join(os.path.dirname(__file__), 'soupsieve')
    fp, pathname, desc = imp.find_module('__meta__', [path])
    try:
        meta = imp.load_module('__meta__', fp, pathname, desc)
        return meta.__version__, meta.__version_info__._get_dev_status()
    finally:
        fp.close()
896442
def get_version(self):
        """"""
        _, version = misc.get_version(self.confdir)
        if version is None:
            return "Can't get the version."
        else:
            return "cslbot - %s" % version