microsoft / graph-based-code-modelling
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
  • 3% duplication:
    • 6,997 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 255 duplicated lines
  • 19 duplicates
system3% (255 lines)
Duplication per Extension
py5% (179 lines)
cs2% (76 lines)
Duplication per Component (primary)
Models/exprsynth5% (179 lines)
DataExtraction/SourceGraphExtractionUtils/Utils3% (62 lines)
DataExtraction/SourceGraphExtractionUtils1% (14 lines)
DataExtraction/ExpressionDataExtractor0% (0 lines)
DataExtraction/TestProject0% (0 lines)
Models/exprsynth/metadata0% (0 lines)
Models/utils0% (0 lines)
Longest Duplicates
The list of 19 longest duplicates.
See data for all 19 duplicates...
Size#FoldersFilesLinesCode
23 x 2 Models/exprsynth
Models/exprsynth
nagdecoder.py
seqdecoder.py
161:191 (1%)
54:84 (8%)
view
12 x 2 Models/exprsynth
Models/exprsynth
graph2seqmodel.py
nagmodel.py
68:80 (13%)
93:105 (7%)
view
10 x 2 Models/exprsynth
Models/exprsynth
graph2seqmodel.py
seq2seqmodel.py
102:116 (11%)
86:100 (13%)
view
10 x 2 Models/exprsynth
Models/exprsynth
seq2graphmodel.py
seq2seqmodel.py
126:136 (4%)
59:69 (13%)
view
10 x 2 DataExtraction/SourceGraphExtractionUtils/Utils
DataExtraction/SourceGraphExtractionUtils/Utils
DataFlowGraph.cs
ExecutionPathGraph.cs
548:561 (2%)
280:293 (4%)
view
8 x 2 DataExtraction/SourceGraphExtractionUtils/Utils
DataExtraction/SourceGraphExtractionUtils/Utils
DataFlowGraph.cs
VariableUseGraph.cs
480:493 (2%)
532:545 (2%)
view
8 x 2 Models/exprsynth
Models/exprsynth
contextgraphmodel.py
contexttokenmodel.py
428:436 (1%)
222:230 (3%)
view
8 x 2 Models/exprsynth
Models/exprsynth
graph2seqmodel.py
seq2seqmodel.py
19:28 (9%)
14:23 (11%)
view
8 x 2 Models/exprsynth
Models/exprsynth
nagdecoder.py
nagdecoder.py
424:431 (<1%)
598:605 (<1%)
view
7 x 2 Models/exprsynth
Models/exprsynth
contextgraphmodel.py
model.py
430:436 (1%)
288:294 (1%)
view
7 x 2 DataExtraction/SourceGraphExtractionUtils
DataExtraction/SourceGraphExtractionUtils
GraphDataExtractor.cs
GraphDataExtractor.cs
650:661 (<1%)
668:679 (<1%)
view
7 x 2 Models/exprsynth
Models/exprsynth
graph2seqmodel.py
seq2seqmodel.py
73:80 (8%)
62:69 (9%)
view
7 x 2 Models/exprsynth
Models/exprsynth
nagmodel.py
seq2seqmodel.py
98:105 (4%)
62:69 (9%)
view
7 x 2 Models/exprsynth
Models/exprsynth
nagmodel.py
seq2graphmodel.py
98:105 (4%)
129:136 (3%)
view
7 x 2 DataExtraction/SourceGraphExtractionUtils/Utils
DataExtraction/SourceGraphExtractionUtils/Utils
ExecutionPathGraph.cs
ExecutionPathGraph.cs
167:175 (3%)
217:225 (3%)
view
7 x 2 Models/exprsynth
Models/exprsynth
graph2seqmodel.py
seq2graphmodel.py
73:80 (8%)
129:136 (3%)
view
7 x 2 Models/exprsynth
Models/exprsynth
nagdecoder.py
nagdecoder.py
1009:1015 (<1%)
1596:1602 (<1%)
view
7 x 2 Models/exprsynth
Models/exprsynth
contexttokenmodel.py
model.py
224:230 (3%)
288:294 (1%)
view
6 x 2 DataExtraction/SourceGraphExtractionUtils/Utils
DataExtraction/SourceGraphExtractionUtils/Utils
DataFlowGraph.cs
DataFlowGraph.cs
387:394 (1%)
402:409 (1%)
view