tensorflow / tfx-bsl
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
  • 5% duplication:
    • 9,647 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 542 duplicated lines
  • 43 duplicates
system5% (542 lines)
Duplication per Extension
py6% (292 lines)
cc4% (194 lines)
h4% (44 lines)
proto6% (12 lines)
Duplication per Component (primary)
tfx_bsl/cc4% (244 lines)
tfx_bsl/tfxio9% (243 lines)
tfx_bsl/beam4% (35 lines)
tfx_bsl/coders3% (14 lines)
tfx_bsl/public5% (6 lines)
ROOT0% (0 lines)
tfx_bsl/arrow0% (0 lines)
tfx_bsl0% (0 lines)
tfx_bsl/sketches0% (0 lines)
tfx_bsl/statistics0% (0 lines)
tfx_bsl/tools0% (0 lines)
tfx_bsl/types0% (0 lines)
tfx_bsl/telemetry0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 43 duplicates...
Size#FoldersFilesLinesCode
29 x 2 tfx_bsl/cc/sketches
tfx_bsl/cc/sketches
kmv_sketch.cc
misragries_sketch.cc
43:86 (20%)
115:158 (7%)
view
13 x 2 tfx_bsl/tfxio
tfx_bsl/tfxio
tf_example_record.py
tf_sequence_example_record.py
280:294 (5%)
214:228 (7%)
view
12 x 2 tfx_bsl/tfxio
tfx_bsl/tfxio
tf_example_record.py
tf_sequence_example_record.py
369:385 (4%)
243:259 (7%)
view
12 x 2 tfx_bsl/tfxio
tfx_bsl/tfxio
tf_example_record.py
tf_sequence_example_record.py
215:244 (4%)
144:173 (7%)
view
9 x 2 tfx_bsl/cc/sketches
tfx_bsl/cc/sketches
sketches_submodule.cc
sketches_submodule.cc
90:101 (3%)
206:217 (3%)
view
9 x 2 tfx_bsl/tfxio
tfx_bsl/tfxio
raw_tf_record.py
record_to_tensor_tfxio.py
132:142 (9%)
175:185 (4%)
view
9 x 2 tfx_bsl/tfxio
tfx_bsl/tfxio
tf_example_record.py
tf_sequence_example_record.py
61:73 (3%)
51:63 (5%)
view
9 x 2 tfx_bsl/tfxio
tfx_bsl/tfxio
tf_example_record.py
tf_sequence_example_record.py
97:107 (3%)
86:96 (5%)
view
8 x 2 tfx_bsl/tfxio
tfx_bsl/tfxio
raw_tf_record.py
record_to_tensor_tfxio.py
165:173 (8%)
225:233 (3%)
view
8 x 2 tfx_bsl/cc/pybind11
tfx_bsl/cc/pybind11
arrow_casters_c_abi.h
arrow_casters_py_c_api.h
29:37 (7%)
29:37 (17%)
view
8 x 2 tfx_bsl/tfxio
tfx_bsl/tfxio
raw_tf_record.py
record_to_tensor_tfxio.py
180:187 (8%)
268:275 (3%)
view
8 x 2 tfx_bsl/cc/sketches
tfx_bsl/cc/sketches
kmv_sketch.cc
misragries_sketch.cc
175:183 (5%)
377:385 (2%)
view
7 x 2 tfx_bsl/tfxio
tfx_bsl/tfxio
tf_example_record.py
tf_sequence_example_record.py
391:397 (2%)
269:275 (4%)
view
7 x 2 tfx_bsl/beam
tfx_bsl/beam
run_inference.py
run_inference.py
557:563 (<1%)
848:854 (<1%)
view
7 x 2 tfx_bsl/cc/pybind11
tfx_bsl/cc/pybind11
arrow_casters_c_abi.h
arrow_casters_py_c_api.h
107:115 (6%)
69:77 (14%)
view
7 x 2 tfx_bsl/beam
tfx_bsl/beam
run_inference.py
run_inference.py
696:702 (<1%)
729:735 (<1%)
view
7 x 2 tfx_bsl/beam
tfx_bsl/beam
run_inference.py
run_inference.py
729:735 (<1%)
761:767 (<1%)
view
7 x 2 tfx_bsl/beam
tfx_bsl/beam
run_inference.py
run_inference.py
696:702 (<1%)
761:767 (<1%)
view
7 x 2 tfx_bsl/cc/pybind11
tfx_bsl/cc/pybind11
arrow_casters_c_abi.h
arrow_casters_py_c_api.h
68:76 (6%)
49:57 (14%)
view
7 x 2 tfx_bsl/tfxio
tfx_bsl/tfxio
tensor_to_arrow.py
tensor_to_arrow.py
225:232 (2%)
314:321 (2%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
7 x 2 tfx_bsl/cc/arrow
tfx_bsl/cc/arrow
sql_util.cc
sql_util.cc
230:237 
239:246 
view
7 x 2 tfx_bsl/cc/arrow
tfx_bsl/cc/arrow
sql_util.cc
sql_util.cc
248:255 
257:264 
view
8 x 2 tfx_bsl/tfxio
tfx_bsl/tfxio
tf_example_record.py
tf_sequence_example_record.py
0:0 
0:0 
view
6 x 2 tfx_bsl/tfxio
tfx_bsl/tfxio
tf_example_record.py
tf_sequence_example_record.py
0:0 
0:0 
view