Duplication Overall
- 7% duplication:
- 17,650 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
- 1,345 duplicated lines
- 94 duplicates
Duplication per Extension
Duplication per Component (primary)
Duplication Between Components (50+ lines)
flowchart TB
n0["eureka-client-jersey2"]
n1["eureka-client"]
n2["eureka-core-jersey2"]
n3["eureka-core"]
n4["eureka-client-archaius2"]
n0 ---|"224"| n1
n2 ---|"108"| n3
n4 ---|"82"| n1
n1 ---|"50"| n3
classDef default fill:#00b2ee,stroke:#ffffff,color:#000000;
classDef highlighted fill:#00b2ee,stroke:#ffffff,color:#000000;
linkStyle 0 stroke:#DC143CFF,stroke-width:10px
linkStyle 1 stroke:#DC143C93,stroke-width:4px
linkStyle 2 stroke:#DC143C82,stroke-width:3px
linkStyle 3 stroke:#DC143C70,stroke-width:2px
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
eureka-client-jersey2 (17%)
  --> eureka-client (1%)
224
6 file pairs
details...
eureka-core-jersey2 (33%)
  --> eureka-core (<1%)
108
2 file pairs
details...
eureka-client-archaius2 (6%)
  --> eureka-client (<1%)
82
3 file pairs
details...
eureka-client (<1%)
  --> eureka-core (<1%)
50
3 file pairs
details...
flowchart TB
n0["eureka-client-jersey2"]
n1["eureka-client"]
n2["eureka-core-jersey2"]
n3["eureka-core"]
n4["eureka-client-archaius2"]
n0 ---|"224"| n1
n2 ---|"108"| n3
n4 ---|"82"| n1
n1 ---|"50"| n3
classDef default fill:#00b2ee,stroke:#ffffff,color:#000000;
classDef highlighted fill:#00b2ee,stroke:#ffffff,color:#000000;
linkStyle 0 stroke:#DC143CFF,stroke-width:10px
linkStyle 1 stroke:#DC143C93,stroke-width:4px
linkStyle 2 stroke:#DC143C82,stroke-width:3px
linkStyle 3 stroke:#DC143C70,stroke-width:2px
Show more details on duplication between components...
| From Component --> To Component |
Duplicated Lines |
File Pairs | Details |
|---|---|---|---|
| eureka-client-jersey2 (17%)   --> eureka-client (1%) |
224 | 6 file pairs | details... |
| eureka-core-jersey2 (33%)   --> eureka-core (<1%) |
108 | 2 file pairs | details... |
| eureka-client-archaius2 (6%)   --> eureka-client (<1%) |
82 | 3 file pairs | details... |
| eureka-client (<1%)   --> eureka-core (<1%) |
50 | 3 file pairs | details... |
Longest Duplicates
The list of 50 longest duplicates.
Most Frequent Duplicates
The list of 19 most frequently found duplicates.
Duplicated Units
The list of top 5 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."