microsoft / verisol
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
  • 7% duplication:
    • 7,883 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 599 duplicated lines
  • 126 duplicates
system7% (599 lines)
Duplication per Extension
cs7% (599 lines)
Duplication per Component (primary)
Sources/SolToBoogie5% (252 lines)
Sources/SolidityAST15% (202 lines)
Sources/BoogieAST7% (57 lines)
Sources/VeriSol12% (38 lines)
Sources/SolToBoogieTest15% (32 lines)
Sources/ExternalToolsManager8% (18 lines)
Sources/SolidityCFG0% (0 lines)
Sources0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G Sources/SolToBoogieTest Sources/SolToBoogieTest Sources/VeriSol Sources/VeriSol Sources/SolToBoogieTest--Sources/VeriSol 64

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 126 duplicates...
Size#FoldersFilesLinesCode
17 x 2 Sources/SolToBoogie
Sources/SolToBoogie
RevertLogicGenerator.cs
RevertLogicGenerator.cs
473:498 (5%)
591:617 (5%)
view
16 x 2 Sources/BoogieAST
Sources/BoogieAST
BoogieAST.cs
BoogieAST.cs
187:214 (2%)
267:294 (2%)
view
12 x 2 Sources/ExternalToolsManager
Sources/VeriSol
DownloadedToolManager.cs
VeriSolExecuter.cs
97:109 (13%)
409:421 (5%)
view
11 x 2 Sources/BoogieAST
Sources/BoogieAST
BoogieAST.cs
BoogieAST.cs
275:292 (1%)
333:350 (1%)
view
11 x 2 Sources/SolToBoogieTest
Sources/VeriSol
Program.cs
Program.cs
48:67 (34%)
96:115 (16%)
view
11 x 2 Sources/BoogieAST
Sources/BoogieAST
BoogieAST.cs
BoogieAST.cs
195:212 (1%)
333:350 (1%)
view
9 x 2 Sources/SolidityAST
Sources/SolidityAST
SolidityAST.cs
SolidityAST.cs
1192:1211 (1%)
1334:1353 (1%)
view
9 x 2 Sources/SolToBoogie
Sources/SolToBoogie
ProcedureTranslator.cs
ProcedureTranslator.cs
1046:1067 (<1%)
1161:1182 (<1%)
view
9 x 2 Sources/SolToBoogie
Sources/SolToBoogie
FunctionEventResolver.cs
StateVariableResolver.cs
34:48 (17%)
31:45 (19%)
view
9 x 2 Sources/SolToBoogieTest
Sources/VeriSol
RegressionExecutor.cs
Program.cs
142:150 (5%)
37:45 (13%)
view
8 x 2 Sources/SolidityAST
Sources/SolidityAST
SolidityAST.cs
SolidityAST.cs
650:666 (<1%)
685:701 (<1%)
view
8 x 2 Sources/SolToBoogie
Sources/SolToBoogie
ProcedureTranslator.cs
ProcedureTranslator.cs
2844:2854 (<1%)
2899:2909 (<1%)
view
8 x 2 Sources/SolToBoogie
Sources/SolToBoogie
GhostVarAndAxiomGenerator.cs
GhostVarAndAxiomGenerator.cs
362:371 (1%)
413:422 (1%)
view
8 x 2 Sources/SolToBoogie
Sources/SolToBoogie
HarnessGenerator.cs
HarnessGenerator.cs
104:115 (3%)
305:316 (3%)
view
7 x 2 Sources/SolToBoogie
Sources/SolToBoogie
TransUtils.cs
TransUtils.cs
488:496 (1%)
511:519 (1%)
view
7 x 2 Sources/SolToBoogie
Sources/SolToBoogie
ProcedureTranslator.cs
ProcedureTranslator.cs
1817:1827 (<1%)
1941:1952 (<1%)
view
7 x 2 Sources/SolidityAST
Sources/SolidityAST
SolidityAST.cs
SolidityAST.cs
391:401 (<1%)
595:605 (<1%)
view
7 x 2 Sources/SolidityAST
Sources/SolidityAST
SolidityAST.cs
SolidityAST.cs
716:729 (<1%)
843:856 (<1%)
view
7 x 2 Sources/SolidityAST
Sources/SolidityAST
SolidityAST.cs
SolidityAST.cs
215:228 (<1%)
1309:1322 (<1%)
view
7 x 2 Sources/SolidityAST
Sources/SolidityAST
SolidityAST.cs
SolidityAST.cs
843:856 (<1%)
1435:1448 (<1%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
20 x 2 Sources/SolToBoogieTest
Sources/VeriSol
Program.cs
Program.cs
48:68 
96:116 
view
12 x 2 Sources/SolToBoogie
Sources/SolToBoogie
GhostVarAndAxiomGenerator.cs
GhostVarAndAxiomGenerator.cs
497:513 
514:530 
view
10 x 2 Sources/SolidityAST
Sources/SolidityAST
SolidityAST.cs
SolidityAST.cs
1192:1202 
1334:1344 
view
7 x 2 Sources/SolidityAST
Sources/SolidityAST
SolidityAST.cs
SolidityAST.cs
650:657 
685:692 
view