search, THEN the System or parent loader.
765457
@Override public synchronized Class loadClass( String name, boolean resolve ) throws ClassNotFoundException {
    assert !name.equals(Weaver.class.getName());
    Class z = loadClass2(name);      // Do all the work in here
    if( resolve ) resolveClass(z);   // Resolve here instead in the work method
    return z;
  }
1315368
private static ClassLoader getInitParent(ClassLoader parent,
                                           boolean isRoot)
  {
    if (parent == null)
      parent = Thread.currentThread().getContextClassLoader();

    if (isRoot || parent instanceof DynamicClassLoader)
      return parent;
    else {
      //return RootDynamicClassLoader.create(parent);
      return parent;
    }
  }
920282
private int search(int startLine, boolean backward) throws IOException {
        search = search.toLowerCase();
        try (Stream<String> stream = Files.lines(path)) {
            if (backward) {
                int idx = -1;
                if (startLine > 0)
                    idx = searchTo(startLine - 1, true);
                if (idx < 0)
                    idx = searchFrom(startLine, true);
                return idx;
            }
            else {
                int idx = searchFrom(startLine);
                if (idx < 0) {
                    // wrap search
                    idx = searchTo(startLine - 1);
                }
                return idx;
            }
        }
        catch (UncheckedIOException ex) {
            throw ex.getCause();
        }
    }
573266
def _find_file(self, load):
        '''
        
        '''
        path = load.get('path')
        if not path:
            return {'path': '',
                    'rel': ''}
        tgt_env = load.get('saltenv', 'base')
        return self.find_file(path, tgt_env)
721903
def find_packages(name, pkg_dir):
    """"""
    for c in (FileSystemPackageBuilder, ZipPackageBuilder, ExcelPackageBuilder):

        package_path, cache_path = c.make_package_path(pkg_dir, name)

        if package_path.exists():

            yield c.type_code, package_path, cache_path
1186499
def _load(self):
        """'"""
        # loop over system path
        if self._loaded:
            return
        icon_paths = ['/usr/local/share/meqtrees'] + sys.path
        for path in icon_paths:
            path = path or '.'
            # for each entry, try <entry>/icons/<appname>'
            for a, b in [('icons', self._appname), (self._appname, 'icons')]:
                trydir = os.path.join(path, a, b)
                _dprint(3, 'trying icon path', trydir)
                try:
                    files = os.listdir(trydir)
                except:
                    continue
                _dprint(3, len(files), 'entries in', trydir)
                # loop over all files
                nicons = 0
                for f in files:
                    (name, ext) = os.path.splitext(f);  # check extension
                    if ext in ('.png', '.xpm', '.gif'):
                        f = os.path.join(trydir, f)
                        try:
                            pm = QPixmap(f)
                        except:
                            _dprint(3, 'error loading icon', name, sys.exc_value())
                            continue
                        # register pixmap
                        self._pixmaps[name] = QPixmapWrapper(pm)
                        nicons += 1
                        _dprint(4, 'loaded icon', f)
                    else:
                        _dprint(4, 'ignoring entry', f)
                _dprint(1, nicons, 'icons loaded from ', trydir)
                self._loaded = True
973876
def _init_sys_auto_lookup(self):
        
        # TODO: Instead, check for executables for systemd and upstart
        # systemctl for systemd and initctl for upstart.
        # An alternative might be to check the second answer here:
        # http://unix.stackexchange.com/questions/196166/how-to-find-out-if-a-system-uses-sysv-upstart-or-systemd-initsystem
        # TODO: Move to each system's implementation
        init_systems = []
        if self._is_init_system_installed('/usr/lib/systemd'):
            init_systems.append('systemd')
        if self._is_init_system_installed('/usr/share/upstart'):
            init_systems.append('upstart')
        if self._is_init_system_installed('/etc/init.d'):
            init_systems.append('sysv')
        return init_systems
1083566
def find(name):
    """"""

    if op.exists(name):
        return name

    path = op.dirname(__file__) or '.'

    paths = [path] + config['include_path']

    for path in paths:
        filename = op.abspath(op.join(path, name))
        if op.exists(filename):
            return filename

        for d in os.listdir(path):
            fullpath = op.abspath(op.join(path, d))
            if op.isdir(fullpath):
                filename = op.abspath(op.join(fullpath, name))
                if op.exists(filename):
                    return filename

    return None
830098
def _find_adapter(registry, ob):
    """"""
    types = _always_object(inspect.getmro(getattr(ob, '__class__', type(ob))))
    for t in types:
        if t in registry:
            return registry[t]
497791
def cli_main():
    """"""
    SearchContext.commit()
    args = parser.parse_args()
    # open up a browser
    firefox_remote = Remote("http://127.0.0.1:4444/wd/hub", DesiredCapabilities.FIREFOX)
    with contextlib.closing(firefox_remote):
        context = SearchContext.from_instances([FastSearch(), Browser(firefox_remote)])
        search = Search(parent=context)

        if args.fast:
            with context.use(FastSearch, Browser):
                main(search, args.query)
        else:
            with context.use(Browser):
                main(search, args.query)
298235
def search(cls, args):
        """"""
        safe_shell_pat = re.escape(args['<pattern>']).replace(r'\*', '.*')
        pat_str = '.*{}.*'.format(safe_shell_pat)
        pattern = re.compile(pat_str, re.IGNORECASE)
        remote_json = NAppsManager.search(pattern)
        remote = set()
        for napp in remote_json:
            # WARNING: This will be changed in future versions, when 'author'
            # will be removed.
            username = napp.get('username', napp.get('author'))
            remote.add(((username, napp.get('name')), napp.get('description')))

        cls._print_napps(remote)
272837
def ls(system, user, local, include_missing):
    """"""

    # default action is to list *all* auto-detected files
    if not (system or user or local):
        system = user = local = True

    for path in get_configfile_paths(system=system, user=user, local=local,
                                     only_existing=not include_missing):
        click.echo(path)
1013973
private Object find(String name) {
		if (name == null)
			throw new NullPointerException("Dependency name cannot be null");
		if (_references == null)
			throw new NullPointerException("References shall be set");

		return _dependencies.get(name);
	}
519965
def go_to_parent_directory(self):
        """"""
        self.chdir(osp.abspath(osp.join(getcwd_or_home(), os.pardir)))
1163669
def _search(self, base, fltr, attrs=None, scope=ldap.SCOPE_SUBTREE):
        """"""
        try:
            results = self._conn.search_s(base, scope, fltr, attrs)
        except Exception as e:
            log.exception(self._get_ldap_msg(e))
            results = False
        return results
930554
def find(self):
        """"""
        options = self.find_options.get_options()
        if options is None:
            return
        self.stop_and_reset_thread(ignore_results=True)
        self.search_thread = SearchThread(self)
        self.search_thread.sig_finished.connect(self.search_complete)
        self.search_thread.sig_current_file.connect(
            lambda x: self.status_bar.set_label_path(x, folder=False)
        )
        self.search_thread.sig_current_folder.connect(
            lambda x: self.status_bar.set_label_path(x, folder=True)
        )
        self.search_thread.sig_file_match.connect(
            self.result_browser.append_result
        )
        self.search_thread.sig_out_print.connect(
            lambda x: sys.stdout.write(str(x) + "\n")
        )
        self.status_bar.reset()
        self.result_browser.clear_title(
            self.find_options.search_text.currentText())
        self.search_thread.initialize(*options)
        self.search_thread.start()
        self.find_options.ok_button.setEnabled(False)
        self.find_options.stop_button.setEnabled(True)
        self.status_bar.show()
315393
def __search(self):
        

        self.__search_results = []

        editorsFiles = self.__container.default_target in self.__location.targets and \
                       [editor.file for editor in self.__container.script_editor.list_editors()] or []
        self.__search_editors_files(editorsFiles)

        self.__search_files(self.__location.files)

        for directory in self.__location.directories:
            if self.__interrupt:
                return

            files_walker = foundations.walkers.files_walker(directory,
                                                            self.__location.filters_in,
                                                            list(itertools.chain(self.__location.filters_out,
                                                                                 self.__location.files,
                                                                                 editorsFiles)))
            self.__search_files(files_walker)

        not self.__interrupt and self.searchFinished.emit(self.__search_results)