This method retrieves the information stored in the jar manifest and uses
it to populate the implementation information to be returned to the user.

If the build level is not available in the manifest, the BuildInfo class
is used to get the value instead.
197709
private static void retrieveManifestData() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "retrieveManifestData");

        try {
            // Set up the defaults that will be overriden if possible.
            JmsMetaDataImpl.setProblemDefaults();

            Package thisPackage = Package.getPackage(packageName);
            if (thisPackage != null) {

                // This string will contain something like "IBM".
                String tempProv = thisPackage.getImplementationVendor();

                // Only set it if it is not null.
                if (tempProv != null) {
                    JmsMetaDataImpl.provName = tempProv;
                }

                // d336782 rework of build level processing
                //
                // The format for the implementation version will depend on how the jar containing
                // our package was built.
                // The builds of sib.api.jmsImpl.jar will contain something like this:
                // Implementation-Version: WASX.SIB [o0602.101]
                // Implementation-Vendor: IBM Corp.
                // However, the product is build into a larger package com.ibm.ws.sib.server.jar
                // with entries in the manifest like this:
                // Implementation-Version: 1.0.0
                // Implementation-Vendor: IBM Corp.
                //
                // We parse the implementation version and if it has the former format
                // we use that build level, otherwise we will use the build level
                // reported by the BuildInfo class.
                //
                // We will set provVersion to the whole build level string,
                // provMajorVersion to the 4 numbers before the dot (yyww - year and week)
                // and provMinorVersion to the two or three numbers after the dot
                // (build sequence)
                String version = thisPackage.getImplementationVersion();

                if (version != null) {

                    Matcher m = sibOldVersionPattern.matcher(version);

                    if (!(m.matches())) { // is there a valid build level in the version strng?
                        // NO. New format or some unknown format. Use BuildInfo class
                        version = "1.0.0";//BuildInfo.getBuildLevel(); //this will bever be used is the assumption -lohith  //lohith liberty change

                        m = sibBuildLevelPattern.matcher(version); // re-match for just the build level
                    }

                    if (m.matches()) { // check again
                        JmsMetaDataImpl.provVersion = m.group(1); // e.g. wwwdddd.ddd
                        try {
                            JmsMetaDataImpl.provMajorVersion = Integer.valueOf(m.group(2)).intValue();
                            JmsMetaDataImpl.provMinorVersion = Integer.valueOf(m.group(3)).intValue();
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                                SibTr.debug(tc, "provMajorVersion=" + JmsMetaDataImpl.provMajorVersion + "provMinorVersion=" + JmsMetaDataImpl.provMinorVersion);
                        } catch (RuntimeException e2) {
                            // No FFDC code needed
                            // This exception should never happen if the regex worked properly returning numbers for group 2 and 3
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                                SibTr.debug(tc, "Unable to convert major or minor version number from build level " + version + " to int", e2);
                        }
                    }
                    else {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                            SibTr.debug(tc, "Unable to find a valid build level in " + version);
                    }
                }

                else {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        SibTr.debug(tc, "Implementation version from manifest was null");
                }

            }
            else {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(tc, "The package was null - unable to retrieve information");
            } //if package not null

        } catch (RuntimeException e) {
            // No FFDC code needed
            FFDCFilter.processException(e, "com.ibm.ws.sib.api.jms.impl.JmsMetaDataImpl", "retrieveManifestData#1");
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "Error retrieving manifest information", e);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "retrieveManifestData");
    }
886551
public java.lang.String getInfoClass() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.infoClass);

    }
842915
public alluxio.grpc.UfsInfoOrBuilder getUfsInfoOrBuilder() {
    return ufsInfo_ == null ? alluxio.grpc.UfsInfo.getDefaultInstance() : ufsInfo_;
  }
1339687
public com.google.api.SourceInfo getSourceInfo() {
    return sourceInfo_ == null ? com.google.api.SourceInfo.getDefaultInstance() : sourceInfo_;
  }
429625
protected String getVersion() {

    Manifest manifest = ManifestLoader.loadManifest(getClass());
    String versionNumber = null;
    if (manifest != null) {
      versionNumber = ManifestLoader.getValue(manifest, Attributes.Name.IMPLEMENTATION_VERSION);
      if (versionNumber == null) {
        versionNumber = ManifestLoader.getValue(manifest, Attributes.Name.SPECIFICATION_VERSION);
      }
    }
    if (versionNumber == null) {
      versionNumber = SNAPSHOT;
    }
    return versionNumber;
  }
919527
@RequestMapping(value = "", method = RequestMethod.GET)
    public Resource<Info> info() {
        return Resource.of(
                infoService.getInfo(),
                uri(on(getClass()).info())
        )
                // API links
                .with("user", uri(on(UserController.class).getCurrentUser()))
                        // TODO Structure controller (--> projects, branches, etc.)
                        // Info message
                .with("_applicationInfo", uri(on(InfoController.class).applicationInfo()))
                ;
    }
610162
static Jar getJar(PathImpl backing)
  {
    if (_jarCache != null) {
      Jar jar = _jarCache.get(backing);

      return jar;
    }

    return null;
  }
531793
@Override
    public PackageInfoImpl getPackageInfo(String name) {
        return getClassInfoCache().getPackageInfo(name, ClassInfoCache.DO_NOT_FORCE_PACKAGE);
    }
1206092
public int getBuild() throws IllegalArgumentException {
		String build = properties.getProperty("build.number");
		if(build==null) throw new IllegalArgumentException(accessor.getMessage("PropertiesVersions.getVersion.buildNotFound"));
		return Integer.parseInt(build);
	}
440191
public Manifest getManifest()
    throws IOException
  {
    Manifest manifest;

    JarFile jarFile = getJarFile();

    try {
      if (jarFile == null)
        manifest = null;
      else
        manifest = jarFile.getManifest();
    } finally {
      closeJarFile(jarFile);
    }

    return manifest;
  }
1292503
def get_build_info(self):
        """"""
        # Retrieve build by revision
        if self.revision:
            th = treeherder.Treeherder(
                APPLICATIONS_TO_FTP_DIRECTORY.get(self.application, self.application),
                self.branch,
                self.platform)
            builds = th.query_builds_by_revision(
                self.revision, job_type_name='Build', debug_build=self.debug_build)

            if not builds:
                raise errors.NotFoundError('No builds have been found for revision', self.revision)

            # Extract timestamp from each build folder
            self.builds = [build.rsplit('/', 2)[1] for build in builds]
            self.show_matching_builds(self.builds)

            # There is only a single build
            self.build_index = 0
            self.logger.info('Selected build: %s' % self.builds[self.build_index])

            return

        # Internally we access builds via index
        if self.build_number is not None:
            self.build_index = int(self.build_number) - 1
        else:
            self.build_index = None

        if self.date is not None:
            try:
                # date is provided in the format 2013-07-23
                self.date = datetime.strptime(self.date, '%Y-%m-%d')
            except Exception:
                try:
                    # date is provided as a unix timestamp
                    datetime.fromtimestamp(float(self.date))
                    self.timestamp = self.date
                except Exception:
                    raise ValueError('%s is not a valid date' % self.date)

        # For localized builds we do not have to retrieve the list of builds
        # because only the last build is available
        if not self.locale_build:
            self.builds, self.build_index = self.get_build_info_for_index(
                self.build_index)
            # Always force a timestamp prefix in the filename
            self.timestamp = self.builds[self.build_index]
476257
def get_build_info(api_instance, build_id=None,
                   keys=DEFAULT_BUILD_KEYS, wait=False):
    
    build = (api_instance.get_build(build_id) if build_id
             else api_instance.get_last_build())
    output = ""

    if wait:
        build.block_until_complete()

    if 'timestamp' in keys:
        output += str(build.get_timestamp()) + '\n'

    if 'console' in keys:
        output += build.get_console() + '\n'

    if 'scm' in keys:
        # https://github.com/salimfadhley/jenkinsapi/pull/250
        # try/except while this is still occuring
        try:
            output += build.get_revision() + '\n'
        except IndexError:
            pass

    return output
467318
public static String fromClassPath() {
        Set<String> versions = new HashSet<>();
        try {
            ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
            Enumeration<URL> manifests = classLoader.getResources("META-INF/MANIFEST.MF");

            while (manifests.hasMoreElements()) {
                URL manifestURL = manifests.nextElement();
                try (InputStream is = manifestURL.openStream()) {
                    Manifest manifest = new Manifest();
                    manifest.read(is);

                    Attributes buildInfo = manifest.getAttributes("Build-Info");
                    if (buildInfo != null) {
                        if (buildInfo.getValue("Selenium-Version") != null) {
                            versions.add(buildInfo.getValue("Selenium-Version"));
                        } else {
                            // might be in build-info part
                            if (manifest.getEntries() != null) {
                                if (manifest.getEntries().containsKey("Build-Info")) {
                                    final Attributes attributes = manifest.getEntries().get("Build-Info");

                                    if (attributes.getValue("Selenium-Version") != null) {
                                        versions.add(attributes.getValue("Selenium-Version"));
                                    }
                                }
                            }
                        }
                    }
                }
            }
        } catch (Exception e) {
            logger.log(Level.WARNING,
                "Exception {0} occurred while resolving selenium version and latest image is going to be used.",
                e.getMessage());
            return SELENIUM_VERSION;
        }

        if (versions.isEmpty()) {
            logger.log(Level.INFO, "No version of Selenium found in classpath. Using latest image.");
            return SELENIUM_VERSION;
        }

        String foundVersion = versions.iterator().next();
        if (versions.size() > 1) {
            logger.log(Level.WARNING, "Multiple versions of Selenium found in classpath. Using the first one found {0}.",
                foundVersion);
        }

        return foundVersion;
    }
858649
public final Method getMetaInfo() {
		for(Class<?> c=getClass(); c != null; c=c.getSuperclass()) {
			Method a = c.getAnnotation(Method.class);
			if(a != null) {
				return a;
			}
		}
		
		throw new IllegalArgumentException("Neither "+getClass()+" nor its superclasses are annotated with "+Method.class);
	}
772208
public ResourceInformationBuilder getResourceInformationBuilder() {
		CombinedResourceInformationBuilder resourceInformationBuilder = new CombinedResourceInformationBuilder(aggregatedModule.getResourceInformationBuilders());
		DefaultResourceInformationBuilderContext context = new DefaultResourceInformationBuilderContext(resourceInformationBuilder, typeParser);
		resourceInformationBuilder.init(context);
		return resourceInformationBuilder;
	}
342184
public BeanInfo getBeanInfo() {
        if (mBeanInfo == null) {
            try { 
                mBeanInfo = getTeaToolsUtils().getBeanInfo(mType);
            }
            catch (Exception e) {
                return null;
            }
        }

        return mBeanInfo;
    }
1058908
def get_manifest(self):
        """"""
        logger.debug("Getting manifest")
        text = self.get_text(self.get_manifest_key())
        return json.loads(text)