httl.properties: compile.version=1.7
764511
public void setCompileVersion(String version) {
        if (version == null || ClassUtils.isBeforeJava6(version)) {
            JavassistCompiler javassistCompiler = new JavassistCompiler();
            javassistCompiler.setLogger(logger);
            javassistCompiler.setCodeDirectory(codeDirectory);
            compiler = javassistCompiler;
        } else {
            JdkCompiler jdkCompiler = new JdkCompiler();
            jdkCompiler.setCompileVersion(version);
            jdkCompiler.setLogger(logger);
            jdkCompiler.setCodeDirectory(codeDirectory);
            compiler = jdkCompiler;
        }
    }
790228
protected void mvnSetVersions(final String version) throws MojoFailureException, CommandLineException {
        getLog().info("Updating version(s) to '" + version + "'.");

        String newVersion = "-DnewVersion=" + version;
        String g = "";
        String a = "";
        if (versionsForceUpdate) {
            g = "-DgroupId=";
            a = "-DartifactId=";
        }

        if (tychoBuild) {
            String prop = "";
            if (StringUtils.isNotBlank(versionProperty)) {
                prop = "-Dproperties=" + versionProperty;
                getLog().info("Updating property '" + versionProperty + "' to '" + version + "'.");
            }

            executeMvnCommand(TYCHO_VERSIONS_PLUGIN_SET_GOAL, prop, newVersion, "-Dtycho.mode=maven");
        } else {
            if (!skipUpdateVersion) {
                executeMvnCommand(VERSIONS_MAVEN_PLUGIN_SET_GOAL, g, a, newVersion, "-DgenerateBackupPoms=false");
            }

            if (StringUtils.isNotBlank(versionProperty)) {
                getLog().info("Updating property '" + versionProperty + "' to '" + version + "'.");

                executeMvnCommand(VERSIONS_MAVEN_PLUGIN_SET_PROPERTY_GOAL, newVersion, "-Dproperty=" + versionProperty,
                        "-DgenerateBackupPoms=false");
            }
        }
    }
515661
public static boolean isCompatibleSARLLibraryVersion(String version) {
		if (version != null) {
			final Version currentVersion = Version.parseVersion(SARLVersion.SPECIFICATION_RELEASE_VERSION_STRING);
			final Version paramVersion = Version.parseVersion(version);
			return currentVersion.getMajor() == paramVersion.getMajor()
					&& currentVersion.getMinor() == paramVersion.getMinor();
		}
		return false;
	}
1208130
public static void setHTTPVersion(Stub stub, boolean http10) {
        stub._setProperty(MessageContext.HTTP_TRANSPORT_VERSION,
                          (http10)
                          ? HTTPConstants.HEADER_PROTOCOL_V10
                          : HTTPConstants.HEADER_PROTOCOL_V11);
    }
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()));
                    }
                }
            }
        }
769473
public void setJavaSourceVersion(String version) {
		final JavaVersion javaVersion = JavaVersion.fromQualifier(version);
		if (javaVersion == null) {
			final List<String> qualifiers = new ArrayList<>();
			for (final JavaVersion vers : JavaVersion.values()) {
				qualifiers.addAll(vers.getAllQualifiers());
			}

			throw new RuntimeException(MessageFormat.format(
					Messages.SarlBatchCompiler_0, version, Joiner.on(Messages.SarlBatchCompiler_1).join(qualifiers)));
		}
		getGeneratorConfig().setJavaSourceVersion(javaVersion);
	}
723945
def version():
    '''
    
    '''
    cmd = ['varnishd', '-V']
    out = __salt__['cmd.run'](cmd, python_shell=False)
    ret = re.search(r'\(varnish-([^\)]+)\)', out).group(1)
    return ret
333949
function _stripOldVersionInfo(versionInfo, buildNumber) {
        // Do a simple linear search. Since we are going in reverse-chronological order, we
        // should get through the search quickly.
        var lastIndex = 0;
        var len = versionInfo.length;
        var versionEntry;
        var validBuildEntries;

        while (lastIndex < len) {
            versionEntry = versionInfo[lastIndex];
            if (versionEntry.buildNumber <= buildNumber) {
                break;
            }
            lastIndex++;
        }

        if (lastIndex > 0) {
            // Filter recent update entries based on applicability to current platform
            validBuildEntries = versionInfo.slice(0, lastIndex).filter(_checkBuildApplicability);
        }

        return validBuildEntries;
    }
1338451
static int getMajorJavaVersion(String javaVersion) {
    int version = parseDotted(javaVersion);
    if (version == -1) {
      version = extractBeginningInt(javaVersion);
    }
    if (version == -1) {
      return 6;  // Choose minimum supported JDK version as default
    }
    return version;
  }
381852
def update_property(old, new):
    """"""
    update_generic(old.fdel, new.fdel)
    update_generic(old.fget, new.fget)
    update_generic(old.fset, new.fset)
202359
public static boolean isVersionPre12(Configuration cfg) {
      String version = cfg.version().toString();
      return Objects.equals(version, "1.0") || Objects.equals(version, "1.1");
   }
28697
public static boolean isAtLeastVersion(String required) {
        String hibernateVersion = Hibernate.class.getPackage().getImplementationVersion();
        if (hibernateVersion != null) {
            return GrailsVersion.isAtLeast(hibernateVersion, required);
        } else {
            return false;
        }
    }
852961
private static void validatePackageVersion(List<Package> packages) {
        final String exceptions = ".*\\b(oracle|tibco|demo|hub)\\b.*";
        String version = ApplicationContext.getMdwVersion();
        String mdwVersion = version.split("\\-")[0];

        List<Package> filteredPackages = packages.stream()
                .filter(e -> !mdwVersion.equals(e.getVersionString())
                        && e.getName().startsWith("com.centurylink.mdw")
                        && !e.getName().startsWith("com.centurylink.mdw.central"))
                .collect(Collectors.toList());
        List<Package> obsoletePackages = filteredPackages.stream()
                .filter(p2 -> !(p2.getName().matches(exceptions)))
                .collect(Collectors.toList());

        if (!obsoletePackages.isEmpty()){
            StringBuilder message=new StringBuilder();
            message.append( "\n****************************************\n"
                    + "** WARNING: These asset packages do not match current build version " + mdwVersion + "\n");
            for (Package p1 : obsoletePackages) {
                message.append("**   "+p1.getLabel()+"\n");
            }
            message.append("******************************************\n");
            logger.warn(message.toString());
        }
    }
1011491
def check_specifier(dist, attr, value):
    """"""
    try:
        packaging.specifiers.SpecifierSet(value)
    except packaging.specifiers.InvalidSpecifier as error:
        tmpl = (
            "{attr!r} must be a string "
            "containing valid version specifiers; {error}"
        )
        raise DistutilsSetupError(tmpl.format(attr=attr, error=error))
261553
private String extractNumericVersion(Collection<String> versionStrings) {
        if (versionStrings == null) {
            return "";
        }
        for (String value : versionStrings) {
            String releaseValue = calculateReleaseVersion(value);
            if (!releaseValue.equals(value)) {
                return releaseValue;
            }
        }
        return "";
    }
652966
def version():
    '''
    
    '''
    ret = _client_wrapper('version')
    version_re = re.compile(VERSION_RE)
    if 'Version' in ret:
        match = version_re.match(six.text_type(ret['Version']))
        if match:
            ret['VersionInfo'] = tuple(
                [int(x) for x in match.group(1).split('.')]
            )
    if 'ApiVersion' in ret:
        match = version_re.match(six.text_type(ret['ApiVersion']))
        if match:
            ret['ApiVersionInfo'] = tuple(
                [int(x) for x in match.group(1).split('.')]
            )
    return ret
43521
public FessMessages addErrorsUnknownVersionForUpgrade(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_unknown_version_for_upgrade));
        return this;
    }