parameters: (filename, symbol)
return_statement: return candidate
docstring: Given a bare filename and a symbol that occurs in it, attempt to qualify
    it with a src-relative path.  If more than one file matches, return the
    original filename.
docstring_summary: Given a bare filename and a symbol that occurs in it, attempt to qualify
    it with a src-relative path.  If more than one file matches, return the
    original filename.
docstring_tokens: Given a bare filename and a symbol that occurs in it attempt to qualify it with a src - relative path . If more than one file matches return the original filename .
function: def QualifyFilename(filename, symbol):
    """Given a bare filename and a symbol that occurs in it, attempt to qualify
    it with a src-relative path.  If more than one file matches, return the
    original filename."""
    if not IS_GIT_WORKSPACE:
      return filename
    match = symbol_code_name_re.match(symbol)
    if not match:
      return filename
    symbol = match.group(1)
    gitgrep = subprocess.Popen(
      ['git', 'grep', '-l', symbol, '--', '*/%s' % filename],
      stdout=subprocess.PIPE)
    candidate = filename
    for line in gitgrep.stdout:
      if candidate != filename:  # More than one candidate; return bare filename.
        return filename
      candidate = line.strip()
    return candidate
function_tokens: def QualifyFilename ( filename , symbol ) : if not IS_GIT_WORKSPACE : return filename match = symbol_code_name_re . match ( symbol ) if not match : return filename symbol = match . group ( 1 ) gitgrep = subprocess . Popen ( [ 'git' , 'grep' , '-l' , symbol , '--' , '*/%s' % filename ] , stdout = subprocess . PIPE ) candidate = filename for line in gitgrep . stdout : if candidate != filename : # More than one candidate; return bare filename. return filename candidate = line . strip ( ) return candidate