pytorch / tnt
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
  • 12% duplication:
    • 1,372 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 167 duplicated lines
  • 9 duplicates
system12% (167 lines)
Duplication per Extension
py12% (167 lines)
Duplication per Component (primary)
example73% (153 lines)
torchnet/engine22% (14 lines)
ROOT0% (0 lines)
torchnet/logger0% (0 lines)
torchnet/dataset0% (0 lines)
torchnet0% (0 lines)
torchnet/utils0% (0 lines)
torchnet/meter0% (0 lines)
Longest Duplicates
The list of 9 longest duplicates.
See data for all 9 duplicates...
Size#FoldersFilesLinesCode
34 x 2 example
example
mnist.py
mnist_with_visdom.py
12:55 (53%)
22:65 (40%)
view
32 x 2 example
example
mnist.py
mnist_with_meterlogger.py
12:53 (50%)
22:63 (51%)
view
32 x 2 example
example
mnist_with_meterlogger.py
mnist_with_visdom.py
22:63 (51%)
22:63 (38%)
view
8 x 2 example
example
mnist.py
mnist_with_visdom.py
57:65 (12%)
81:89 (9%)
view
8 x 2 example
example
mnist.py
mnist_with_visdom.py
84:94 (12%)
117:127 (9%)
view
7 x 2 example
example
mnist_with_meterlogger.py
mnist_with_visdom.py
97:105 (11%)
119:127 (8%)
view
7 x 2 example
example
mnist.py
mnist_with_visdom.py
72:80 (11%)
99:107 (8%)
view
7 x 2 example
example
mnist.py
mnist_with_meterlogger.py
86:94 (11%)
97:105 (11%)
view
7 x 2 torchnet/engine
torchnet/engine
engine.py
engine.py
47:54 (11%)
80:87 (11%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
10 x 3 example
example
example
mnist_with_meterlogger.py
mnist_with_visdom.py
mnist.py
0:0 
0:0 
0:0 
view