openai / openai-support-agent-demo
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
  • 4% duplication:
    • 2,748 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 128 duplicated lines
  • 10 duplicates
system4% (128 lines)
dependency graphs: 2D graph | 2D graph (with duplicates)... | 3D graph | 3D graph (with duplicates)...
Duplication per Extension
ts6% (84 lines)
tsx3% (44 lines)
Duplication per Component (primary)
components4% (44 lines)
app7% (44 lines)
config7% (40 lines)
stores0% (0 lines)
ROOT0% (0 lines)
lib0% (0 lines)
Longest Duplicates
The list of 10 longest duplicates.
See data for all 10 duplicates...
Size#FoldersFilesLinesCode
11 x 2 config
config
153:163 (5%)
179:189 (5%)
view
9 x 2 config
config
165:173 (4%)
191:199 (4%)
view
8 x 2 components/ui
components/ui
89:96 (8%)
85:92 (9%)
view
8 x 2 components
components
30:37 (16%)
43:50 (16%)
view
7 x 2 app/api/complaints/create
app/api/tickets/create
8:14 (46%)
8:14 (46%)
view
6 x 2 app/api/orders/[order_id]/create_refund
app/api/orders/[order_id]/send_replacement
1:6 (35%)
1:6 (37%)
view
6 x 2 components
components
51:56 (6%)
67:72 (6%)
view
6 x 2 app/api/users/[user_id]/reset_password
app/api/users/[user_id]/update_info
1:6 (40%)
1:6 (33%)
view
6 x 2 app/api/orders/[order_id]/create_refund
app/api/orders/[order_id]/create_return
1:6 (35%)
1:6 (35%)
view
6 x 2 app/api/orders/[order_id]/create_return
app/api/orders/[order_id]/send_replacement
1:6 (35%)
1:6 (37%)
view
Most Frequent Duplicates
The list of 1 most frequently found duplicates.
Size#FoldersFilesLinesCode
6 x 3 app/api/orders/[order_id]/create_refund
app/api/orders/[order_id]/send_replacement
app/api/orders/[order_id]/create_return
1:6 (35%)
1:6 (37%)
1:6 (35%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
15 x 2 app/api/tickets/create
app/api/complaints/create
1:18 
1:18 
view