fbsamples / messenger-platform-samples
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
  • 17% duplication:
    • 1,087 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 187 duplicated lines
  • 39 duplicates
system17% (187 lines)
Duplication per Extension
js19% (187 lines)
Duplication per Component (primary)
node12% (60 lines)
inter-page/support-bot61% (46 lines)
webview38% (44 lines)
inter-page/marketing-bot35% (27 lines)
quick-start10% (10 lines)
handover_protocol0% (0 lines)
handover_protocol/utils0% (0 lines)
webview/public0% (0 lines)
node/public0% (0 lines)
node/views0% (0 lines)

Duplication Between Components (50+ lines)

G inter-page/support-bot inter-page/support-bot webview webview inter-page/support-bot--webview 78 inter-page/marketing-bot inter-page/marketing-bot inter-page/marketing-bot--inter-page/support-bot 54

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 39 duplicates...
Size#FoldersFilesLinesCode
11 x 2 inter-page/support-bot
webview
app.js
app.js
29:51 (14%)
67:89 (9%)
view
10 x 2 quick-start
webview
app.js
app.js
50:69 (10%)
111:130 (8%)
view
10 x 2 inter-page/marketing-bot
inter-page/support-bot
app.js
app.js
97:116 (12%)
74:93 (13%)
view
9 x 2 node
node
app.js
app.js
540:548 (1%)
778:786 (1%)
view
9 x 2 inter-page/marketing-bot
inter-page/support-bot
app.js
app.js
118:129 (11%)
130:141 (12%)
view
8 x 2 node
node
app.js
app.js
540:547 (1%)
576:583 (1%)
view
8 x 2 inter-page/marketing-bot
inter-page/support-bot
app.js
app.js
131:139 (10%)
143:151 (10%)
view
8 x 2 node
node
app.js
app.js
412:419 (1%)
434:441 (1%)
view
8 x 2 node
node
app.js
app.js
576:583 (1%)
778:785 (1%)
view
8 x 2 inter-page/marketing-bot
webview
app.js
app.js
131:139 (10%)
195:203 (7%)
view
8 x 2 inter-page/support-bot
webview
app.js
app.js
143:151 (10%)
195:203 (7%)
view
7 x 2 inter-page/marketing-bot
webview
app.js
app.js
118:125 (9%)
182:189 (6%)
view
7 x 2 inter-page/support-bot
webview
app.js
app.js
130:137 (9%)
182:189 (6%)
view
7 x 2 inter-page/support-bot
webview
app.js
app.js
85:97 (9%)
122:135 (6%)
view
6 x 2 node
node
app.js
app.js
456:461 (1%)
778:783 (1%)
view
6 x 2 node
node
app.js
app.js
412:417 (1%)
540:545 (1%)
view
6 x 2 node
node
app.js
app.js
500:505 (1%)
778:783 (1%)
view
6 x 2 node
node
app.js
app.js
478:483 (1%)
540:545 (1%)
view
6 x 2 node
node
app.js
app.js
456:461 (1%)
478:483 (1%)
view
6 x 2 node
node
app.js
app.js
412:417 (1%)
456:461 (1%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
15 x 2 node
node
app.js
app.js
411:427 
433:449 
view
9 x 2 node
node
app.js
app.js
726:737 
743:754 
view