Hotspots

Files that are both large and changed often are where bugs tend to cluster and where refactoring pays off first. Each file of code in the current tree, tests included, is placed by its size and by the number of commits that changed it, under this name or one it had before; its hotspot score is changes × √lines. Documentation, vendored and generated files, and files without counted lines, such as binary files, are left out.

Files Analyzed
4,759
of 6,910 in the current tree
Top 10 Files
13.8%
of the total hotspot score
Median File Size
233 lines
half of the files are at least this large
Median Changes
12 commits
half of the files changed at least this often

Change frequency by file size

Each dot is a file; a bigger dot is a higher score. The dashed lines mark the median file size and the median number of changes: the large files that change often, in the top right, are in color. The 5 highest scores are numbered as in the list. Both axes are logarithmic. Showing the 2,000 highest-scoring of 4,759 files.

Chart not shown: it is drawn with JavaScript, which is turned off or blocked on this page, as it is on Jenkins by default. How to show the charts

Highest scores

  1. 1src/transformers/modeling_utils.py5,375 lines · 1,235 changes
  2. 2src/transformers/trainer.py4,790 lines · 1,021 changes
  3. 3tests/test_modeling_common.py7,057 lines · 788 changes
  4. 4src/transformers/models/auto/modeling_auto.py2,848 lines · 794 changes
  5. 5src/transformers/__init__.py808 lines · 1,201 changes
  6. 6src/transformers/generation/utils.py4,565 lines · 502 changes
  7. 7tests/generation/test_utils.py6,323 lines · 426 changes
  8. 8src/transformers/testing_utils.py5,519 lines · 419 changes

Top hotspots

The files ranked by hotspot score: the larger a file is and the more often it changes, the higher it ranks. Authors is how many people have changed the file, bots aside, as on the Code Ownership page: a hotspot only one person has changed is also a bus-factor risk.

Table: the 100 highest-scoring of 4,759 files