microsoft / fabric8-maven-plugin
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:
    • 12,371 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 430 duplicated lines
  • 33 duplicates
system3% (430 lines)
Duplication per Extension
java3% (402 lines)
yml31% (28 lines)
Duplication per Component (primary)
plugin/src4% (195 lines)
enricher/standard6% (73 lines)
core/src1% (49 lines)
watcher/api23% (33 lines)
generator/api9% (32 lines)
watcher/standard6% (18 lines)
enricher/fabric8<1% (9 lines)
generator/karaf15% (7 lines)
generator/webapp2% (7 lines)
generator/java-exec3% (7 lines)
doc/src0% (0 lines)
enricher/api0% (0 lines)
generator/spring-boot0% (0 lines)
generator/vertx0% (0 lines)
generator/wildfly-swarm0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G generator/api generator/api watcher/api watcher/api generator/api--watcher/api 65

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 33 duplicates...
Size#FoldersFilesLinesCode
10 x 2 generator/api/src/main/j...ic8/maven/generator/api
watcher/api/src/main/jav...bric8/maven/watcher/api
GeneratorContext.java
WatcherContext.java
145:160 (12%)
160:175 (9%)
view
10 x 2 generator/api/src/main/j...ic8/maven/generator/api
watcher/api/src/main/jav...bric8/maven/watcher/api
GeneratorContext.java
WatcherContext.java
61:78 (12%)
66:83 (9%)
view
9 x 2 core/src/main/java/io/fabric8/maven/core/util
plugin/src/main/java/io/...maven/plugin/mojo/build
MavenUtil.java
DistroMojo.java
113:122 (6%)
188:197 (8%)
view
9 x 2 plugin/src/main/java/io/...en/plugin/mojo/internal
plugin/src/main/java/io/...en/plugin/mojo/internal
HelmIndexMojo.java
ManifestIndexMojo.java
229:240 (3%)
240:251 (3%)
view
9 x 2 enricher/fabric8/src/mai.../maven/enricher/fabric8
plugin/src/main/java/io/...maven/plugin/mojo/build
IconEnricher.java
ApplyMojo.java
316:326 (3%)
665:675 (2%)
view
9 x 2 enricher/standard/src/ma...maven/enricher/standard
plugin/src/main/java/io/...ven/plugin/mojo/develop
DebugEnricher.java
DebugMojo.java
140:151 (12%)
243:255 (6%)
view
8 x 2 plugin/src/main/java/io/...maven/plugin/mojo/build
plugin/src/main/java/io/...en/plugin/mojo/internal
HelmMojo.java
ManifestIndexMojo.java
428:441 (2%)
366:379 (3%)
view
8 x 2 plugin/src/main/resources/META-INF/fabric8
plugin/src/main/resources/META-INF/fabric8
profiles-default.yml
profiles-default.yml
48:56 (8%)
75:83 (8%)
view
8 x 2 plugin/src/main/java/io/...en/plugin/mojo/internal
plugin/src/main/java/io/...en/plugin/mojo/internal
HelmIndexMojo.java
ManifestIndexMojo.java
188:197 (3%)
213:222 (3%)
view
8 x 2 enricher/standard/src/ma...maven/enricher/standard
enricher/standard/src/ma...maven/enricher/standard
DefaultControllerEnricher.java
DefaultControllerEnricher.java
142:151 (7%)
163:172 (7%)
view
8 x 2 plugin/src/main/java/io/...maven/plugin/mojo/build
plugin/src/main/java/io/...maven/plugin/mojo/build
AppCatalogMojo.java
AppCatalogMojo.java
121:130 (3%)
182:191 (3%)
view
8 x 2 core/src/main/java/io/fabric8/maven/core/util
core/src/main/java/io/fabric8/maven/core/util
KubernetesResourceUtil.java
KubernetesResourceUtil.java
1023:1030 (1%)
1036:1043 (1%)
view
7 x 2 generator/java-exec/src/...aven/generator/javaexec
generator/webapp/src/mai.../maven/generator/webapp
JavaExecGenerator.java
WebAppGenerator.java
125:131 (5%)
98:105 (9%)
view
7 x 2 generator/api/src/main/j...ic8/maven/generator/api
watcher/api/src/main/jav...bric8/maven/watcher/api
GeneratorContext.java
WatcherContext.java
135:145 (8%)
140:150 (6%)
view
7 x 2 generator/karaf/src/main...8/maven/generator/karaf
generator/webapp/src/mai.../maven/generator/webapp
KarafGenerator.java
WebAppGenerator.java
57:63 (15%)
98:105 (9%)
view
7 x 2 generator/java-exec/src/...aven/generator/javaexec
generator/karaf/src/main...8/maven/generator/karaf
JavaExecGenerator.java
KarafGenerator.java
125:131 (5%)
57:63 (15%)
view
7 x 2 plugin/src/main/java/io/...maven/plugin/mojo/build
plugin/src/main/java/io/...maven/plugin/mojo/build
AppCatalogMojo.java
AppCatalogMojo.java
110:117 (3%)
166:173 (3%)
view
6 x 2 core/src/main/java/io/fabric8/maven/core/util
enricher/standard/src/ma...maven/enricher/standard
KubernetesResourceUtil.java
ImageEnricher.java
733:738 (<1%)
229:235 (4%)
view
6 x 2 plugin/src/main/java/io/...maven/plugin/mojo/build
plugin/src/main/java/io/...maven/plugin/mojo/build
BuildMojo.java
PushMojo.java
89:107 (3%)
52:70 (13%)
view
6 x 2 plugin/src/main/java/io/...maven/plugin/mojo/build
watcher/standard/src/mai.../maven/watcher/standard
ApplyMojo.java
DockerImageWatcher.java
392:397 (1%)
125:130 (5%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
11 x 2 core/src/main/java/io/fabric8/maven/core/util
core/src/main/java/io/fabric8/maven/core/util
KubernetesResourceUtil.java
KubernetesResourceUtil.java
1022:1033 
1035:1046 
view
11 x 2 enricher/fabric8/src/mai.../maven/enricher/fabric8
plugin/src/main/java/io/...maven/plugin/mojo/build
IconEnricher.java
ApplyMojo.java
316:327 
665:676 
view
8 x 2 core/src/main/java/io/fabric8/maven/core/util
core/src/main/java/io/fabric8/maven/core/util
MavenUtil.java
MavenUtil.java
241:249 
251:259 
view