apple / ml-covid-mobility
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 8% duplication:
    • 1,575 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 130 duplicated lines
  • 11 duplicates
system8% (130 lines)
Duplication per Extension
R7% (90 lines)
Rmd11% (40 lines)
Duplication per Component (primary)
ROOT8% (130 lines)
Longest Duplicates
The list of 11 longest duplicates.
See data for all 11 duplicates...
Size#FoldersFilesLinesCode
15 x 2 ROOT
ROOT
Rmd
examples.Rmd
examples.Rmd
170:184 (4%)
271:285 (4%)
view
10 x 2 ROOT
ROOT
utils_build_mask_features.R
utils_build_mask_features.R
67:76 (10%)
103:113 (10%)
view
10 x 2 ROOT
ROOT
Rmd
examples.Rmd
fit_model.R
25:34 (2%)
9:18 (29%)
view
9 x 2 ROOT
ROOT
utils_build_mask_features.R
utils_build_mask_features.R
84:92 (9%)
115:123 (9%)
view
7 x 2 ROOT
ROOT
utils_extract_coefs.R
utils_extract_coefs.R
178:184 (4%)
196:202 (4%)
view
7 x 2 ROOT
ROOT
utils_extract_coefs.R
utils_extract_coefs.R
178:184 (4%)
214:220 (4%)
view
7 x 2 ROOT
ROOT
utils_extract_coefs.R
utils_extract_coefs.R
151:157 (4%)
178:184 (4%)
view
7 x 2 ROOT
ROOT
utils_extract_coefs.R
utils_extract_coefs.R
151:157 (4%)
196:202 (4%)
view
7 x 2 ROOT
ROOT
utils_extract_coefs.R
utils_extract_coefs.R
196:202 (4%)
214:220 (4%)
view
7 x 2 ROOT
ROOT
utils_extract_coefs.R
utils_extract_coefs.R
143:149 (4%)
170:176 (4%)
view
7 x 2 ROOT
ROOT
utils_extract_coefs.R
utils_extract_coefs.R
151:157 (4%)
214:220 (4%)
view