def parseBugsFromBugFile(text):

    m = reHeader.search(text)
    offset = -1    
    while m:
        offset = m.end()
        title, bug, tag, x, timestamp, separator = m.groups()
        bug = bug or ""
        
        m = reHeader.search(text, m.end()+1)
        if m:
            body = "\n%s\n\n" % text[offset:m.start()].strip() 
        else:
            body = ""

        yield (title, bug, tag, timestamp, separator, body)

# **************************************************************************************************
Parses the contents of a bug file into a list of bugs.
dataset/ETHPy150Open joehewitt/devon/devon/bugs.py/parseBugsFromBugFile