aws / aws-neuron-tensorflow
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
  • 2% duplication:
    • 11,795 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 290 duplicated lines
  • 13 duplicates
system2% (290 lines)
Duplication per Extension
cc3% (208 lines)
h4% (66 lines)
py<1% (16 lines)
Duplication per Component (primary)
runtime/kernels32% (164 lines)
grappler3% (78 lines)
runtime<1% (16 lines)
grappler/convert1% (16 lines)
python<1% (16 lines)
api0% (0 lines)
ROOT0% (0 lines)
runtime/direct0% (0 lines)
runtime/ops0% (0 lines)
python/hlo0% (0 lines)
python/tf2xla0% (0 lines)
tf2hlo0% (0 lines)
Longest Duplicates
The list of 13 longest duplicates.
See data for all 13 duplicates...
Size#FoldersFilesLinesCode
33 x 2 runtime/kernels
runtime/kernels
avgpooling_op.cc
maxpooling_op.cc
82:124 (25%)
83:125 (24%)
view
19 x 2 runtime/kernels
runtime/kernels
avgpooling_op.cc
maxpooling_op.cc
127:158 (14%)
128:159 (14%)
view
16 x 2 runtime/kernels
runtime/kernels
avgpooling_op.cc
maxpooling_op.cc
59:79 (12%)
56:77 (11%)
view
11 x 2 grappler
grappler
auto_mixed_precision_lists.h
auto_mixed_precision_lists.h
169:179 (3%)
383:393 (3%)
view
8 x 2 runtime/kernels
runtime/kernels
avgpooling_op.cc
maxpooling_op.cc
163:170 (6%)
164:171 (5%)
view
8 x 2 grappler
grappler
auto_mixed_precision_lists.h
auto_mixed_precision_lists.h
233:244 (2%)
419:430 (2%)
view
8 x 2 python
python
predictor.py
predictor.py
68:75 (5%)
116:123 (5%)
view
8 x 2 grappler/convert
grappler/convert
convert_graph.cc
convert_graph.h
750:757 (1%)
73:80 (14%)
view
8 x 2 runtime
runtime
runtime_grpc.cc
runtime_grpc.cc
133:140 (2%)
412:419 (2%)
view
7 x 2 grappler
grappler
auto_mixed_precision_lists.h
auto_mixed_precision_lists.h
226:232 (2%)
411:417 (2%)
view
7 x 2 grappler
grappler
auto_mixed_precision.cc
auto_mixed_precision.cc
1687:1694 (<1%)
1727:1734 (<1%)
view
6 x 2 runtime/kernels
runtime/kernels
avgpooling_op.cc
maxpooling_op.cc
229:234 (4%)
439:444 (4%)
view
6 x 2 grappler
grappler
mark_ops_in_fixed_shape_context.cc
static_shape_inference.h
45:50 (9%)
35:40 (35%)
view