microsoft / ApplicationInsights-node.js
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:
    • 6,082 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 194 duplicated lines
  • 44 duplicates
system3% (194 lines)
Duplication per Extension
ts3% (194 lines)
Duplication per Component (primary)
AutoCollection/diagnostic-channel12% (76 lines)
AutoCollection3% (60 lines)
Declarations/Contracts5% (28 lines)
Library<1% (18 lines)
Bootstrap4% (12 lines)
Bootstrap/Helpers0% (0 lines)
Declarations0% (0 lines)
Declarations/Metrics0% (0 lines)
Schema0% (0 lines)
TelemetryProcessors0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 44 duplicates...
Size#FoldersFilesLinesCode
10 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
postgres.sub.ts
redis.sub.ts
26:37 (27%)
28:40 (28%)
view
10 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
mysql.sub.ts
redis.sub.ts
31:42 (25%)
28:40 (28%)
view
10 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
mongodb.sub.ts
redis.sub.ts
29:40 (27%)
28:40 (28%)
view
10 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
mysql.sub.ts
postgres.sub.ts
31:42 (25%)
26:37 (27%)
view
10 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
mongodb.sub.ts
winston.sub.ts
29:40 (27%)
59:71 (14%)
view
10 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
mongodb.sub.ts
postgres.sub.ts
29:40 (27%)
26:37 (27%)
view
10 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
mysql.sub.ts
winston.sub.ts
31:42 (25%)
59:71 (14%)
view
10 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
redis.sub.ts
winston.sub.ts
28:40 (28%)
59:71 (14%)
view
10 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
mongodb.sub.ts
mysql.sub.ts
29:40 (27%)
31:42 (25%)
view
10 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
postgres.sub.ts
winston.sub.ts
26:37 (27%)
59:71 (14%)
view
9 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
console.sub.ts
winston.sub.ts
25:35 (27%)
61:71 (13%)
view
9 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
bunyan.sub.ts
mysql.sub.ts
37:47 (20%)
32:42 (23%)
view
9 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
console.sub.ts
mysql.sub.ts
25:35 (27%)
32:42 (23%)
view
9 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
console.sub.ts
mongodb.sub.ts
25:35 (27%)
30:40 (25%)
view
9 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
bunyan.sub.ts
mongodb.sub.ts
37:47 (20%)
30:40 (25%)
view
9 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
bunyan.sub.ts
winston.sub.ts
37:47 (20%)
61:71 (13%)
view
9 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
bunyan.sub.ts
redis.sub.ts
37:47 (20%)
30:40 (25%)
view
9 x 2 AutoCollection/diagnostic-channel
AutoCollection/diagnostic-channel
console.sub.ts
redis.sub.ts
25:35 (27%)
30:40 (25%)
view
9 x 2 AutoCollection
AutoCollection
Performance.ts
Performance.ts
91:102 (4%)
117:128 (4%)
view
9 x 2 Library
Library
Config.ts
JsonConfig.ts
24:32 (6%)
27:35 (7%)
view