bazelbuild / rules_pkg
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
  • 14% duplication:
    • 6,394 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 913 duplicated lines
  • 522 duplicates
system14% (913 lines)
Duplication per Extension
bzl19% (792 lines)
go18% (68 lines)
py2% (40 lines)
tpl5% (13 lines)
Duplication per Component (primary)
pkg11% (317 lines)
pkg/private12% (272 lines)
ROOT64% (107 lines)
deb_packages/tools19% (80 lines)
pkg/legacy23% (50 lines)
toolchains27% (34 lines)
toolchains/git21% (34 lines)
pkg/releasing6% (19 lines)
distro0% (0 lines)
pkg/rpm0% (0 lines)
doc_build0% (0 lines)
deb_packages0% (0 lines)

Duplication Between Components (50+ lines)

G pkg pkg pkg/private pkg/private pkg--pkg/private 420 pkg/legacy pkg/legacy pkg--pkg/legacy 216 toolchains/git toolchains/git pkg--toolchains/git 163 toolchains toolchains pkg--toolchains 161 pkg/releasing pkg/releasing pkg/private--pkg/releasing 96 pkg/private--toolchains/git 91 pkg/private--toolchains 84 ROOT ROOT ROOT--pkg 244 ROOT--pkg/private 168 ROOT--pkg/legacy 108 ROOT--pkg/releasing 116 ROOT--toolchains/git 129 pkg/legacy--pkg/private 104 pkg/releasing--pkg 168 toolchains/git--toolchains 64 toolchains--ROOT 120 deb_packages/tools deb_packages/tools deb_packages/tools--pkg 144 deb_packages/tools--pkg/private 72 deb_packages/tools--ROOT 108

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 522 duplicates...
Size#FoldersFilesLinesCode
20 x 2 pkg
pkg/private/zip
pkg.bzl
zip.bzl
238:257 (6%)
91:110 (11%)
view
19 x 2 pkg
pkg/private/zip
pkg.bzl
zip.bzl
287:306 (5%)
140:160 (10%)
view
19 x 2 pkg/private
pkg/private/zip
pkg_files.bzl
zip.bzl
257:275 (5%)
59:77 (10%)
view
14 x 2 deb_packages/tools/update_deb_packages/src
deb_packages/tools/update_deb_packages/src
update_deb_packages.go
update_deb_packages.go
271:289 (3%)
324:342 (3%)
view
14 x 2 deb_packages/tools/update_deb_packages/src
deb_packages/tools/update_deb_packages/src
update_deb_packages.go
update_deb_packages.go
237:255 (3%)
324:342 (3%)
view
14 x 2 deb_packages/tools/update_deb_packages/src
deb_packages/tools/update_deb_packages/src
update_deb_packages.go
update_deb_packages.go
237:255 (3%)
271:289 (3%)
view
14 x 2 ROOT
ROOT
install.bzl
mappings.bzl
1:15 (77%)
1:15 (43%)
view
13 x 2 ROOT
pkg
pkg.bzl
install.bzl
1:13 (68%)
1:13 (8%)
view
13 x 2 pkg
ROOT
rpm.bzl
providers.bzl
1:13 (22%)
1:13 (48%)
view
13 x 2 ROOT
toolchains/git
install.bzl
git_configure.bzl
1:13 (72%)
1:13 (18%)
view
13 x 2 pkg
toolchains
package_variables.bzl
rpmbuild_configure.bzl
1:13 (68%)
1:13 (26%)
view
13 x 2 pkg
toolchains/git
zip.bzl
git_configure.bzl
1:13 (86%)
1:13 (18%)
view
13 x 2 ROOT
pkg
pkg.bzl
rpm.bzl
1:13 (68%)
1:13 (22%)
view
13 x 2 ROOT
toolchains/git
install.bzl
git.bzl
1:13 (72%)
1:13 (17%)
view
13 x 2 pkg
pkg/private
mappings.bzl
install.py.tpl
1:13 (1%)
3:15 (7%)
view
13 x 2 ROOT
pkg
install.bzl
install.bzl
1:13 (72%)
1:13 (8%)
view
13 x 2 ROOT
toolchains/git
pkg.bzl
git_configure.bzl
1:13 (68%)
1:13 (18%)
view
13 x 2 ROOT
toolchains/git
rpm.bzl
git.bzl
1:13 (76%)
1:13 (17%)
view
13 x 2 ROOT
pkg/private
package_variables.bzl
pkg_files.bzl
1:13 (76%)
1:13 (3%)
view
13 x 2 pkg
pkg
mappings.bzl
rpm.bzl
1:13 (1%)
1:13 (22%)
view