microsoft / ModSecurity
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
  • 22% duplication:
    • 53,731 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 11,938 duplicated lines
  • 872 duplicates
system22% (11,938 lines)
Duplication per Extension
in93% (6,404 lines)
c15% (4,695 lines)
cpp15% (401 lines)
vcxproj41% (222 lines)
h1% (216 lines)
Duplication per Component (primary)
doc99% (6,404 lines)
apache211% (4,600 lines)
iis20% (372 lines)
standalone13% (367 lines)
alp28% (87 lines)
mlogc4% (63 lines)
ext22% (45 lines)
ROOT0% (0 lines)
build0% (0 lines)
nginx0% (0 lines)
tools0% (0 lines)
validator0% (0 lines)

Duplication Between Components (50+ lines)

G apache2 apache2 standalone standalone apache2--standalone 284 mlogc mlogc apache2--mlogc 102 iis iis iis--standalone 111

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 872 duplicates...
Size#FoldersFilesLinesCode
1008 x 2 doc
doc
in
doxygen-nginx.in
doxygen-standalone.in
785:2072 (62%)
785:2072 (62%)
view
1008 x 2 doc
doc
in
doxygen-apache.in
doxygen-nginx.in
785:2072 (62%)
785:2072 (62%)
view
1008 x 2 doc
doc
in
doxygen-apache.in
doxygen-standalone.in
785:2072 (62%)
785:2072 (62%)
view
1008 x 2 doc
doc
in
doxygen-apache.in
doxygen-iis.in
785:2072 (62%)
785:2072 (62%)
view
1008 x 2 doc
doc
in
doxygen-iis.in
doxygen-nginx.in
785:2072 (62%)
785:2072 (62%)
view
1008 x 2 doc
doc
in
doxygen-iis.in
doxygen-standalone.in
785:2072 (62%)
785:2072 (62%)
view
548 x 2 doc
doc
in
doxygen-apache.in
doxygen-standalone.in
63:781 (34%)
63:781 (34%)
view
548 x 2 doc
doc
in
doxygen-apache.in
doxygen-iis.in
63:781 (34%)
63:781 (34%)
view
548 x 2 doc
doc
in
doxygen-apache.in
doxygen-nginx.in
63:781 (34%)
63:781 (34%)
view
548 x 2 doc
doc
in
doxygen-iis.in
doxygen-standalone.in
63:781 (34%)
63:781 (34%)
view
548 x 2 doc
doc
in
doxygen-nginx.in
doxygen-standalone.in
63:781 (34%)
63:781 (34%)
view
548 x 2 doc
doc
in
doxygen-iis.in
doxygen-nginx.in
63:781 (34%)
63:781 (34%)
view
56 x 2 apache2
standalone
msc_remote_rules.c
config.c
162:237 (14%)
608:689 (8%)
view
54 x 2 apache2
apache2
re_operators.c
re_operators.c
1760:1842 (1%)
1871:1948 (1%)
view
52 x 2 apache2
standalone
msc_remote_rules.c
config.c
87:159 (13%)
530:606 (7%)
view
44 x 2 apache2
apache2
msc_logging.c
msc_logging.c
848:925 (3%)
1709:1786 (3%)
view
41 x 2 apache2
apache2
re_operators.c
re_operators.c
2830:2893 (1%)
3430:3492 (1%)
view
41 x 2 apache2
apache2
re_operators.c
re_operators.c
2830:2893 (1%)
3138:3200 (1%)
view
41 x 2 apache2
apache2
re_operators.c
re_operators.c
3138:3200 (1%)
3430:3492 (1%)
view
38 x 2 apache2
apache2
msc_logging.c
msc_logging.c
662:741 (3%)
1549:1628 (3%)
view
Duplicated Units
The list of top 8 duplicated units.
See data for all 8 unit duplicates...
Size#FoldersFilesLinesCode
41 x 2 apache2
apache2
re_operators.c
re_operators.c
682:729 
912:959 
view
35 x 2 apache2
apache2
re_variables.c
re_variables.c
854:898 
926:970 
view
32 x 2 apache2
apache2
re_variables.c
re_variables.c
205:249 
299:343 
view
32 x 2 apache2
apache2
re_variables.c
re_variables.c
253:295 
347:389 
view
15 x 2 apache2/libinjection
apache2/libinjection
libinjection_sqli.c
libinjection_sqli.c
816:837 
845:866 
view
14 x 2 apache2
apache2
re_operators.c
re_operators.c
1604:1624 
2712:2731 
view
10 x 2 apache2
ext
re_variables.c
mod_var_remote_addr_port.c
27:40 
30:43 
view
6 x 2 apache2
mlogc
msc_util.c
mlogc.c
1069:1077 
252:260 
view