aws-quickstart / connect-integration-servicenow-itsm
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
  • 50% duplication:
    • 1,055 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 529 duplicated lines
  • 110 duplicates
system50% (529 lines)
Duplication per Extension
yaml47% (338 lines)
js55% (191 lines)
Duplication per Component (primary)
templates47% (338 lines)
functions/source/CreateIncidentByPhone68% (68 lines)
functions/source/GetLatestStateByPhone75% (56 lines)
functions/source/GetIncidentByPhone62% (54 lines)
functions/source/GetIncidentState28% (13 lines)
functions/source/CreateIncident0% (0 lines)

Duplication Between Components (50+ lines)

G functions/source/CreateIncidentByPhone functions/source/CreateIncidentByPhone functions/source/GetIncidentByPhone functions/source/GetIncidentByPhone functions/source/CreateIncidentByPhone--functions/source/GetIncidentByPhone 114 functions/source/GetLatestStateByPhone functions/source/GetLatestStateByPhone functions/source/CreateIncidentByPhone--functions/source/GetLatestStateByPhone 106 functions/source/GetIncidentByPhone--functions/source/GetLatestStateByPhone 84

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 110 duplicates...
Size#FoldersFilesLinesCode
23 x 2 functions/source/CreateIncidentByPhone
functions/source/GetIncidentByPhone
index.js
index.js
48:74 (23%)
54:81 (26%)
view
17 x 2 functions/source/CreateIncidentByPhone
functions/source/GetLatestStateByPhone
index.js
index.js
85:103 (17%)
71:89 (22%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
412:424 (1%)
511:523 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
214:226 (1%)
511:523 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
115:127 (1%)
608:620 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
313:325 (1%)
511:523 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
214:226 (1%)
608:620 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
412:424 (1%)
608:620 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
313:325 (1%)
412:424 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
115:127 (1%)
412:424 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
115:127 (1%)
511:523 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
511:523 (1%)
608:620 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
115:127 (1%)
214:226 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
115:127 (1%)
313:325 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
214:226 (1%)
313:325 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
313:325 (1%)
608:620 (1%)
view
13 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
214:226 (1%)
412:424 (1%)
view
12 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
295:306 (1%)
394:405 (1%)
view
12 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
97:108 (1%)
196:207 (1%)
view
12 x 2 templates
templates
servicenow-itsm.template.yaml
servicenow-itsm.template.yaml
148:159 (1%)
247:258 (1%)
view
Duplicated Units
The list of top 5 duplicated units.
See data for all 5 unit duplicates...
Size#FoldersFilesLinesCode
12 x 3 functions/source/CreateIncidentByPhone
functions/source/GetIncidentByPhone
functions/source/GetLatestStateByPhone
index.js
index.js
index.js
62:74 
69:81 
56:68 
view
12 x 2 functions/source/CreateIncidentByPhone
functions/source/GetLatestStateByPhone
index.js
index.js
84:96 
70:82 
view
9 x 3 functions/source/CreateIncidentByPhone
functions/source/GetIncidentByPhone
functions/source/GetLatestStateByPhone
index.js
index.js
index.js
2:12 
2:12 
2:12 
view
9 x 3 functions/source/CreateIncidentByPhone
functions/source/GetIncidentByPhone
functions/source/GetLatestStateByPhone
index.js
index.js
index.js
51:60 
58:67 
45:54 
view
6 x 2 functions/source/CreateIncidentByPhone
functions/source/GetIncidentByPhone
index.js
index.js
14:20 
14:20 
view