openai/openai-knowledge-retrieval
Duplication Places in code with 6 or more lines that are exactly the same. |
Duplication Overall
- 17% duplication:
- 6,436 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
- 1,158 duplicated lines
- 101 duplicates
Duplication per Extension
Duplication per Component (primary)
Duplication Between Components (50+ lines)
flowchart TB
n0["configs"]
n1["templates"]
n0 ---|"764"| n1
classDef default fill:#00b2ee,stroke:#ffffff,color:#000000;
classDef highlighted fill:#00b2ee,stroke:#ffffff,color:#000000;
linkStyle 0 stroke:#DC143CFF,stroke-width:10px
Download:
Mermaid (.mmd)
(open online Mermaid editor)
2D force graph
|
3D force graph
Show more details on duplication between components...
From Component
--> To Component
Duplicated
Lines
File Pairs
Details
configs (200%)
  --> templates (60%)
764
12 file pairs
details...
flowchart TB
n0["configs"]
n1["templates"]
n0 ---|"764"| n1
classDef default fill:#00b2ee,stroke:#ffffff,color:#000000;
classDef highlighted fill:#00b2ee,stroke:#ffffff,color:#000000;
linkStyle 0 stroke:#DC143CFF,stroke-width:10px
Show more details on duplication between components...
| From Component --> To Component |
Duplicated Lines |
File Pairs | Details |
|---|---|---|---|
| configs (200%)   --> templates (60%) |
764 | 12 file pairs | details... |
Longest Duplicates
The list of 50 longest duplicates.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 99 | x 2 | templatestemplates | 15:118 (90%)15:118 (90%) | view | |
| 82 | x 2 | configstemplates | 38:121 (73%)35:118 (74%) | view | |
| 82 | x 2 | configstemplates | 38:121 (73%)35:118 (74%) | view | |
| 76 | x 2 | templatestemplates | 41:118 (69%)45:122 (66%) | view | |
| 76 | x 2 | templatestemplates | 41:118 (69%)45:122 (66%) | view | |
| 76 | x 2 | configstemplates | 44:121 (67%)45:122 (66%) | view | |
| 70 | x 2 | configstemplates | 13:84 (88%)13:84 (88%) | view | |
| 66 | x 2 | templatestemplates | 54:121 (58%)55:122 (57%) | view | |
| 66 | x 2 | configstemplates | 54:121 (58%)54:121 (58%) | view | |
| 66 | x 2 | templatestemplates | 54:121 (58%)51:118 (60%) | view | |
| 66 | x 2 | templatestemplates | 54:121 (58%)51:118 (60%) | view | |
| 59 | x 2 | templatestemplates | 25:84 (74%)56:115 (55%) | view | |
| 59 | x 2 | configstemplates | 25:84 (74%)56:115 (55%) | view | |
| 57 | x 2 | configstemplates | 28:84 (72%)66:122 (50%) | view | |
| 57 | x 2 | templatestemplates | 65:121 (50%)28:84 (72%) | view | |
| 57 | x 2 | configstemplates | 65:121 (50%)59:115 (53%) | view | |
| 57 | x 2 | configstemplates | 28:84 (72%)65:121 (50%) | view | |
| 57 | x 2 | templatestemplates | 28:84 (72%)66:122 (50%) | view | |
| 57 | x 2 | templatestemplates | 59:115 (53%)62:118 (51%) | view | |
| 57 | x 2 | templatestemplates | 62:118 (51%)59:115 (53%) | view | |
| 57 | x 2 | configstemplates | 28:84 (72%)62:118 (51%) | view | |
| 57 | x 2 | configstemplates | 28:84 (72%)62:118 (51%) | view | |
| 57 | x 2 | templatestemplates | 65:121 (50%)59:115 (53%) | view | |
| 57 | x 2 | configstemplates | 65:121 (50%)28:84 (72%) | view | |
| 57 | x 2 | configsconfigs | 28:84 (72%)65:121 (50%) | view | |
| 57 | x 2 | templatestemplates | 59:115 (53%)66:122 (50%) | view | |
| 57 | x 2 | templatestemplates | 28:84 (72%)62:118 (51%) | view | |
| 57 | x 2 | templatestemplates | 28:84 (72%)62:118 (51%) | view | |
| 42 | x 2 | evals/generatorevals/generator | 98:140 (16%)200:242 (16%) | view | |
| 29 | x 2 | templatestemplates | 16:46 (27%)18:48 (26%) | view | |
| 29 | x 2 | templatestemplates | 18:48 (26%)16:46 (27%) | view | |
| 20 | x 2 | templatestemplates | 18:39 (18%)22:43 (17%) | view | |
| 20 | x 2 | configstemplates | 13:36 (17%)13:36 (17%) | view | |
| 20 | x 2 | templatestemplates | 18:39 (18%)22:43 (17%) | view | |
| 20 | x 2 | templatestemplates | 16:37 (18%)22:43 (17%) | view | |
| 19 | x 2 | modelsmodels | 82:102 (6%)176:195 (6%) | view | |
| 16 | x 2 | templatestemplates | 21:38 (14%)22:39 (14%) | view | |
| 16 | x 2 | templatestemplates | 21:38 (14%)16:33 (14%) | view | |
| 16 | x 2 | templatestemplates | 21:38 (14%)18:35 (14%) | view | |
| 16 | x 2 | templatestemplates | 21:38 (14%)18:35 (14%) | view | |
| 14 | x 2 | configstemplates | 21:36 (12%)16:31 (13%) | view | |
| 14 | x 2 | configstemplates | 38:51 (12%)33:46 (13%) | view | |
| 14 | x 2 | configstemplates | 21:36 (12%)18:33 (12%) | view | |
| 14 | x 2 | configstemplates | 21:36 (12%)18:33 (12%) | view | |
| 14 | x 2 | configstemplates | 21:36 (12%)22:37 (12%) | view | |
| 13 | x 2 | ingestion/chunkersingestion/chunkers | 20:32 (33%)36:48 (33%) | view | |
| 13 | x 2 | modelsmodels | 41:55 (4%)107:119 (4%) | view | |
| 12 | x 2 | configstemplates | 39:50 (10%)42:53 (10%) | view | |
| 12 | x 2 | templatestemplates | 42:53 (10%)34:45 (11%) | view | |
| 12 | x 2 | templatestemplates | 42:53 (10%)36:47 (10%) | view |
Most Frequent Duplicates
The list of 50 most frequently found duplicates.
| Size | # | Folders | Files | Lines | Code |
|---|---|---|---|---|---|
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 36:41 (7%)74:79 (5%)73:78 (5%)36:41 (7%)70:75 (5%)70:75 (5%)73:78 (5%)67:72 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 74:79 (7%)112:117 (5%)111:116 (5%)74:79 (7%)108:113 (5%)108:113 (5%)111:116 (5%)105:110 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 31:36 (7%)69:74 (5%)68:73 (5%)31:36 (7%)65:70 (5%)65:70 (5%)68:73 (5%)62:67 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 35:40 (7%)73:78 (5%)72:77 (5%)35:40 (7%)69:74 (5%)69:74 (5%)72:77 (5%)66:71 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 53:58 (7%)91:96 (5%)90:95 (5%)53:58 (7%)87:92 (5%)87:92 (5%)90:95 (5%)84:89 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 45:50 (7%)83:88 (5%)82:87 (5%)45:50 (7%)79:84 (5%)79:84 (5%)82:87 (5%)76:81 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 62:67 (7%)100:105 (5%)99:104 (5%)62:67 (7%)96:101 (5%)96:101 (5%)99:104 (5%)93:98 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 29:34 (7%)67:72 (5%)66:71 (5%)29:34 (7%)63:68 (5%)63:68 (5%)66:71 (5%)60:65 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 37:42 (7%)75:80 (5%)74:79 (5%)37:42 (7%)71:76 (5%)71:76 (5%)74:79 (5%)68:73 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 60:65 (7%)98:103 (5%)97:102 (5%)60:65 (7%)94:99 (5%)94:99 (5%)97:102 (5%)91:96 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 47:52 (7%)85:90 (5%)84:89 (5%)47:52 (7%)81:86 (5%)81:86 (5%)84:89 (5%)78:83 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 50:55 (7%)88:93 (5%)87:92 (5%)50:55 (7%)84:89 (5%)84:89 (5%)87:92 (5%)81:86 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 64:69 (7%)102:107 (5%)101:106 (5%)64:69 (7%)98:103 (5%)98:103 (5%)101:106 (5%)95:100 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 77:82 (7%)115:120 (5%)114:119 (5%)77:82 (7%)111:116 (5%)111:116 (5%)114:119 (5%)108:113 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 76:81 (7%)114:119 (5%)113:118 (5%)76:81 (7%)110:115 (5%)110:115 (5%)113:118 (5%)107:112 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 79:84 (7%)117:122 (5%)116:121 (5%)79:84 (7%)113:118 (5%)113:118 (5%)116:121 (5%)110:115 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 68:73 (7%)106:111 (5%)105:110 (5%)68:73 (7%)102:107 (5%)102:107 (5%)105:110 (5%)99:104 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 58:63 (7%)96:101 (5%)95:100 (5%)58:63 (7%)92:97 (5%)92:97 (5%)95:100 (5%)89:94 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 56:61 (7%)94:99 (5%)93:98 (5%)56:61 (7%)90:95 (5%)90:95 (5%)93:98 (5%)87:92 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 39:44 (7%)77:82 (5%)76:81 (5%)39:44 (7%)73:78 (5%)73:78 (5%)76:81 (5%)70:75 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 48:53 (7%)86:91 (5%)85:90 (5%)48:53 (7%)82:87 (5%)82:87 (5%)85:90 (5%)79:84 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 67:72 (7%)105:110 (5%)104:109 (5%)67:72 (7%)101:106 (5%)101:106 (5%)104:109 (5%)98:103 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 41:46 (7%)79:84 (5%)78:83 (5%)41:46 (7%)75:80 (5%)75:80 (5%)78:83 (5%)72:77 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 30:35 (7%)68:73 (5%)67:72 (5%)30:35 (7%)64:69 (5%)64:69 (5%)67:72 (5%)61:66 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 69:74 (7%)107:112 (5%)106:111 (5%)69:74 (7%)103:108 (5%)103:108 (5%)106:111 (5%)100:105 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 51:56 (7%)89:94 (5%)88:93 (5%)51:56 (7%)85:90 (5%)85:90 (5%)88:93 (5%)82:87 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 33:38 (7%)71:76 (5%)70:75 (5%)33:38 (7%)67:72 (5%)67:72 (5%)70:75 (5%)64:69 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 72:77 (7%)110:115 (5%)109:114 (5%)72:77 (7%)106:111 (5%)106:111 (5%)109:114 (5%)103:108 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 55:60 (7%)93:98 (5%)92:97 (5%)55:60 (7%)89:94 (5%)89:94 (5%)92:97 (5%)86:91 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 34:39 (7%)72:77 (5%)71:76 (5%)34:39 (7%)68:73 (5%)68:73 (5%)71:76 (5%)65:70 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 44:49 (7%)82:87 (5%)81:86 (5%)44:49 (7%)78:83 (5%)78:83 (5%)81:86 (5%)75:80 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 38:43 (7%)76:81 (5%)75:80 (5%)38:43 (7%)72:77 (5%)72:77 (5%)75:80 (5%)69:74 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 32:37 (7%)70:75 (5%)69:74 (5%)32:37 (7%)66:71 (5%)66:71 (5%)69:74 (5%)63:68 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 61:66 (7%)99:104 (5%)98:103 (5%)61:66 (7%)95:100 (5%)95:100 (5%)98:103 (5%)92:97 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 63:68 (7%)101:106 (5%)100:105 (5%)63:68 (7%)97:102 (5%)97:102 (5%)100:105 (5%)94:99 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 40:45 (7%)78:83 (5%)77:82 (5%)40:45 (7%)74:79 (5%)74:79 (5%)77:82 (5%)71:76 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 71:76 (7%)109:114 (5%)108:113 (5%)71:76 (7%)105:110 (5%)105:110 (5%)108:113 (5%)102:107 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 49:54 (7%)87:92 (5%)86:91 (5%)49:54 (7%)83:88 (5%)83:88 (5%)86:91 (5%)80:85 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 57:62 (7%)95:100 (5%)94:99 (5%)57:62 (7%)91:96 (5%)91:96 (5%)94:99 (5%)88:93 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 70:75 (7%)108:113 (5%)107:112 (5%)70:75 (7%)104:109 (5%)104:109 (5%)107:112 (5%)101:106 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 42:47 (7%)80:85 (5%)79:84 (5%)42:47 (7%)76:81 (5%)76:81 (5%)79:84 (5%)73:78 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 78:83 (7%)116:121 (5%)115:120 (5%)78:83 (7%)112:117 (5%)112:117 (5%)115:120 (5%)109:114 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 59:64 (7%)97:102 (5%)96:101 (5%)59:64 (7%)93:98 (5%)93:98 (5%)96:101 (5%)90:95 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 46:51 (7%)84:89 (5%)83:88 (5%)46:51 (7%)80:85 (5%)80:85 (5%)83:88 (5%)77:82 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 66:71 (7%)104:109 (5%)103:108 (5%)66:71 (7%)100:105 (5%)100:105 (5%)103:108 (5%)97:102 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 75:80 (7%)113:118 (5%)112:117 (5%)75:80 (7%)109:114 (5%)109:114 (5%)112:117 (5%)106:111 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 28:33 (7%)66:71 (5%)65:70 (5%)28:33 (7%)62:67 (5%)62:67 (5%)65:70 (5%)59:64 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 43:48 (7%)81:86 (5%)80:85 (5%)43:48 (7%)77:82 (5%)77:82 (5%)80:85 (5%)74:79 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 73:78 (7%)111:116 (5%)110:115 (5%)73:78 (7%)107:112 (5%)107:112 (5%)110:115 (5%)104:109 (5%) | view | |
| 6 | x 8 | configstemplatestemplatestemplatestemplatestemplatesconfigstemplates | 54:59 (7%)92:97 (5%)91:96 (5%)54:59 (7%)88:93 (5%)88:93 (5%)91:96 (5%)85:90 (5%) | view |
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."