apple / swift-corelibs-libdispatch
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
  • 3% duplication:
    • 32,017 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,012 duplicated lines
  • 71 duplicates
system3% (1,012 lines)
Duplication per Extension
c3% (798 lines)
h2% (188 lines)
swift1% (26 lines)
Duplication per Component (primary)
src2% (567 lines)
src/event4% (195 lines)
src/firehose4% (110 lines)
src/shims2% (40 lines)
dispatch4% (36 lines)
src/swift1% (26 lines)
private2% (24 lines)
src/BlocksRuntime2% (14 lines)
cmake0% (0 lines)
cmake/modules0% (0 lines)
config0% (0 lines)
os0% (0 lines)
resolver0% (0 lines)
tools0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 71 duplicates...
Size#FoldersFilesLinesCode
18 x 2 src/event
src/event
event_epoll.c
event_windows.c
690:723 (3%)
955:988 (2%)
view
14 x 2 src
src
io.c
io.c
922:937 (<1%)
991:1006 (<1%)
view
13 x 2 src
src
transform.c
transform.c
659:678 (1%)
895:914 (1%)
view
13 x 2 src/event
src/event
event_windows.c
event_windows.c
652:665 (1%)
698:711 (1%)
view
13 x 2 src
src
introspection.c
introspection.c
736:756 (1%)
844:864 (1%)
view
12 x 2 src
src
io.c
io.c
2438:2453 (<1%)
2512:2526 (<1%)
view
12 x 2 dispatch
src
object.h
internal.h
91:102 (9%)
164:175 (4%)
view
11 x 2 src
src
transform.c
transform.c
692:712 (1%)
930:949 (1%)
view
10 x 2 private
src
introspection_private.h
introspection_internal.h
580:590 (5%)
31:41 (7%)
view
10 x 2 src
src
transform.c
transform.c
715:725 (1%)
952:962 (1%)
view
10 x 2 src/firehose
src/firehose
firehose_server.c
firehose_server.c
547:562 (1%)
1187:1202 (1%)
view
9 x 2 src/event
src/event
event.c
event.c
265:278 (1%)
283:296 (1%)
view
9 x 2 src
src
queue_internal.h
queue_internal.h
959:967 (1%)
993:1001 (1%)
view
9 x 2 src
src
init.c
init.c
975:984 (<1%)
1033:1042 (<1%)
view
9 x 2 src
src
transform.c
transform.c
793:806 (1%)
992:1005 (1%)
view
9 x 2 src
src
transform.c
transform.c
388:402 (1%)
532:546 (1%)
view
9 x 2 src
src
transform.c
transform.c
605:618 (1%)
852:865 (1%)
view
9 x 2 src/firehose
src/firehose
firehose_inline_internal.h
firehose_inline_internal.h
470:478 (3%)
483:491 (3%)
view
8 x 2 src/firehose
src/firehose
firehose_buffer.c
firehose_inline_internal.h
961:970 (<1%)
461:470 (2%)
view
8 x 2 src/firehose
src/firehose
firehose_buffer.c
firehose_inline_internal.h
974:981 (<1%)
476:483 (2%)
view