def fix_name_table(font):
    modified = False
    name_records = font_data.get_name_records(font)

    copyright_data = name_records[0]
    years = re.findall('20[0-9][0-9]', copyright_data)
    year = min(years)
    copyright_data = u'Copyright %s Google Inc. All Rights Reserved.' % year

    if copyright_data != name_records[0]:
        print 'Updated copyright message to "%s"' % copyright_data
        font_data.set_name_record(font, 0, copyright_data)
        modified = True

    for name_id in [1, 3, 4, 6]:
        record = name_records[name_id]
        for source in NAME_CORRECTIONS:
            if source in record:
                oldrecord = record
                record = record.replace(source, NAME_CORRECTIONS[source])
                break
        if record != name_records[name_id]:
            font_data.set_name_record(font, name_id, record)
            print 'Updated name table record #%d from "%s" to "%s"' % (
                name_id, oldrecord, record)
            modified = True

    trademark_names = ['Noto', 'Arimo', 'Tinos', 'Cousine']
    trademark_name = None
    font_family = name_records[1]
    for name in trademark_names:
        if font_family.find(name) != -1:
            trademark_name = name
            break
    if not trademark_name:
        print 'no trademarked name in \'%s\'' % font_family
    else:
        trademark_line = TRADEMARK_TEMPLATE % trademark_name
        if name_records[7] != trademark_line:
            old_line = name_records[7]
            font_data.set_name_record(font, 7, trademark_line)
            modified = True
            print 'Updated name table record 7 from "%s" to "%s"' % (old_line, trademark_line)

    if name_records[11] != NOTO_URL:
        font_data.set_name_record(font, 11, NOTO_URL)
        modified = True
        print 'Updated name table record 11 to "%s"' % NOTO_URL

    if name_records[_LICENSE_ID] != _SIL_LICENSE:
        font_data.set_name_record(font, _LICENSE_ID, _SIL_LICENSE)
        modified = True
        print 'Updated license id'

    if name_records[_LICENSE_URL_ID] != _SIL_LICENSE_URL:
        font_data.set_name_record(font, _LICENSE_URL_ID, _SIL_LICENSE_URL)
        modified = True
        print 'Updated license url'

    # TODO: check preferred family/subfamily(16&17)

    return modified
Report the number of tasks
dataset/ETHPy150Open googlei18n/nototools/nototools/autofix_for_release.py/fix_name_table--crossover with--dataset/ETHPy150Open marineam/nagcat/python/nagcat/scheduler.py/Scheduler._log_stats