_adapterFromProgramName(program: string): DebugAdapter {
    const programUri = nuclideUri.parsePath(program);
    const ext = programUri.ext;

    const adapters = this._debugAdapters.filter(a => a.extensions.has(ext));

    if (adapters.length > 1) {
      throw new Error(
        `Multiple debuggers can debug programs with extension ${ext}. Please explicitly specify one with '--type'`,
      );
    }

    return adapters[0];
  }
 componentDidMount(): void {
   const input = nullthrows(this._input);
   this._disposables.add(
     atom.commands.add(
       // $FlowFixMe
       ReactDOM.findDOMNode(input),
       {
         'core:confirm': this._confirm,
         'core:cancel': this._close,
       },
     ),
   );
   const path = this.props.initialValue;
   input.focus();
   if (this.props.selectBasename && path != null) {
     const {dir, name} = nuclideUri.parsePath(path);
     const selectionStart = dir ? dir.length + 1 : 0;
     const selectionEnd = selectionStart + name.length;
     input
       .getTextEditor()
       .setSelectedBufferRange([[0, selectionStart], [0, selectionEnd]]);
   }
   document.addEventListener('mousedown', this._handleDocumentMouseDown);
 }
 it('returns false if the path is not in the cache and is not the .hg directory.', () => {
   expect(repo.isPathIgnored('/A/Random/Path')).toBe(false);
   const parsedPath = nuclideUri.parsePath(repoPath);
   expect(repo.isPathIgnored(parsedPath.root)).toBe(false);
   expect(repo.isPathIgnored(parsedPath.dir)).toBe(false);
 });
 _isRoot(filePath_: string): boolean {
   let filePath = filePath_;
   filePath = nuclideUri.normalize(filePath);
   const parts = nuclideUri.parsePath(filePath);
   return parts.root === filePath;
 }