tensorflow / federated
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:
    • 36,067 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,004 duplicated lines
  • 264 duplicates
system8% (3,004 lines)
Duplication per Extension
py8% (2,659 lines)
cc5% (164 lines)
bzl35% (80 lines)
h4% (58 lines)
Dockerfile61% (43 lines)
Duplication per Component (primary)
tensorflow_federated/python/core5% (896 lines)
tensorflow_federated/python/learning16% (824 lines)
tensorflow_federated/python/simulation11% (447 lines)
tensorflow_federated/python/aggregators12% (253 lines)
tensorflow_federated/cc/core5% (240 lines)
tensorflow_federated/python/analytics12% (185 lines)
tensorflow_federated/tools31% (80 lines)
tensorflow_federated/python/common_libs4% (30 lines)
tensorflow_federated/tools/runtime33% (28 lines)
tensorflow_federated/tools/client44% (15 lines)
tensorflow_federated/python/tensorflow_libs2% (6 lines)
tensorflow_federated/experimental/python0% (0 lines)
tensorflow_federated/experimental0% (0 lines)
tensorflow_federated/tools/python_package0% (0 lines)
tensorflow_federated/python/cloud0% (0 lines)
tensorflow_federated/python/program0% (0 lines)
tensorflow_federated/python0% (0 lines)
tensorflow_federated0% (0 lines)
tensorflow_federated/proto0% (0 lines)
tensorflow_federated/proto/v00% (0 lines)
tensorflow_federated/cc/common_libs0% (0 lines)

Duplication Between Components (50+ lines)

G tensorflow_federated/python/aggregators tensorflow_federated/python/aggregators tensorflow_federated/python/learning tensorflow_federated/python/learning tensorflow_federated/python/aggregators--tensorflow_federated/python/learning 142

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 264 duplicates...
Size#FoldersFilesLinesCode
60 x 2 tensorflow_federated/python/core/impl/executors
tensorflow_federated/python/core/impl/executors
executor_serialization.py
value_serialization.py
322:434 (18%)
334:446 (16%)
view
38 x 2 tensorflow_federated/python/aggregators
tensorflow_federated/python/learning/framework
encoded.py
encoding_utils.py
183:237 (23%)
202:257 (19%)
view
33 x 2 tensorflow_federated/python/aggregators
tensorflow_federated/python/learning/framework
encoded.py
encoding_utils.py
251:287 (20%)
266:303 (16%)
view
33 x 2 tensorflow_federated/python/core/impl/executors
tensorflow_federated/python/core/impl/executors
executor_serialization.py
value_serialization.py
251:288 (10%)
273:310 (9%)
view
25 x 2 tensorflow_federated/python/learning/optimizers
tensorflow_federated/python/learning/optimizers
adam.py
yogi.py
54:80 (32%)
57:83 (29%)
view
25 x 2 tensorflow_federated/tools
tensorflow_federated/tools
build_defs.bzl
build_defs.bzl
92:116 (11%)
154:178 (11%)
view
24 x 2 tensorflow_federated/python/core/impl/executors
tensorflow_federated/python/core/impl/executors
executor_serialization.py
value_serialization.py
573:602 (7%)
620:649 (6%)
view
21 x 2 tensorflow_federated/python/learning/templates
tensorflow_federated/python/learning/templates
client_works.py
distributors.py
90:112 (30%)
58:80 (32%)
view
21 x 2 tensorflow_federated/python/learning/templates
tensorflow_federated/python/learning/templates
client_works.py
finalizers.py
90:112 (30%)
72:94 (14%)
view
21 x 2 tensorflow_federated/python/learning/algorithms
tensorflow_federated/python/learning/algorithms
fed_avg_with_optimizer_schedule.py
fed_prox.py
242:266 (21%)
156:180 (25%)
view
21 x 2 tensorflow_federated/python/learning/templates
tensorflow_federated/python/learning/templates
distributors.py
finalizers.py
58:80 (32%)
72:94 (14%)
view
20 x 2 tensorflow_federated/python/core/impl/executors
tensorflow_federated/python/core/impl/executors
executor_serialization.py
value_serialization.py
447:468 (6%)
471:492 (5%)
view
19 x 2 tensorflow_federated/python/core/impl/executors
tensorflow_federated/python/core/impl/executors
executor_serialization.py
value_serialization.py
476:512 (5%)
506:542 (5%)
view
19 x 2 tensorflow_federated/python/learning/optimizers
tensorflow_federated/python/learning/optimizers
adam.py
yogi.py
84:105 (24%)
92:113 (22%)
view
18 x 2 tensorflow_federated/python/simulation/datasets
tensorflow_federated/python/simulation/datasets
emnist.py
emnist.py
174:192 (5%)
406:424 (5%)
view
18 x 2 tensorflow_federated/python/simulation/datasets
tensorflow_federated/python/simulation/datasets
emnist.py
emnist.py
348:366 (5%)
406:424 (5%)
view
18 x 2 tensorflow_federated/python/simulation/datasets
tensorflow_federated/python/simulation/datasets
emnist.py
emnist.py
174:192 (5%)
348:366 (5%)
view
18 x 2 tensorflow_federated/python/aggregators
tensorflow_federated/python/aggregators
rotation.py
rotation.py
132:152 (7%)
257:277 (7%)
view
16 x 2 tensorflow_federated/python/simulation/datasets
tensorflow_federated/python/simulation/datasets
emnist.py
emnist.py
176:192 (5%)
263:279 (5%)
view
16 x 2 tensorflow_federated/python/simulation/datasets
tensorflow_federated/python/simulation/datasets
emnist.py
emnist.py
263:279 (5%)
350:366 (5%)
view
Duplicated Units
The list of top 8 duplicated units.
See data for all 8 unit duplicates...
Size#FoldersFilesLinesCode
59 x 2 tensorflow_federated/python/core/impl/executors
tensorflow_federated/python/core/impl/executors
value_serialization.py
executor_serialization.py
0:0 
0:0 
view
36 x 2 tensorflow_federated/python/core/impl/executors
tensorflow_federated/python/core/impl/executors
value_serialization.py
executor_serialization.py
0:0 
0:0 
view
15 x 2 tensorflow_federated/cc/core/impl/executors
tensorflow_federated/cc/core/impl/executors
status_matchers.cc
status_matchers.cc
43:60 
77:94 
view
23 x 2 tensorflow_federated/python/core/impl/executors
tensorflow_federated/python/core/impl/executors
value_serialization.py
executor_serialization.py
0:0 
0:0 
view
7 x 2 tensorflow_federated/python/learning
tensorflow_federated/python/learning
keras_utils.py
keras_utils.py
0:0 
0:0 
view
6 x 2 tensorflow_federated/cc/core/impl/executors
tensorflow_federated/cc/core/impl/executors
composing_executor.cc
tensorflow_executor.cc
464:470 
881:887 
view
6 x 2 tensorflow_federated/python/core/impl/executors
tensorflow_federated/python/core/impl/executors
value_serialization.py
executor_serialization.py
0:0 
0:0 
view
15 x 2 tensorflow_federated/python/aggregators
tensorflow_federated/python/learning/framework
encoded.py
encoding_utils.py
0:0 
0:0 
view