Returns true if the first parameter is newer than the second
331995
public static boolean isNewer(HasMetadata newer, HasMetadata older) {
        long n1 = parseResourceVersion(newer);
        long n2 = parseResourceVersion(older);
        return n1 >= n2;
    }
1133500
def is_newer_b(a, bfiles):
    
    if isinstance(bfiles, basestring):
        bfiles = [bfiles]

    if not op.exists(a): return False
    if not all(op.exists(b) for b in bfiles): return False

    atime = os.stat(a).st_mtime # modification time
    for b in bfiles:
        # a has been modified since
        if atime > os.stat(b).st_mtime:
            return False
    return True
1323302
def _compare_by_version(path1, path2):
    
    if path1.source == path2.source:
        if path1.source_version_num > path2.source_version_num:
            return path1
        else:
            return path2
    return None
1250652
def _compare_recursive(old, new):
    
    if isinstance(new, dict):
        for key in six.iterkeys(new):
            try:
                if _compare_recursive(old[key], new[key]):
                    return True
            except (KeyError, TypeError):
                return True

    elif isinstance(new, list) or isinstance(new, tuple):
        for i, item in enumerate(new):
            try:
                if _compare_recursive(old[i], item):
                    return True
            except (IndexError, TypeError):
                return True
    else:
        return old != new

    return False
606743
def _compare(info1, info2):
    # type: (Info, Info) -> bool
    
    # Check filesize has changed
    if info1.size != info2.size:
        return True
    # Check modified dates
    date1 = info1.modified
    date2 = info2.modified
    return date1 is None or date2 is None or date1 > date2
940814
def func_old_args(a, b=None, *args):  # pylint: disable=invalid-name
    """"""

    # We extract a specific optional parameter from *args
    try:
        c = args[0]
    except IndexError:
        c = None

    return a, b, c
946497
def hasExpired(self):
        
        return (datetime.datetime.utcnow() - self.lastUpdateTime).total_seconds() > self.maxAgeSeconds
409346
private int compareParameter(Class<?> a, Class<?> b) {
        final int a_preferred = -1;
        if (a.equals(b)) {
            return  0;
        } else if (b.isAssignableFrom(a)) {
            // a is more specific
            return  a_preferred;
        } else if (a.isAssignableFrom(b)) {
            // b is more specific
            return -a_preferred;
        } else {
            return  0; // not compatible
        }
    }
792093
public static int compareMavenVersions(String v1, String v2) {
		return parseMavenVersion(v1).compareTo(parseMavenVersion(v2));
	}
480598
def _cmp_version(item1, item2):
    '''
    
    '''
    vers1 = _LooseVersion(item1)
    vers2 = _LooseVersion(item2)

    if vers1 < vers2:
        return -1
    if vers1 > vers2:
        return 1
    return 0
978806
def compare(ver1, ver2):
    ''''''
    if ver1 == ver2:
        return 0
    ver1 = _cut(ver1)
    ver2 = _cut(ver2)
    # magic multiplier
    m = 1
    # if the first one is shorter, replace them
    if len(ver1) < len(ver2):
        ver1, ver2 = ver2, ver1
        # and reverse magic multiplier
        m = -1
    # compare all items that both have
    for i, part in enumerate(ver2):
        if ver1[i] > ver2[i]:
            return m * 1
        if ver1[i] < ver2[i]:
            return m * -1
    # if the first "extra" item is not negative, it's bigger
    if ver1[len(ver2)] >= 0:
        return m * 1
    else:
        return m * -1
73027
function compare(a, b) {
    try {
        return semver.compare(a, b);
    } catch(err) {
        if(semver.valid(a)) {
            return 1
        }
        if(semver.valid(b)) {
            return -1;
        }
        return 0;
    }
}
1055144
def compare(self, first, second):
        
        if first.lower() == second.lower():
            return True
        else:
            return False
1155367
def oldest(self):
        
        if self._order_by == 'newest':
            return self.last
        if self._order_by == 'oldest':
            return self.first
        return min(self.entries, key=lambda x: (x.date, -x.id))
836236
def compare(self, previous_scopes):
        
        for scope in self.scopes:
            if scope not in previous_scopes:
                raise OAuthInvalidError(
                    error="invalid_scope",
                    explanation="Invalid scope parameter in request")

        return True
408485
private boolean isTimeAfterOrEquals(Calendar time1, Calendar time2) {
        return !(time1 == null || time2 == null) && time1.getTimeInMillis() >= time2.getTimeInMillis();
    }
671783
def only_newer(copy_func):
    
    @functools.wraps(copy_func)
    def wrapper(src, dst, *args, **kwargs):
        is_newer_dst = (
            dst.exists()
            and dst.getmtime() >= src.getmtime()
        )
        if is_newer_dst:
            return dst
        return copy_func(src, dst, *args, **kwargs)
    return wrapper