apple / swift-llbuild2
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
  • 11% duplication:
    • 14,811 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,727 duplicated lines
  • 315 duplicates
system11% (1,727 lines)
Duplication per Extension
swift10% (1,160 lines)
proto13% (567 lines)
Duplication per Component (primary)
Sources/BazelRemoteAPI12% (638 lines)
Protos/BazelRemoteAPI11% (409 lines)
Sources/LLBBuildSystem14% (401 lines)
Protos/BuildSystem29% (140 lines)
Sources/llbuild26% (55 lines)
Sources/llbuild2fx3% (48 lines)
Protos/EngineProtocol13% (18 lines)
Sources/LLBBazelBackend7% (12 lines)
Sources/LLBBuildSystemTestHelpers8% (6 lines)
ROOT0% (0 lines)
Sources/LLBBuildSystemUtil0% (0 lines)
Sources/LLBCASTool0% (0 lines)
Sources/LLBCommands0% (0 lines)
Sources/LLBNinja0% (0 lines)
Sources/LLBUtil0% (0 lines)
Sources/Tools0% (0 lines)

Duplication Between Components (50+ lines)

G Protos/BuildSystem Protos/BuildSystem Protos/EngineProtocol Protos/EngineProtocol Protos/BuildSystem--Protos/EngineProtocol 104 Sources/BazelRemoteAPI Sources/BazelRemoteAPI Sources/llbuild2 Sources/llbuild2 Sources/BazelRemoteAPI--Sources/llbuild2 80

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 315 duplicates...
Size#FoldersFilesLinesCode
44 x 2 Sources/LLBBuildSystem/G...d/BuildSystem/Execution
Sources/LLBBuildSystem/G...d/BuildSystem/Execution
action.pb.swift
action_execution.pb.swift
407:467 (15%)
373:433 (16%)
view
28 x 2 Sources/BazelRemoteAPI/G...d/bazel/remote/asset/v1
Sources/BazelRemoteAPI/G...d/bazel/remote/asset/v1
remote_asset.pb.swift
remote_asset.pb.swift
542:582 (6%)
654:694 (6%)
view
25 x 2 Protos/BazelRemoteAPI/re...d/bazel/remote/asset/v1
Protos/BazelRemoteAPI/re...d/bazel/remote/asset/v1
proto
remote_asset.proto
remote_asset.proto
179:206 (6%)
258:285 (6%)
view
23 x 2 Sources/LLBBuildSystem/Rules
Sources/LLBBuildSystem/Rules
RuleContext.swift
RuleContext.swift
236:258 (8%)
270:292 (8%)
view
20 x 2 Protos/BazelRemoteAPI/re...d/bazel/remote/asset/v1
Protos/BazelRemoteAPI/re...d/bazel/remote/asset/v1
proto
remote_asset.proto
remote_asset.proto
209:232 (4%)
288:311 (4%)
view
17 x 2 Sources/BazelRemoteAPI/G...d/bazel/remote/asset/v1
Sources/BazelRemoteAPI/G...d/bazel/remote/asset/v1
remote_asset.pb.swift
remote_asset.pb.swift
82:146 (3%)
225:283 (3%)
view
16 x 2 Sources/BazelRemoteAPI/G...zel/remote/execution/v2
Sources/llbuild2/Generated/EngineProtocol
remote_execution.pb.swift
action_execution.pb.swift
2692:2717 (<1%)
397:422 (4%)
view
16 x 2 Sources/BazelRemoteAPI/G...zel/remote/execution/v2
Sources/BazelRemoteAPI/G...zel/remote/execution/v2
remote_execution.pb.swift
remote_execution.pb.swift
2622:2647 (<1%)
2780:2805 (<1%)
view
16 x 2 Sources/BazelRemoteAPI/G...d/bazel/remote/asset/v1
Sources/BazelRemoteAPI/G...zel/remote/execution/v2
remote_asset.pb.swift
remote_execution.pb.swift
504:529 (3%)
2780:2805 (<1%)
view
16 x 2 Sources/BazelRemoteAPI/G...zel/remote/execution/v2
Sources/llbuild2/Generated/EngineProtocol
remote_execution.pb.swift
action_execution.pb.swift
2780:2805 (<1%)
397:422 (4%)
view
16 x 2 Sources/BazelRemoteAPI/G...zel/remote/execution/v2
Sources/llbuild2/Generated/EngineProtocol
remote_execution.pb.swift
action_execution.pb.swift
2622:2647 (<1%)
397:422 (4%)
view
16 x 2 Sources/BazelRemoteAPI/G...d/bazel/remote/asset/v1
Sources/llbuild2/Generated/EngineProtocol
remote_asset.pb.swift
action_execution.pb.swift
504:529 (3%)
397:422 (4%)
view
16 x 2 Sources/BazelRemoteAPI/G...zel/remote/execution/v2
Sources/BazelRemoteAPI/G...zel/remote/execution/v2
remote_execution.pb.swift
remote_execution.pb.swift
2622:2647 (<1%)
2692:2717 (<1%)
view
16 x 2 Sources/BazelRemoteAPI/G...d/bazel/remote/asset/v1
Sources/BazelRemoteAPI/G...zel/remote/execution/v2
remote_asset.pb.swift
remote_execution.pb.swift
504:529 (3%)
2622:2647 (<1%)
view
16 x 2 Sources/BazelRemoteAPI/G...zel/remote/execution/v2
Sources/BazelRemoteAPI/G...zel/remote/execution/v2
remote_execution.pb.swift
remote_execution.pb.swift
2692:2717 (<1%)
2780:2805 (<1%)
view
16 x 2 Sources/BazelRemoteAPI/G...d/bazel/remote/asset/v1
Sources/BazelRemoteAPI/G...zel/remote/execution/v2
remote_asset.pb.swift
remote_execution.pb.swift
504:529 (3%)
2692:2717 (<1%)
view
15 x 2 Protos/BazelRemoteAPI/googleapis/google/api
Protos/BazelRemoteAPI/googleapis/google/api
proto
annotations.proto
http.proto
1:17 (57%)
1:17 (4%)
view
15 x 2 Protos/BazelRemoteAPI/googleapis/google/rpc
Protos/BazelRemoteAPI/googleapis/google/rpc
proto
code.proto
error_details.proto
1:17 (9%)
1:17 (6%)
view
15 x 2 Protos/BazelRemoteAPI/googleapis/google/rpc
Protos/BazelRemoteAPI/googleapis/google/rpc
proto
error_details.proto
status.proto
1:17 (6%)
1:17 (37%)
view
15 x 2 Protos/BazelRemoteAPI/googleapis/google/rpc
Protos/BazelRemoteAPI/googleapis/google/rpc
proto
code.proto
status.proto
1:17 (9%)
1:17 (37%)
view