Duplication Overall
- 6% duplication:
- 21,094 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
- 1,323 duplicated lines
- 119 duplicates
Duplication per Extension
Duplication per Component (primary)
Longest Duplicates
The list of 50 longest duplicates.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 50 | x 2 | frontend/app/browsefrontend/app/search | 36:85 (64%)88:137 (45%) | view | |
| 22 | x 2 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetail | 143:164 (13%)76:97 (22%) | view | |
| 18 | x 2 | confconf | 75:93 (22%)75:93 (27%) | view | |
| 17 | x 2 | cloudformationcloudformation | 688:704 (1%)86:102 (12%) | view | |
| 16 | x 2 | frontend/app/ProxyHealthfrontend/app/ProxyHealth | 106:121 (10%)145:160 (10%) | view | |
| 16 | x 2 | cloudformationcloudformation | 3:18 (1%)3:18 (12%) | view | |
| 16 | x 2 | cloudformationcloudformation | 3:18 (1%)3:18 (11%) | view | |
| 16 | x 2 | cloudformationcloudformation | 3:18 (12%)3:18 (11%) | view | |
| 16 | x 2 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetail | 106:121 (10%)78:93 (16%) | view | |
| 14 | x 2 | frontend/app/browsefrontend/app/browse | 16:29 (11%)23:36 (22%) | view | |
| 14 | x 2 | frontend/app/ProxyHealthDetailfrontend/app/ProxyHealthDetail | 61:74 (14%)65:78 (16%) | view | |
| 14 | x 2 | frontend/app/Entry/detailsfrontend/app/ItemView | 53:67 (11%)42:56 (14%) | view | |
| 14 | x 2 | testscriptstestscripts | 95:111 (18%)83:99 (29%) | view | |
| 13 | x 2 | app/controllerslambda/input/src/main/scala | 57:74 (8%)98:115 (4%) | view | |
| 12 | x 2 | frontend/app/DeletedItemsfrontend/app/browse | 22:33 (6%)23:34 (5%) | view | |
| 12 | x 2 | frontend/app/DeletedItemsfrontend/app/browse | 216:227 (6%)264:275 (5%) | view | |
| 11 | x 2 | frontend/app/ProxyHealthDetailfrontend/app/ProxyHealthDetail | 22:35 (11%)22:35 (13%) | view | |
| 10 | x 2 | frontend/app/ProxyHealthfrontend/app/ProxyHealth | 123:132 (6%)162:171 (6%) | view | |
| 10 | x 2 | lambda/input/src/main/scalalambda/input/src/main/scala | 364:373 (3%)389:398 (3%) | view | |
| 10 | x 2 | cloudformationcloudformation | 241:250 (<1%)422:431 (<1%) | view | |
| 10 | x 2 | app/controllersapp/controllers | 154:163 (2%)169:178 (2%) | view | |
| 10 | x 2 | frontend/app/ProxyHealthDetailfrontend/app/ProxyHealthDetail | 8:18 (10%)8:18 (11%) | view | |
| 9 | x 2 | app/servicesapp/services | 115:124 (5%)159:168 (5%) | view | |
| 9 | x 2 | app/helpers/LightboxStreamComponentsapp/helpers/LightboxStreamComponents | 35:46 (26%)36:47 (29%) | view | |
| 9 | x 2 | confconf | 43:52 (11%)45:54 (13%) | view | |
| 9 | x 2 | ProxyStatsGathering/src/.../scala/StreamComponentsProxyStatsGathering/src/.../scala/StreamComponents | 27:39 (37%)66:78 (20%) | view | |
| 9 | x 2 | testscriptstestscripts | 17:43 (15%)34:60 (19%) | view | |
| 9 | x 2 | frontend/app/DeletedItemsfrontend/app/browse | 33:41 (5%)42:50 (3%) | view | |
| 9 | x 2 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetail | 165:175 (5%)99:107 (9%) | view | |
| 8 | x 2 | cloudformationcloudformation | 362:369 (<1%)373:380 (<1%) | view | |
| 8 | x 2 | app/servicesapp/services | 440:447 (2%)487:494 (2%) | view | |
| 8 | x 2 | app/servicesapp/services | 440:447 (2%)514:521 (2%) | view | |
| 8 | x 2 | app/servicesapp/services | 487:494 (2%)514:521 (2%) | view | |
| 8 | x 2 | cloudformationcloudformation | 752:759 (<1%)64:71 (6%) | view | |
| 8 | x 2 | common/src/main/scala/co...ia/archivehunter/commoncommon/src/main/scala/co...ia/archivehunter/common | 45:53 (13%)81:89 (10%) | view | |
| 8 | x 2 | testscriptstestscripts | 17:41 (14%)33:57 (10%) | view | |
| 8 | x 2 | testscriptstestscripts | 33:57 (10%)34:58 (17%) | view | |
| 8 | x 2 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetail | 28:35 (5%)11:18 (9%) | view | |
| 8 | x 2 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetail | 28:35 (5%)11:18 (8%) | view | |
| 7 | x 2 | lambda/input/src/main/scalalambda/input/src/main/scala | 198:205 (2%)275:282 (2%) | view | |
| 7 | x 2 | cloudformationcloudformation | 199:205 (<1%)753:759 (<1%) | view | |
| 7 | x 2 | cloudformationcloudformation | 224:230 (<1%)244:250 (<1%) | view | |
| 7 | x 2 | cloudformationcloudformation | 224:230 (<1%)381:387 (<1%) | view | |
| 7 | x 2 | cloudformationcloudformation | 224:230 (<1%)401:407 (<1%) | view | |
| 7 | x 2 | cloudformationcloudformation | 224:230 (<1%)425:431 (<1%) | view | |
| 7 | x 2 | cloudformationcloudformation | 224:230 (<1%)456:462 (<1%) | view | |
| 7 | x 2 | cloudformationcloudformation | 224:230 (<1%)531:537 (<1%) | view | |
| 7 | x 2 | cloudformationcloudformation | 244:250 (<1%)381:387 (<1%) | view | |
| 7 | x 2 | cloudformationcloudformation | 244:250 (<1%)401:407 (<1%) | view | |
| 7 | x 2 | cloudformationcloudformation | 244:250 (<1%)456:462 (<1%) | view |
Most Frequent Duplicates
The list of 48 most frequently found duplicates.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 6 | x 7 | cloudformationcloudformationcloudformationcloudformationcloudformationcloudformationcloudformation | 224:229 (<1%)244:249 (<1%)381:386 (<1%)401:406 (<1%)425:430 (<1%)456:461 (<1%)531:536 (<1%) | view | |
| 6 | x 7 | cloudformationcloudformationcloudformationcloudformationcloudformationcloudformationcloudformation | 225:230 (<1%)245:250 (<1%)382:387 (<1%)402:407 (<1%)426:431 (<1%)457:462 (<1%)532:537 (<1%) | view | |
| 6 | x 4 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 126:131 (3%)99:104 (6%)86:91 (7%)165:170 (3%) | view | |
| 6 | x 4 | frontend/app/Entryfrontend/app/JobsListfrontend/app/commonfrontend/app/common | 17:24 (6%)34:41 (7%)12:19 (13%)10:17 (17%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 13:18 (4%)13:18 (4%)13:18 (<1%) | view | |
| 6 | x 3 | app/helpers/LightboxStreamComponentsapp/helpers/LightboxStreamComponentsapp/helpers/LightboxStreamComponents | 30:36 (23%)40:46 (17%)41:47 (19%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 114:119 (3%)86:91 (6%)153:158 (3%) | view | |
| 6 | x 3 | conflambda/input/src/main/resourcesconf | 1:13 (9%)1:9 (54%)1:13 (7%) | view | |
| 6 | x 3 | app/servicesapp/servicesapp/services | 441:446 (1%)488:493 (1%)515:520 (1%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 107:112 (3%)79:84 (6%)146:151 (3%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 4:9 (4%)4:9 (4%)4:9 (<1%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 6:11 (4%)6:11 (4%)6:11 (<1%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 10:15 (4%)10:15 (4%)10:15 (<1%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 893:898 (<1%)909:914 (<1%)939:944 (<1%) | view | |
| 6 | x 3 | app/helpers/LightboxStreamComponentsapp/helpers/LightboxStreamComponentsapp/helpers/LightboxStreamComponents | 28:35 (23%)38:45 (17%)39:46 (19%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 353:358 (<1%)364:369 (<1%)375:380 (<1%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 9:14 (4%)9:14 (4%)9:14 (<1%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 115:120 (3%)87:92 (6%)154:159 (3%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 5:10 (4%)5:10 (4%)5:10 (<1%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 12:17 (4%)12:17 (4%)12:17 (<1%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 109:114 (3%)81:86 (6%)148:153 (3%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 106:111 (3%)78:83 (6%)145:150 (3%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 116:121 (3%)88:93 (6%)155:160 (3%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 108:113 (3%)80:85 (6%)147:152 (3%) | view | |
| 6 | x 3 | app/servicesapp/servicesapp/services | 442:447 (1%)489:494 (1%)516:521 (1%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthDetailfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 13:18 (6%)13:18 (7%)30:35 (3%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 892:897 (<1%)908:913 (<1%)938:943 (<1%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 11:16 (4%)11:16 (4%)11:16 (<1%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 199:204 (<1%)65:70 (4%)753:758 (<1%) | view | |
| 6 | x 3 | testscriptstestscriptstestscripts | 24:41 (10%)41:58 (12%)40:57 (8%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthDetailfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 12:17 (6%)12:17 (7%)29:34 (3%) | view | |
| 6 | x 3 | ProxyStatsGathering/src/.../scala/StreamComponentsapp/helpersapp/helpers | 31:41 (25%)56:65 (18%)48:57 (20%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 7:12 (4%)7:12 (4%)7:12 (<1%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 542:547 (<1%)43:48 (4%)763:768 (<1%) | view | |
| 6 | x 3 | testscriptstestscriptstestscripts | 17:38 (10%)34:55 (12%)33:54 (8%) | view | |
| 6 | x 3 | frontend/app/Entryfrontend/app/browsefrontend/app/browse | 16:23 (6%)11:18 (7%)47:54 (4%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 113:118 (3%)85:90 (6%)152:157 (3%) | view | |
| 6 | x 3 | app/servicesapp/servicesapp/services | 440:445 (1%)487:492 (1%)514:519 (1%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 8:13 (4%)8:13 (4%)8:13 (<1%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 3:8 (4%)3:8 (4%)3:8 (<1%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 112:117 (3%)84:89 (6%)151:156 (3%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 200:205 (<1%)66:71 (4%)754:759 (<1%) | view | |
| 6 | x 3 | cloudformationcloudformationcloudformation | 541:546 (<1%)42:47 (4%)762:767 (<1%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthDetailfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 11:16 (6%)11:16 (7%)28:33 (3%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 127:132 (3%)100:105 (6%)166:171 (3%) | view | |
| 6 | x 3 | testscriptstestscriptstestscripts | 23:39 (10%)40:56 (12%)39:55 (8%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 110:115 (3%)82:87 (6%)149:154 (3%) | view | |
| 6 | x 3 | frontend/app/ProxyHealthfrontend/app/ProxyHealthDetailfrontend/app/ProxyHealth | 111:116 (3%)83:88 (6%)150:155 (3%) | view |
Duplicated Units
The list of top 3 duplicated units.
About This Analysis
- 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...
- To learn more about duplications and techniques for eliminating duplication, Sokrates recommends the following resources:
- Avoid Repetition, MartinFlower.com (IEEE Software article)
- Refactoring duplicated code, sourcemaking.com
- Beck Design Rules, MartinFowler.com
- DRY (Don't Repeat Yourself) Principle, Wikipedia
- The Cut-and-Paste Programming Software Development Anti-Pattern, sourcemaking.com
- Code Smells / Duplicated Code, Jeff Atwood, codinghorror.com:
- "Duplicated code is the bane of software development. Stamp out duplication whenever possible. You should always be on the lookout for more subtle cases of near-duplication, too. Don't Repeat Yourself!"
- Reducing Coupling, MartinFlower.com (IEEE Software article):
- "There are several ways to describe coupling, but it boils down to this: If changing one module in a program requires changing another module, then coupling exists. ... Duplication always implies coupling, because changing one piece of duplicate code implies changing the other."