awslabs / graphql-schema-utilities
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
  • 25% duplication:
    • 1,040 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 260 duplicated lines
  • 12 duplicates
system25% (260 lines)
Duplication per Extension
graphql65% (260 lines)
Duplication per Component (primary)
fixtures/invalidSchemas/dataTypes100% (105 lines)
fixtures/schema/dataTypes100% (105 lines)
fixtures/expectedOutput/directiveSchemas33% (18 lines)
fixtures/invalidSchemas72% (16 lines)
fixtures/schema76% (16 lines)
fixtures/queries0% (0 lines)
fixtures/queries/invalid0% (0 lines)
fixtures/directiveSchemas0% (0 lines)
fixtures/expectedOutput/helloWorld0% (0 lines)
fixtures/helloWorld0% (0 lines)
src0% (0 lines)

Duplication Between Components (50+ lines)

G fixtures/invalidSchemas/dataTypes fixtures/invalidSchemas/dataTypes fixtures/schema/dataTypes fixtures/schema/dataTypes fixtures/invalidSchemas/dataTypes--fixtures/schema/dataTypes 210

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 12 longest duplicates.
See data for all 12 duplicates...
Size#FoldersFilesLinesCode
20 x 2 fixtures/invalidSchemas/dataTypes/ships
fixtures/schema/dataTypes/ships
starship.graphql
starship.graphql
1:20 (100%)
1:20 (100%)
view
18 x 2 fixtures/invalidSchemas/dataTypes/ships
fixtures/schema/dataTypes/ships
vehicle.graphql
vehicle.graphql
1:18 (100%)
1:18 (100%)
view
18 x 2 fixtures/invalidSchemas/dataTypes/characters
fixtures/schema/dataTypes/characters
people.graphql
people.graphql
1:18 (100%)
1:18 (100%)
view
17 x 2 fixtures/invalidSchemas/dataTypes/characters
fixtures/schema/dataTypes/characters
species.graphql
species.graphql
1:17 (100%)
1:17 (100%)
view
16 x 2 fixtures/invalidSchemas
fixtures/schema
rootQuery.graphql
rootQuery.graphql
1:17 (84%)
1:17 (88%)
view
16 x 2 fixtures/invalidSchemas/dataTypes
fixtures/schema/dataTypes
film.graphql
film.graphql
1:16 (100%)
1:16 (100%)
view
16 x 2 fixtures/invalidSchemas/dataTypes
fixtures/schema/dataTypes
planet.graphql
planet.graphql
1:16 (100%)
1:16 (100%)
view
9 x 2 fixtures/expectedOutput/directiveSchemas
fixtures/expectedOutput/directiveSchemas
printedDefault.graphql
printedWithDirectives.graphql
1:12 (33%)
1:12 (33%)
view
7 x 2 fixtures/invalidSchemas/dataTypes/ships
fixtures/schema/dataTypes/ships
vehicle.graphql
starship.graphql
12:18 (38%)
14:20 (35%)
view
7 x 2 fixtures/invalidSchemas/dataTypes/ships
fixtures/schema/dataTypes/ships
starship.graphql
vehicle.graphql
14:20 (35%)
12:18 (38%)
view
7 x 2 fixtures/invalidSchemas/dataTypes/ships
fixtures/invalidSchemas/dataTypes/ships
starship.graphql
vehicle.graphql
14:20 (35%)
12:18 (38%)
view
7 x 2 fixtures/schema/dataTypes/ships
fixtures/schema/dataTypes/ships
starship.graphql
vehicle.graphql
14:20 (35%)
12:18 (38%)
view