microsoft / axe-windows
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
  • 14% duplication:
    • 21,935 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,267 duplicated lines
  • 482 duplicates
system14% (3,267 lines)
Duplication per Extension
cs14% (2,999 lines)
yml52% (204 lines)
vcxproj20% (26 lines)
html41% (20 lines)
xaml13% (18 lines)
Duplication per Component (primary)
src/RulesTest31% (1,935 lines)
src/Desktop6% (237 lines)
src/Rules5% (212 lines)
build45% (204 lines)
src/CLITests21% (183 lines)
src/AutomationTests18% (141 lines)
src/ActionsTests29% (82 lines)
src/Core3% (66 lines)
src/Actions3% (31 lines)
src/CoreTests4% (30 lines)
tools/WildlifeManager19% (27 lines)
tools/Win32ControlSampler11% (26 lines)
src/CurrentFileVersionCompatibilityTests23% (26 lines)
src/OldFileVersionCompatibilityTests43% (26 lines)
ROOT41% (20 lines)
src/TelemetryTests11% (12 lines)
tools/WpfControlSampler13% (9 lines)
src/Automation0% (0 lines)
src/CI0% (0 lines)
src/CLI0% (0 lines)
src/CLI_Installer0% (0 lines)
src/DesktopTests0% (0 lines)
src/InteropDummy0% (0 lines)
src/RuleSelection0% (0 lines)
src/RuleSelectionTests0% (0 lines)
src/RulesMD0% (0 lines)
src/SystemAbstractions0% (0 lines)
src/SystemAbstractionsTests0% (0 lines)
src/Telemetry0% (0 lines)
src/UnitTestSharedLibrary0% (0 lines)
src/Win320% (0 lines)
src/Win32Tests0% (0 lines)
src/props0% (0 lines)
tools/WindowsFormsControlSampler0% (0 lines)
tools/scripts0% (0 lines)

Duplication Between Components (50+ lines)

G src/CurrentFileVersionCompatibilityTests src/CurrentFileVersionCompatibilityTests src/OldFileVersionCompatibilityTests src/OldFileVersionCompatibilityTests src/CurrentFileVersionCompatibilityTests--src/OldFileVersionCompatibilityTests 52

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 482 duplicates...
Size#FoldersFilesLinesCode
73 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
227:301 (7%)
369:443 (7%)
view
42 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
258:301 (4%)
826:869 (4%)
view
42 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
400:443 (4%)
826:869 (4%)
view
41 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
401:443 (4%)
685:727 (4%)
view
41 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
259:301 (4%)
685:727 (4%)
view
41 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
685:727 (4%)
827:869 (4%)
view
37 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
189:225 (3%)
757:793 (3%)
view
36 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
363:398 (3%)
647:682 (3%)
view
36 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
102:137 (3%)
812:847 (3%)
view
35 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
38:72 (3%)
464:498 (3%)
view
34 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
188:221 (3%)
472:505 (3%)
view
33 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
507:539 (3%)
649:681 (3%)
view
33 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
473:505 (3%)
757:789 (3%)
view
33 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
451:483 (3%)
877:909 (3%)
view
33 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
365:397 (3%)
507:539 (3%)
view
31 x 2 src/RulesTest/Library
src/RulesTest/Library
ButtonInvokeAndExpandCollapsePatterns.cs
ButtonToggleAndExpandCollapsePatterns.cs
17:89 (83%)
17:89 (83%)
view
30 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
654:683 (3%)
796:825 (3%)
view
30 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
227:256 (3%)
653:682 (3%)
view
29 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
370:398 (2%)
796:824 (2%)
view
29 x 2 src/RulesTest
src/RulesTest
MonsterTest.cs
MonsterTest.cs
227:255 (2%)
511:539 (2%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 35 unit duplicates...
Size#FoldersFilesLinesCode
20 x 2 src/RulesTest/Library
src/RulesTest/Library
ListItemSiblingUniqueTests.cs
ListItemSiblingUniqueTests.cs
62:83 
110:131 
view
20 x 2 src/RulesTest/Library
src/RulesTest/Library
SiblingUniqueAndNotFocusableTest.cs
SiblingUniqueAndNotFocusableTest.cs
14:35 
38:59 
view
18 x 2 src/Core/Misc
src/Core/Misc
ExtensionMethods.cs
ExtensionMethods.cs
140:162 
169:192 
view
14 x 2 src/RulesTest/Library
src/RulesTest/Library
BoundingRectangleNotNullTest.cs
BoundingRectangleNotNullTest.cs
34:49 
52:67 
view
13 x 2 src/RulesTest/PropertyConditions
src/RulesTest/PropertyConditions
ElementGroupsTests.cs
ElementGroupsTests.cs
120:134 
137:151 
view
12 x 2 src/CLITests
src/CLITests
OptionsEvaluatorUnitTests.cs
OptionsEvaluatorUnitTests.cs
91:103 
107:119 
view
10 x 2 src/Rules/Library
src/Rules/Library
SiblingUniqueAndFocusable.cs
SiblingUniqueAndNotFocusable.cs
45:57 
44:56 
view
10 x 2 src/RulesTest/Library
src/RulesTest/Library
IsKeyboardFocusableShouldBeTrue.cs
IsKeyboardFocusableShouldBeTrue.cs
169:180 
183:194 
view
10 x 2 src/RulesTest/Library
src/RulesTest/Library
ParentChildShouldNotHaveSameNameAndLo...
ParentChildShouldNotHaveSameNameAndLo...
50:61 
64:75 
view
9 x 2 src/Actions/Actions
src/Actions/Trackers
DataManager.cs
BaseTracker.cs
225:236 
119:129 
view
9 x 2 src/RulesTest/PropertyConditions
src/RulesTest/PropertyConditions
RelationshipsTest.cs
RelationshipsTest.cs
223:233 
250:260 
view
9 x 2 src/RulesTest/PropertyConditions
src/RulesTest/PropertyConditions
StringPropertiesTest.cs
StringPropertiesTest.cs
321:331 
334:344 
view
8 x 5 src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
CustomNavigationPattern.cs
DockPattern.cs
DragPattern.cs
DropTargetPattern.cs
ExpandCollapsePattern.cs
35:44 
38:47 
72:81 
47:56 
53:62 
view
8 x 29 src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
src/Desktop/UIAutomation/Patterns
...
GridItemPattern.cs
GridPattern.cs
InvokePattern.cs
ItemContainerPattern.cs
LegacyIAccessiblePattern.cs
MultipleViewPattern.cs
ObjectModelPattern.cs
RangeValuePattern.cs
ScrollItemPattern.cs
ScrollPattern.cs
...
52:61 
41:50 
30:39 
34:43 
82:91 
49:58 
30:39 
43:52 
32:41 
45:54 
...
view
8 x 2 src/RulesTest/Library
src/RulesTest/Library
ClickablePointOffScreen.cs
ClickablePointOnScreen.cs
24:32 
24:32 
view
8 x 2 src/RulesTest/Library
src/RulesTest/Library
ComboBoxShouldNotSupportScrollPattern...
ControlShouldNotSupportScrollPatternT...
19:28 
20:29 
view
8 x 2 src/RulesTest/Library
src/RulesTest/Library
ComboBoxShouldNotSupportScrollPattern...
ControlShouldNotSupportScrollPatternT...
31:40 
32:41 
view
8 x 2 src/RulesTest/PropertyConditions
src/RulesTest/PropertyConditions
StringPropertiesTest.cs
StringPropertiesTest.cs
225:233 
247:255 
view
8 x 2 src/RulesTest/PropertyConditions
src/RulesTest/PropertyConditions
StringPropertiesTest.cs
StringPropertiesTest.cs
236:244 
258:266 
view
7 x 2 src/Core/Types
src/Core/Types
ControlType.cs
LandmarkType.cs
87:96 
56:66 
view