If one object path doesn't inlcude a host, don't include the hosts
        in the comparison
10373
def paths_equal(self, lhs, rhs):
        

        if lhs is rhs:
            return True
        if lhs.host is not None and rhs.host is not None and\
           lhs.host != rhs.host:
            return False
        # need to make sure this stays in sync with CIMInstanceName.__cmp__()
        return not (pywbem.cmpname(rhs.classname, lhs.classname) or
                    cmp(rhs.keybindings, lhs.keybindings) or
                    pywbem.cmpname(rhs.namespace, lhs.namespace))
201646
function findMissing(manifest, request, host, fn) {
  request
    .post(host + '/manifest/diff')
    .send({manifest: JSON.stringify(manifest)})
    .end(function(err, res) {
      if (err) return fn(err);
      if (res.error) return fn(res.error);
      fn(null, res.body);
    });
}
972494
def _do(name, fun, path=None):
    '''
    
    '''
    host = find_guest(name, quiet=True, path=path)
    if not host:
        return False

    client = salt.client.get_local_client(__opts__['conf_file'])
    cmd_ret = client.cmd_iter(
            host,
            'lxc.{0}'.format(fun),
            [name],
            kwarg={'path': path},
            timeout=60)
    data = next(cmd_ret)
    data = data.get(host, {}).get('ret', None)
    if data:
        data = {host: data}
    return data
1369505
def compare_path_strings(path1, path2, path_sep='/'):
    
    if len(path2) < len(path1):
        return 0
    if path1 == path2:
        return ISFILE
    else:
        p1_parts = path1.split(path_sep)
        p2_parts = path2.split(path_sep)
        if len(p2_parts) < len(p1_parts):
            return 0
        else:
            return compare_parts(p1_parts, p2_parts)
1030329
function filterPath(absPath) {
		var relPath = path.relative(launchFolder, absPath)
		var result = excludeList.every(checkExclusion)

		return result

		function checkExclusion(exclusion) { // true: keep the path
			return relPath.substring(0, exclusion.length) != exclusion
		}
	}
405495
def remove_exclusion(host_or_ip)
      asset = host_or_ip
      unless host_or_ip.respond_to?(:host) || host_or_ip.respond_to?(:from)
        # Attept to convert String to appropriate object.
        asset = HostOrIP.convert(host_or_ip)
      end
      @asset_exclusions = asset_exclusions.reject { |a| a.eql? asset }
    end
783423
def _get_host(name, array):
    ''''''
    host = None
    for temp in array.list_hosts():
        if temp['name'] == name:
            host = temp
            break
    return host
76209
static boolean objectHasDirectoryPath(String objectName) {
    return !Strings.isNullOrEmpty(objectName)
        && objectName.endsWith(GoogleCloudStorage.PATH_DELIMITER);
  }
894517
def ignore_path(path):
        
        ignore = False
        for name in ['.tox', 'dist', 'build', 'node_modules', 'htmlcov']:
            if path.find(name) >= 0:
                ignore = True
                break
        return ignore
311966
def _do_names(names, fun, path=None):
    '''
    
    '''
    ret = {}
    hosts = find_guests(names, path=path)
    if not hosts:
        return False

    client = salt.client.get_local_client(__opts__['conf_file'])
    for host, sub_names in six.iteritems(hosts):
        cmds = []
        for name in sub_names:
            cmds.append(client.cmd_iter(
                    host,
                    'lxc.{0}'.format(fun),
                    [name],
                    kwarg={'path': path},
                    timeout=60))
        for cmd in cmds:
            data = next(cmd)
            data = data.get(host, {}).get('ret', None)
            if data:
                ret.update({host: data})
    return ret
750527
def _exclude_paths_from_environ(env_prefix=''):
    """"""
    paths = os.environ.get(env_prefix + 'WSGI_AUTH_EXCLUDE_PATHS')
    if not paths:
        return []
    return paths.split(';')
1168935
def which(x):
    '''
    
    '''
    for p in os.environ.get('PATH').split(os.pathsep):
        p = os.path.join(p, x)
        if os.path.exists(p):
            return os.path.abspath(p)
    return None
240989
function isDirectoryExcluded(path) {
        var excludes = preferences.getExcludedDirectories();

        if (!excludes) {
            return false;
        }

        var testPath = ProjectManager.makeProjectRelativeIfPossible(path);
        testPath = FileUtils.stripTrailingSlash(testPath);

        return excludes.test(testPath);
    }
915534
def filter_host_by_regex(regex):
    
    host_re = re.compile(regex)

    def inner_filter(items):
        """Inner filter for host. Accept if regex match host_name"""
        host = items["host"]
        if host is None:
            return False
        return host_re.match(host.host_name) is not None

    return inner_filter
38741
def normalize_excludes(rootpath, excludes):
    """"""
    return [path.normpath(path.abspath(exclude)) for exclude in excludes]
911929
private String getMergedPath(String hostName, Path p, String objectKey) {
    if ((p.getParent() != null) && (p.getName() != null)
        && (p.getParent().toString().equals(hostName))) {
      if (objectKey.equals(p.getName())) {
        return p.toString();
      }
      return hostName + objectKey;
    }
    return hostName + objectKey;
  }
376038
@Override
  public int compareTo(@Nonnull ResourcePath other) {
    int cmp = this.getDatabaseName().getProject().compareTo(other.getDatabaseName().getProject());

    if (cmp != 0) {
      return cmp;
    }

    cmp = this.getDatabaseName().getDatabase().compareTo(other.getDatabaseName().getDatabase());

    if (cmp != 0) {
      return cmp;
    }

    return super.compareTo(other);
  }