tensorflow / swift-apis
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
  • 41% duplication:
    • 79,572 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 32,669 duplicated lines
  • 8,216 duplicates
system41% (32,669 lines)
Duplication per Extension
swift52% (30,203 lines)
inc26% (910 lines)
h17% (817 lines)
py18% (348 lines)
cpp3% (258 lines)
cc3% (133 lines)
Duplication per Component (primary)
Sources/TensorFlow50% (26,941 lines)
Sources/x1018% (3,541 lines)
Sources/CX1028% (1,373 lines)
Sources/CX10Modules99% (394 lines)
Utilities/ReferenceImplementations48% (289 lines)
Sources/Tensor23% (131 lines)
Sources/CTensorFlow0% (0 lines)
cmake/modules0% (0 lines)
Utilities0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G Sources/TensorFlow Sources/TensorFlow Sources/x10 Sources/x10 Sources/TensorFlow--Sources/x10 7563 Sources/CX10 Sources/CX10 Sources/CX10--Sources/x10 50 Sources/CX10Modules Sources/CX10Modules Sources/CX10--Sources/CX10Modules 788

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 8,216 duplicates...
Size#FoldersFilesLinesCode
1540 x 2 Sources/TensorFlow/X10/APIs
Sources/x10/swift_bindings/apis
RawOpsManual.swift
RawOpsManual.swift
18:3832 (100%)
18:3832 (100%)
view
991 x 2 Sources/TensorFlow/X10
Sources/x10/swift_bindings
RawOpsXLAGenerated.swift
RawOpsXLAGenerated.swift
3:1225 (100%)
3:1225 (100%)
view
350 x 2 Sources/CX10
Sources/CX10Modules/include
xla_tensor_wrapper.h
xla_tensor_wrapper.h
38:458 (100%)
38:458 (100%)
view
325 x 2 Sources/TensorFlow/X10
Sources/x10/swift_bindings
XLATensor.swift
XLATensor.swift
15:496 (100%)
15:496 (100%)
view
129 x 2 Sources/TensorFlow/X10
Sources/x10/swift_bindings
Device.swift
Device.swift
15:240 (100%)
15:240 (100%)
view
82 x 2 Sources/TensorFlow/X10
Sources/x10/swift_bindings
XLAScalarType.swift
XLAScalarType.swift
15:151 (100%)
15:151 (100%)
view
33 x 2 Sources/TensorFlow/X10/APIs
Sources/x10/swift_bindings/apis
DeviceScope.swift
DeviceScope.swift
17:60 (100%)
17:60 (100%)
view
32 x 2 Sources/TensorFlow/Bindings
Sources/TensorFlow/Bindings
RawOpsDispatching.swift
RawOpsGenerated.swift
21227:21258 (<1%)
22691:22722 (<1%)
view
30 x 2 Sources/TensorFlow/Optimizers
Sources/TensorFlow/Optimizers
MomentumBased.swift
MomentumBased.swift
323:372 (8%)
586:628 (8%)
view
28 x 2 Sources/TensorFlow/Bindings
Sources/TensorFlow/Bindings
RawOpsDispatching.swift
RawOpsGenerated.swift
21134:21161 (<1%)
22576:22603 (<1%)
view
27 x 2 Sources/TensorFlow/Bindings
Sources/TensorFlow/Bindings
RawOpsDispatching.swift
RawOpsGenerated.swift
10335:10361 (<1%)
11079:11105 (<1%)
view
27 x 2 Sources/TensorFlow/Bindings
Sources/TensorFlow/Bindings
RawOpsDispatching.swift
RawOpsGenerated.swift
6272:6298 (<1%)
6851:6877 (<1%)
view
27 x 2 Sources/TensorFlow/Bindings
Sources/TensorFlow/Bindings
RawOpsDispatching.swift
RawOpsGenerated.swift
13341:13367 (<1%)
14359:14385 (<1%)
view
26 x 2 Sources/TensorFlow/Bindings
Sources/TensorFlow/Bindings
RawOpsGenerated.swift
RawOpsGenerated.swift
11081:11106 (<1%)
14361:14386 (<1%)
view
26 x 2 Sources/TensorFlow/Optimizers
Sources/TensorFlow/Optimizers
MomentumBased.swift
MomentumBased.swift
350:380 (7%)
515:545 (7%)
view
26 x 2 Sources/TensorFlow/X10/APIs
Sources/x10/swift_bindings/apis
CrossReplicaSum.swift
CrossReplicaSum.swift
16:63 (100%)
16:63 (100%)
view
25 x 2 Sources/TensorFlow/Bindings
Sources/TensorFlow/Bindings
RawOpsDispatching.swift
RawOpsGenerated.swift
1299:1323 (<1%)
1819:1843 (<1%)
view
25 x 2 Sources/TensorFlow/Bindings
Sources/TensorFlow/Bindings
RawOpsDispatching.swift
RawOpsGenerated.swift
22832:22856 (<1%)
24605:24629 (<1%)
view
25 x 2 Utilities/ReferenceImplementations
Utilities/ReferenceImplementations
bidirectional_gru.py
bidirectional_lstm.py
10:38 (14%)
9:37 (23%)
view
25 x 2 Sources/TensorFlow/Bindings
Sources/TensorFlow/Bindings
RawOpsDispatching.swift
RawOpsGenerated.swift
3142:3166 (<1%)
3618:3642 (<1%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 20 unit duplicates...
Size#FoldersFilesLinesCode
15 x 2 Sources/TensorFlow/X10
Sources/x10/swift_bindings
XLATensor.swift
XLATensor.swift
157:172 
157:172 
view
15 x 2 Sources/CX10
Sources/CX10
xla_tensor_ops_wrapper.cc
xla_tensor_wrapper.cc
591:606 
40:55 
view
13 x 6 Utilities/ReferenceImplementations
Utilities/ReferenceImplementations
Utilities/ReferenceImplementations
Utilities/ReferenceImplementations
Utilities/ReferenceImplementations
Utilities/ReferenceImplementations
gru.py
bidirectional_gru.py
rnn.py
bidirectional_lstm.py
bidirectional_rnn.py
lstm.py
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
view
12 x 2 Sources/TensorFlow/X10/APIs
Sources/x10/swift_bindings/apis
DeviceScope.swift
DeviceScope.swift
49:61 
49:61 
view
12 x 2 Sources/CX10
Sources/CX10
xla_tensor_ops_wrapper.cc
xla_tensor_wrapper.cc
608:620 
57:69 
view
11 x 2 Sources/TensorFlow/X10/APIs
Sources/x10/swift_bindings/apis
CrossReplicaSum.swift
CrossReplicaSum.swift
45:56 
45:56 
view
11 x 2 Sources/x10/xla_tensor/ops
Sources/CX10
xla_pad.cpp
xla_tensor_ops_wrapper.cc
39:50 
63:74 
view
9 x 2 Sources/x10/xla_client
Sources/x10/xla_client
xrt_computation_client.cc
xrt_computation_client.cc
266:275 
310:319 
view
8 x 2 Sources/x10/xla_client
Sources/x10/xla_client
util.h
util.h
176:184 
187:195 
view
7 x 2 Sources/TensorFlow/X10
Sources/x10/swift_bindings
XLATensor.swift
XLATensor.swift
202:209 
202:209 
view
7 x 2 Sources/TensorFlow/X10
Sources/x10/swift_bindings
XLATensor.swift
XLATensor.swift
213:220 
213:220 
view
7 x 2 Sources/CX10Modules/include
Sources/CX10
xla_tensor_wrapper.h
xla_tensor_wrapper.h
172:179 
172:179 
view
7 x 2 Sources/CX10
Sources/CX10
functional_while.cc
xla_tensor_ops_wrapper.cc
287:294 
116:123 
view
7 x 2 Sources/CX10
Sources/CX10
xla_tensor_ops_wrapper_generated.cc.inc
xla_tensor_ops_wrapper_generated.cc.inc
619:626 
653:660 
view
6 x 2 Sources/TensorFlow/X10
Sources/x10/swift_bindings
XLATensor.swift
XLATensor.swift
28:34 
28:34 
view
6 x 2 Sources/TensorFlow/X10
Sources/x10/swift_bindings
XLATensor.swift
XLATensor.swift
70:76 
70:76 
view
6 x 2 Sources/CX10
Sources/CX10
xla_tensor_ops_wrapper_generated.cc.inc
xla_tensor_ops_wrapper_generated.cc.inc
149:155 
188:194 
view
6 x 2 Sources/CX10
Sources/CX10
xla_tensor_ops_wrapper_generated.cc.inc
xla_tensor_ops_wrapper_generated.cc.inc
227:233 
266:272 
view
6 x 2 Sources/CX10
Sources/CX10
xla_tensor_ops_wrapper_generated.cc.inc
xla_tensor_ops_wrapper_generated.cc.inc
1558:1564 
227:233 
view
6 x 2 Sources/CX10
Sources/CX10
xla_tensor_ops_wrapper_generated.cc.inc
xla_tensor_ops_wrapper_generated.cc.inc
1632:1638 
2008:2014 
view