function findMatchingFunctions(functionName, fileInfos) {
        var result          = new $.Deferred(),
            jsFiles         = [],
            docEntries      = [];
        
        // Filter fileInfos for .js files
        jsFiles = fileInfos.filter(function (fileInfo) {
            return (/^\.js/i).test(PathUtils.filenameExtension(fileInfo.fullPath));
        });
        
        // RegExp search (or cache lookup) for all functions in the project
        _getFunctionsInFiles(jsFiles).done(function (docEntries) {
            // Compute offsets for all matched functions
            _getOffsetsForFunction(docEntries, functionName).done(function (rangeResults) {
                result.resolve(rangeResults);
            });
        });
        
        return result.promise();
    }
Return all functions that have the specified name.

@param {!String} functionName The name to match.
@param {!Array.<FileIndexManager.FileInfo>} fileInfos The array of files to search.
@return {$.Promise} that will be resolved with an Array of objects containing the
     source document, start line, and end line (0-based, inclusive range) for each matching function list.
     Does not addRef() the documents returned in the array.