microsoft / cppgraphqlgen
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
  • 13% duplication:
    • 12,772 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,744 duplicated lines
  • 220 duplicates
system13% (1,744 lines)
Duplication per Extension
h27% (990 lines)
cpp7% (672 lines)
in73% (60 lines)
cmake10% (22 lines)
Duplication per Component (primary)
src7% (636 lines)
src/introspection38% (388 lines)
include/graphqlservice/introspection100% (352 lines)
include/graphqlservice/internal8% (118 lines)
include/graphqlservice11% (112 lines)
cmake28% (82 lines)
include9% (56 lines)

Duplication Between Components (50+ lines)

G include/graphqlservice/introspection include/graphqlservice/introspection src/introspection src/introspection include/graphqlservice/introspection--src/introspection 704

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 220 duplicates...
Size#FoldersFilesLinesCode
74 x 2 include/graphqlservice/introspection
src/introspection
IntrospectionSchema.h
IntrospectionSchema.h
14:109 (100%)
14:109 (100%)
view
63 x 2 include/graphqlservice/introspection
src/introspection
TypeObject.h
TypeObject.h
13:119 (100%)
13:119 (100%)
view
47 x 2 include/graphqlservice/introspection
src/introspection
SchemaObject.h
SchemaObject.h
13:91 (100%)
13:91 (100%)
view
47 x 2 include/graphqlservice/introspection
src/introspection
FieldObject.h
FieldObject.h
13:91 (100%)
13:91 (100%)
view
43 x 2 include/graphqlservice/introspection
src/introspection
DirectiveObject.h
DirectiveObject.h
13:84 (100%)
13:84 (100%)
view
39 x 2 include/graphqlservice/introspection
src/introspection
EnumValueObject.h
EnumValueObject.h
13:77 (100%)
13:77 (100%)
view
39 x 2 include/graphqlservice/introspection
src/introspection
InputValueObject.h
InputValueObject.h
13:77 (100%)
13:77 (100%)
view
21 x 2 include/graphqlservice
include/graphqlservice
GraphQLService.h
GraphQLService.h
307:353 (3%)
436:482 (3%)
view
20 x 2 include/graphqlservice/internal
include/graphqlservice/internal
SortedMap.h
SortedMap.h
39:87 (11%)
234:282 (11%)
view
20 x 2 src
src
RequestLoader.cpp
RequestLoader.cpp
438:460 (3%)
489:511 (3%)
view
18 x 2 src
src
GraphQLService.cpp
Validation.cpp
311:345 (1%)
116:150 (1%)
view
17 x 2 src
src
ClientGenerator.cpp
SchemaGenerator.cpp
39:73 (3%)
34:68 (<1%)
view
17 x 2 include/graphqlservice
include/graphqlservice
GraphQLService.h
GraphQLService.h
360:387 (2%)
484:511 (2%)
view
15 x 2 src
src
ClientGenerator.cpp
SchemaGenerator.cpp
924:952 (2%)
3027:3055 (<1%)
view
15 x 2 src
src
GeneratorLoader.cpp
Validation.cpp
67:95 (20%)
122:150 (1%)
view
15 x 2 src
src
GeneratorLoader.cpp
GraphQLService.cpp
67:95 (20%)
317:345 (1%)
view
14 x 2 include/graphqlservice
include/graphqlservice/internal
GraphQLService.h
Awaitable.h
436:466 (2%)
109:139 (21%)
view
14 x 2 cmake
cmake
in
Generator.rc.in
Library.rc.in
4:20 (38%)
4:20 (38%)
view
14 x 2 include/graphqlservice
include/graphqlservice/internal
GraphQLService.h
Awaitable.h
307:337 (2%)
109:139 (21%)
view
13 x 2 src
src
SchemaGenerator.cpp
SchemaGenerator.cpp
1699:1720 (<1%)
2252:2273 (<1%)
view
Duplicated Units
The list of top 16 duplicated units.
See data for all 16 unit duplicates...
Size#FoldersFilesLinesCode
38 x 2 src
src
GraphQLService.cpp
Validation.cpp
309:347 
114:152 
view
17 x 2 src
src
RequestLoader.cpp
Validation.cpp
990:1007 
850:867 
view
14 x 2 src
src
GeneratorLoader.cpp
Validation.cpp
12:26 
289:303 
view
11 x 2 src
src
GraphQLResponse.cpp
GraphQLResponse.cpp
65:78 
104:117 
view
10 x 2 src
src
ClientGenerator.cpp
SchemaGenerator.cpp
47:57 
42:52 
view
10 x 2 src
src
ClientGenerator.cpp
SchemaGenerator.cpp
59:69 
54:64 
view
9 x 2 include/graphqlservice
include/graphqlservice
GraphQLService.h
GraphQLService.h
364:373 
488:497 
view
8 x 2 src
src
GraphQLResponse.cpp
GraphQLResponse.cpp
195:205 
208:218 
view
7 x 2 src
src
GraphQLClient.cpp
GraphQLClient.cpp
226:234 
254:262 
view
7 x 2 src
src
Schema.cpp
Schema.cpp
232:240 
285:293 
view
6 x 5 src/introspection
src/introspection
src/introspection
src/introspection
src/introspection
DirectiveObject.cpp
EnumValueObject.cpp
FieldObject.cpp
InputValueObject.cpp
TypeObject.cpp
53:60 
51:58 
55:62 
52:59 
70:77 
view
6 x 6 src/introspection
src/introspection
src/introspection
src/introspection
src/introspection
src/introspection
DirectiveObject.cpp
EnumValueObject.cpp
FieldObject.cpp
InputValueObject.cpp
SchemaObject.cpp
TypeObject.cpp
62:69 
60:67 
64:71 
61:68 
55:62 
79:86 
view
6 x 2 src/introspection
src/introspection
DirectiveObject.cpp
FieldObject.cpp
80:87 
73:80 
view
6 x 2 src/introspection
src/introspection
EnumValueObject.cpp
FieldObject.cpp
69:76 
91:98 
view
6 x 2 src/introspection
src/introspection
EnumValueObject.cpp
FieldObject.cpp
78:85 
100:107 
view
6 x 2 src/introspection
src/introspection
FieldObject.cpp
InputValueObject.cpp
82:89 
70:77 
view