microsoft / cs_comments_service
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:
    • 5,794 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 228 duplicated lines
  • 17 duplicates
system3% (228 lines)
Duplication per Extension
rb3% (182 lines)
rake6% (34 lines)
js11% (12 lines)
Duplication per Component (primary)
spec3% (120 lines)
api11% (48 lines)
lib4% (34 lines)
models1% (14 lines)
scripts11% (12 lines)
ROOT0% (0 lines)
config0% (0 lines)
edx_specs0% (0 lines)
locale0% (0 lines)
presenters0% (0 lines)
Longest Duplicates
The list of 17 longest duplicates.
See data for all 17 duplicates...
Size#FoldersFilesLinesCode
12 x 2 spec/api
spec/api
comment_thread_spec.rb
notifications_and_subscriptions_spec.rb
107:118 (1%)
20:32 (9%)
view
12 x 2 spec/api
spec/api
notifications_spec.rb
notifications_spec.rb
105:119 (9%)
134:148 (9%)
view
11 x 2 api
api
comment_threads.rb
notifications_and_subscriptions.rb
10:20 (13%)
8:18 (47%)
view
11 x 2 api
api
comment_threads.rb
commentables.rb
6:17 (13%)
10:21 (22%)
view
10 x 2 lib/tasks
lib/tasks
rake
kpis.rake
kpis.rake
25:35 (9%)
52:62 (9%)
view
9 x 2 spec/api
spec/api
comment_thread_spec.rb
comment_thread_spec.rb
197:205 (1%)
209:217 (1%)
view
8 x 2 api
api
commentables.rb
notifications_and_subscriptions.rb
14:21 (16%)
8:15 (34%)
view
7 x 2 lib/tasks
lib/tasks
rake
deep_search.rake
kpis.rake
1:7 (14%)
1:7 (6%)
view
7 x 2 models
models
comment_thread.rb
commentable.rb
108:116 (5%)
19:27 (33%)
view
6 x 2 scripts/db
scripts/db
migrate-001-sk-author_username.js
migrate-001-sk-author_username.js
12:18 (14%)
40:46 (14%)
view
6 x 2 spec
spec
app_spec.rb
app_spec.rb
53:58 (4%)
101:106 (4%)
view
6 x 2 api
api
users.rb
users.rb
5:10 (7%)
71:76 (7%)
view
6 x 2 spec/api
spec/api
notifications_spec.rb
notifications_spec.rb
105:113 (4%)
153:160 (4%)
view
6 x 2 spec/api
spec/api
comment_thread_spec.rb
notifications_and_subscriptions_spec.rb
122:127 (<1%)
38:43 (4%)
view
6 x 2 spec/api
spec/api
comment_thread_spec.rb
comment_thread_spec.rb
63:68 (<1%)
74:79 (<1%)
view
6 x 2 spec/models
spec/models
comment_spec.rb
comment_spec.rb
61:67 (5%)
85:91 (5%)
view
6 x 2 spec/api
spec/api
notifications_spec.rb
notifications_spec.rb
134:142 (4%)
153:160 (4%)
view