Checks if tool jar is newer than JUnit jar. If tool jar is newer, return
true; false otherwise.
511654
public static boolean isSecondNewerThanFirst(File first, File second) {
        boolean isSecondNewerThanFirst = false;
        // If file does not exist, it cannot be newer.
        if (second.exists()) {
            long firstLastModified = first.lastModified();
            long secondLastModified = second.lastModified();
            // 0L is returned if there was any error, so we check if both last
            // modification stamps are != 0L.
            if (firstLastModified != 0L && secondLastModified != 0L) {
                isSecondNewerThanFirst = secondLastModified > firstLastModified;
            }
        }
        return isSecondNewerThanFirst;
    }
1309070
def is_outdated(self):
        """"""
        if self.args.disable_check_update:
            # Check is disabled by configuration
            return False

        logger.debug("Check Glances version (installed: {} / latest: {})".format(self.installed_version(), self.latest_version()))
        return LooseVersion(self.latest_version()) > LooseVersion(self.installed_version())
104888
public static boolean isWebjar(Extension extension)
    {
        // Ideally webjar extensions should have "webjar" type
        if (extension.getType().equals(WEBJAR)) {
            return true;
        }

        ///////////////////////////////
        // But it's not the case for:

        // ** webjar.org releases (i.e. most of the webjars). We assume "org.webjars:*" id means it's a webjar
        if (StringUtils.startsWithAny(extension.getId().getId(), "org.webjars:", "org.webjars.")) {
            return true;
        }
        // ** contrib extensions which support version of XWiki older than 9.0RC1. We support a custom property which
        // does not have any effect on older versions of XWiki
        if (JarExtensionHandler.WEBJAR.equals(extension.getProperty(JarExtensionHandler.PROPERTY_TYPE))) {
            return true;
        }

        return false;
    }
1169108
def verify_helper_is_current
      return if Snapshot.config[:skip_helper_version_check]
      current_version = version_of_bundled_helper
      UI.verbose("Checking that helper files contain #{current_version}")

      helper_files = Update.find_helper
      if helper_files.empty?
        UI.error("Your Snapshot Helper file is missing, please place a copy")
        UI.error("in your project directory")
        UI.message("More information about Snapshot setup can be found here:")
        UI.message("https://docs.fastlane.tools/actions/snapshot/#quick-start")
        UI.user_error!("Please add a Snapshot Helper file to your project")
        return
      end

      helper_files.each do |path|
        content = File.read(path)

        unless content.include?(current_version)
          UI.error("Your '#{path}' is outdated, please run `fastlane snapshot update`")
          UI.error("to update your Helper file")
          UI.user_error!("Please update your Snapshot Helper file using `fastlane snapshot update`")
        end
      end
    end
139100
public boolean isGreaterOrEqual(String version) {
        JenkinsVersion create = create(version);
        return this.cv.compareTo(create.cv) >= 0;
    }
1068487
def is_newer_than(pth1, pth2):
    

    return not os.path.exists(pth1) or not os.path.exists(pth2) or \
       os.stat(pth1).st_mtime > os.stat(pth2).st_mtime
791846
def version_jar(self):
		
		cmd = config.get_command('java')
		cmd.append('-jar')
		cmd += self.cmd
		self.version(cmd=cmd, path=self.cmd[0])
717901
private static boolean hasJUnitAttr(MethodSymbol methodSym) {
    return methodSym.getRawAttributes().stream()
        .anyMatch(attr -> attr.type.tsym.getQualifiedName().toString().startsWith("org.junit."));
  }
1001874
public boolean isShowUpgradeWizard() {
        HttpSession session = Stapler.getCurrentRequest().getSession(false);
        if(session != null) {
            return Boolean.TRUE.equals(session.getAttribute(SHOW_UPGRADE_WIZARD_FLAG));
        }
        return false;
    }
1231346
private boolean isJarFile(URL resourceLocation) {

    String resourceLocationString = resourceLocation.toExternalForm();

    return resourceLocationString.startsWith("jar:file:") || resourceLocationString.contains(".jar!");
  }
1339208
protected void checkJAXPVersion(Hashtable h)
  {

    if (null == h)
      h = new Hashtable();

    final Class noArgs[] = new Class[0];
    Class clazz = null;

    try
    {
      final String JAXP1_CLASS = "javax.xml.parsers.DocumentBuilder";
      final String JAXP11_METHOD = "getDOMImplementation";

      clazz = ObjectFactory.findProviderClass(
        JAXP1_CLASS, ObjectFactory.findClassLoader(), true);

      Method method = clazz.getMethod(JAXP11_METHOD, noArgs);

      // If we succeeded, we at least have JAXP 1.1 available
      h.put(VERSION + "JAXP", "1.1 or higher");
    }
    catch (Exception e)
    {
      if (null != clazz)
      {

        // We must have found the class itself, just not the 
        //  method, so we (probably) have JAXP 1.0.1
        h.put(ERROR + VERSION + "JAXP", "1.0.1");
        h.put(ERROR, ERROR_FOUND);
      }
      else
      {
        // We couldn't even find the class, and don't have 
        //  any JAXP support at all, or only have the 
        //  transform half of it
        h.put(ERROR + VERSION + "JAXP", CLASS_NOTPRESENT);
        h.put(ERROR, ERROR_FOUND);
      }
    }
  }
685269
public static boolean isCompatibleJREVersion(String version) {
		if (version != null && !version.isEmpty()) {
			final Version current = Version.parseVersion(version);
			if (current != null) {
				final Version minJdk = Version.parseVersion(SARLVersion.MINIMAL_JDK_VERSION);
				assert minJdk != null;
				if (current.compareTo(minJdk) >= 0) {
					final Version maxJdk = Version.parseVersion(SARLVersion.MAXIMAL_JDK_VERSION);
					assert maxJdk != null;
					return current.compareTo(maxJdk) <= 0;
				}
			}
		}
		return false;
	}
371691
@GET
  @Path("/check")
  @Produces(APPLICATION_JSON)
  @Timed
  @ExceptionMetered
  public VersionCheckResponse versionCheck(
      @QueryParam("client") @DefaultValue("") final String client) {
    final PomVersion serverVersion = PomVersion.parse(Version.POM_VERSION);
    final VersionCompatibility.Status status;

    if (isNullOrEmpty(client)) {
      return new VersionCheckResponse(VersionCompatibility.Status.MISSING,
          serverVersion, Version.RECOMMENDED_VERSION);
    }

    final PomVersion clientVersion = PomVersion.parse(client);
    status = VersionCompatibility.getStatus(serverVersion, clientVersion);
    return new VersionCheckResponse(status, serverVersion, Version.RECOMMENDED_VERSION);
  }
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;
    }
76269
protected boolean hasValidVersionSpecified( EnforcerRuleHelper helper, Plugin source, List<PluginWrapper> pluginWrappers )
    {
        boolean found = false;
        boolean status = false;
        for ( PluginWrapper plugin : pluginWrappers )
        {
            // find the matching plugin entry
            if ( source.getArtifactId().equals( plugin.getArtifactId() )
                && source.getGroupId().equals( plugin.getGroupId() ) )
            {
                found = true;
                // found the entry. now see if the version is specified
                String version = plugin.getVersion();
                try
                {
                    version = (String) helper.evaluate( version );
                }
                catch ( ExpressionEvaluationException e )
                {
                    return false;
                }

                if ( StringUtils.isNotEmpty( version ) && !StringUtils.isWhitespace( version ) )
                {

                    if ( banRelease && version.equals( "RELEASE" ) )
                    {
                        return false;
                    }

                    if ( banLatest && version.equals( "LATEST" ) )
                    {
                        return false;
                    }

                    if ( banSnapshots && isSnapshot( version ) )
                    {
                        return false;
                    }
                    // the version was specified and not
                    // banned. It's ok. Keep looking through the list to make
                    // sure it's not using a banned version somewhere else.

                    status = true;

                    if ( !banRelease && !banLatest && !banSnapshots )
                    {
                        // no need to keep looking
                        break;
                    }
                }
            }
        }
        if ( !found )
        {
            log.debug( "plugin " + source.getGroupId() + ":" + source.getArtifactId() + " not found" );
        }
        return status;
    }
1203766
private static boolean isJarURL(final URL rootDirResource) {

        final String protocol = rootDirResource.getProtocol();

        /**
         * Determine whether the given URL points to a resource in a jar file, that is, has protocol "jar", "zip",
         * "wsjar" or "code-source".
         * <p>
         * "zip" and "wsjar" are used by BEA WebLogic Server and IBM WebSphere, respectively, but can be treated like
         * jar files. The same applies to "code-source" URLs on Oracle OC4J, provided that the path contains a jar
         * separator.
         * *
         */
        return "jar".equals(protocol) || "zip".equals(protocol) || "wsjar".equals(protocol)
                || ("code-source".equals(protocol) && rootDirResource.getPath().contains(JAR_URL_SEPARATOR));

    }
319536
public static String jarVersion(JarFile jar) throws IOException {
		String version = jar.getManifest().getMainAttributes().getValue(Attributes.Name.IMPLEMENTATION_VERSION);
		
		if(version == null) {
			version = String.format("%d", System.currentTimeMillis());
		}
		return version;
	}