microsoft / NeuronBlocks
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
  • 16% duplication:
    • 7,388 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,204 duplicated lines
  • 245 duplicates
system16% (1,204 lines)
Duplication per Extension
py16% (1,204 lines)
Duplication per Component (primary)
block_zoo19% (536 lines)
ROOT13% (334 lines)
model_visualizer72% (178 lines)
tools34% (46 lines)
metrics6% (32 lines)
autotest36% (28 lines)
dataset23% (24 lines)
losses9% (14 lines)
utils1% (12 lines)
core0% (0 lines)
optimizers0% (0 lines)
preparation0% (0 lines)

Duplication Between Components (50+ lines)

G autotest autotest tools tools autotest--tools 56

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 245 duplicates...
Size#FoldersFilesLinesCode
89 x 2 model_visualizer
model_visualizer/server
get_model_graph.py
mv.py
18:113 (83%)
14:109 (92%)
view
26 x 2 ROOT
ROOT
LearningMachine.py
LearningMachine.py
696:725 (3%)
807:836 (3%)
view
20 x 2 ROOT
ROOT
LearningMachine.py
LearningMachine.py
446:468 (2%)
693:714 (2%)
view
20 x 2 ROOT
ROOT
LearningMachine.py
LearningMachine.py
246:265 (2%)
546:565 (2%)
view
18 x 2 ROOT
ROOT
LearningMachine.py
LearningMachine.py
450:468 (2%)
807:825 (2%)
view
16 x 2 autotest/tools
tools
calculate_AUC.py
calculate_auc.py
15:33 (45%)
14:32 (44%)
view
16 x 2 ROOT
ROOT
problem.py
problem.py
523:541 (2%)
560:578 (2%)
view
14 x 2 ROOT
ROOT
LearningMachine.py
LearningMachine.py
246:259 (1%)
755:768 (1%)
view
14 x 2 block_zoo/attentions
block_zoo/op
MatchAttention.py
Match.py
52:79 (37%)
51:78 (36%)
view
14 x 2 ROOT
ROOT
LearningMachine.py
LearningMachine.py
546:559 (1%)
755:768 (1%)
view
14 x 2 ROOT
ROOT
LearningMachine.py
LearningMachine.py
150:165 (1%)
442:458 (1%)
view
13 x 2 ROOT
ROOT
LearningMachine.py
LearningMachine.py
747:760 (1%)
858:871 (1%)
view
13 x 2 block_zoo
block_zoo/encoder_decoder
BiLSTM.py
SLUEncoder.py
24:38 (32%)
29:43 (22%)
view
13 x 2 block_zoo
block_zoo/encoder_decoder
BiLSTMAtt.py
SLUEncoder.py
25:39 (23%)
29:43 (22%)
view
13 x 2 block_zoo
block_zoo
BiLSTM.py
BiLSTMAtt.py
24:38 (32%)
25:39 (23%)
view
12 x 2 ROOT
ROOT
predict.py
test.py
78:91 (17%)
64:77 (24%)
view
12 x 2 autotest/tools
tools
calculate_AUC.py
calculate_auc.py
35:49 (34%)
34:48 (33%)
view
11 x 2 block_zoo
block_zoo
BiLSTM.py
BiLSTMLast.py
24:36 (27%)
23:35 (28%)
view
11 x 2 block_zoo/math
block_zoo/math
ElementWisedMultiply2D.py
Minus2D.py
26:37 (33%)
31:42 (28%)
view
11 x 2 block_zoo/math
block_zoo/math
Add2D.py
ElementWisedMultiply2D.py
26:37 (33%)
26:37 (33%)
view