aws-samples / aws-gamelift-and-serverless-backend-sample
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
  • 29% duplication:
    • 5,380 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,597 duplicated lines
  • 448 duplicates
system29% (1,597 lines)
Duplication per Extension
asset27% (452 lines)
prefab96% (416 lines)
unity29% (390 lines)
mat88% (205 lines)
yaml20% (86 lines)
js16% (28 lines)
cs2% (20 lines)
Duplication per Component (primary)
GameLiftExampleUnityProject/Assets/PrefabsAndMaterials94% (621 lines)
GameLiftExampleUnityProject/ProjectSettings27% (452 lines)
GameLiftExampleUnityProject/Assets/Scenes29% (390 lines)
FleetDeployment15% (48 lines)
GameServiceAPI21% (38 lines)
GameServiceAPI/gameservice16% (28 lines)
GameLiftExampleUnityProject/Assets/Scripts/NetworkingShared14% (20 lines)
GameLiftExampleUnityProject/Assets/Scripts0% (0 lines)
GameLiftExampleUnityProject/Assets/Scripts/Client0% (0 lines)
GameLiftExampleUnityProject/Assets/Scripts/Server0% (0 lines)
CppServerAndClient/Client0% (0 lines)
CppServerAndClient/Server0% (0 lines)

Duplication Between Components (50+ lines)

G GameLiftExampleUnityProject/Assets/PrefabsAndMaterials GameLiftExampleUnityProject/Assets/PrefabsAndMaterials GameLiftExampleUnityProject/Assets/Scenes GameLiftExampleUnityProject/Assets/Scenes GameLiftExampleUnityProject/Assets/PrefabsAndMaterials--GameLiftExampleUnityProject/Assets/Scenes 414

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 448 duplicates...
Size#FoldersFilesLinesCode
108 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProj...ets/PrefabsAndMaterials
EnemyCharacter.prefab
SimpleCharacter.prefab
1:108 (51%)
1:108 (48%)
view
55 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProj...ets/PrefabsAndMaterials
mat
EnemyMaterial.mat
PlayerMaterial.mat
11:65 (71%)
11:65 (71%)
view
52 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProj...ets/PrefabsAndMaterials
EnemyCharacter.prefab
SimpleCharacter.prefab
157:208 (25%)
158:209 (23%)
view
50 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProj...ets/PrefabsAndMaterials
mat
GroundMaterial.mat
PlayerMaterial.mat
13:62 (64%)
13:62 (64%)
view
50 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProj...ets/PrefabsAndMaterials
mat
EnemyMaterial.mat
GroundMaterial.mat
13:62 (64%)
13:62 (64%)
view
45 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProj...ets/PrefabsAndMaterials
EnemyCharacter.prefab
SimpleCharacter.prefab
111:155 (21%)
112:156 (20%)
view
32 x 2 GameLiftExampleUnityProject/Assets/Scenes
GameLiftExampleUnityProject/Assets/Scenes
GameWorld.unity
GameWorld.unity
651:682 (2%)
744:775 (2%)
view
32 x 2 GameLiftExampleUnityProject/Assets/Scenes
GameLiftExampleUnityProject/Assets/Scenes
GameWorld.unity
GameWorld.unity
458:489 (2%)
744:775 (2%)
view
32 x 2 GameLiftExampleUnityProject/Assets/Scenes
GameLiftExampleUnityProject/Assets/Scenes
GameWorld.unity
GameWorld.unity
651:682 (2%)
1000:1031 (2%)
view
32 x 2 GameLiftExampleUnityProject/Assets/Scenes
GameLiftExampleUnityProject/Assets/Scenes
GameWorld.unity
GameWorld.unity
458:489 (2%)
651:682 (2%)
view
32 x 2 GameLiftExampleUnityProject/Assets/Scenes
GameLiftExampleUnityProject/Assets/Scenes
GameWorld.unity
GameWorld.unity
458:489 (2%)
1000:1031 (2%)
view
32 x 2 GameLiftExampleUnityProject/Assets/Scenes
GameLiftExampleUnityProject/Assets/Scenes
GameWorld.unity
GameWorld.unity
744:775 (2%)
1000:1031 (2%)
view
24 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProject/Assets/Scenes
EnemyCharacter.prefab
GameWorld.unity
58:81 (11%)
659:682 (1%)
view
24 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProject/Assets/Scenes
SimpleCharacter.prefab
GameWorld.unity
58:81 (10%)
659:682 (1%)
view
24 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProject/Assets/Scenes
EnemyCharacter.prefab
GameWorld.unity
58:81 (11%)
1008:1031 (1%)
view
24 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProject/Assets/Scenes
SimpleCharacter.prefab
GameWorld.unity
58:81 (10%)
1008:1031 (1%)
view
24 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProject/Assets/Scenes
SimpleCharacter.prefab
GameWorld.unity
58:81 (10%)
466:489 (1%)
view
24 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProject/Assets/Scenes
EnemyCharacter.prefab
GameWorld.unity
58:81 (11%)
466:489 (1%)
view
24 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProject/Assets/Scenes
SimpleCharacter.prefab
GameWorld.unity
58:81 (10%)
752:775 (1%)
view
24 x 2 GameLiftExampleUnityProj...ets/PrefabsAndMaterials
GameLiftExampleUnityProject/Assets/Scenes
EnemyCharacter.prefab
GameWorld.unity
58:81 (11%)
752:775 (1%)
view