Spring Boot
Duplication

Intro
  • For duplication, we look at places in code where there are six 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
  • 4% duplication:
    • 82,049 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,493 duplicated lines
  • 179 duplicates
system4% (3,493 lines)
Duplication per Extension
java4% (3,493 lines)
Duplication per Component (primary)
spring-boot-project/spring-boot4% (1,056 lines)
spring-boot-project/spring-boot-autoconfigure4% (974 lines)
spring-boot-project/spring-boot-tools3% (491 lines)
spring-boot-project/spring-boot-actuator5% (399 lines)
spring-boot-project/spring-boot-actuator-autoconfigure5% (351 lines)
spring-boot-project/spring-boot-cli2% (95 lines)
buildSrc/src2% (84 lines)
spring-boot-project/spring-boot-devtools1% (43 lines)
spring-boot-project/spring-boot-properties-migrator0% (0 lines)

Duplication Between Components (50+ lines)

G spring-boot-project/spring-boot-tools spring-boot-project/spring-boot-tools spring-boot-project/spring-boot spring-boot-project/spring-boot spring-boot-project/spring-boot-tools--spring-boot-project/spring-boot 236 spring-boot-project/spring-boot-autoconfigure spring-boot-project/spring-boot-autoconfigure spring-boot-project/spring-boot-tools--spring-boot-project/spring-boot-autoconfigure 84 spring-boot-project/spring-boot-actuator spring-boot-project/spring-boot-actuator spring-boot-project/spring-boot-tools--spring-boot-project/spring-boot-actuator 96 buildSrc/src buildSrc/src spring-boot-project/spring-boot--buildSrc/src 126 spring-boot-project/spring-boot--spring-boot-project/spring-boot-actuator 108 spring-boot-project/spring-boot-autoconfigure--spring-boot-project/spring-boot 230 spring-boot-project/spring-boot-actuator-autoconfigure spring-boot-project/spring-boot-actuator-autoconfigure spring-boot-project/spring-boot-autoconfigure--spring-boot-project/spring-boot-actuator-autoconfigure 162 buildSrc/src--spring-boot-project/spring-boot-tools 96 spring-boot-project/spring-boot-devtools spring-boot-project/spring-boot-devtools spring-boot-project/spring-boot-devtools--spring-boot-project/spring-boot 60

Download: SVG DOT (open online Graphviz editor)

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
Size#FoldersFilesLinesCode
38 x 2 spring-boot-project/spri...te/web/mappings/servlet
spring-boot-project/spri...e/web/mappings/reactive
RequestMappingConditionsDescription.java
RequestMappingConditionsDescription.java
57:135 (70%)
59:137 (69%)
view
34 x 2 spring-boot-project/spri...oot/web/servlet/context
spring-boot-project/spri...ot/web/reactive/context
AnnotationConfigServletWebApplication...
AnnotationConfigReactiveWebServerAppl...
111:207 (60%)
112:208 (65%)
view
30 x 3 spring-boot-project/spri...oot/web/servlet/context
spring-boot-project/spri...ot/web/reactive/context
spring-boot-project/spri...oot/web/servlet/context
AnnotationConfigServletWebServerAppli...
AnnotationConfigReactiveWebServerAppl...
AnnotationConfigServletWebApplication...
109:200 (57%)
112:203 (57%)
111:202 (53%)
view
22 x 2 spring-boot-project/spri...boot/web/embedded/netty
spring-boot-project/spri...t/web/embedded/undertow
SslServerCustomizer.java
SslBuilderCustomizer.java
143:177 (16%)
155:188 (18%)
view
21 x 2 spring-boot-project/spri...t/web/embedded/undertow
spring-boot-project/spri...t/web/embedded/undertow
UndertowReactiveWebServerFactory.java
UndertowServletWebServerFactory.java
56:95 (36%)
124:163 (8%)
view
20 x 2 spring-boot-project/spri...oot/web/embedded/tomcat
spring-boot-project/spri...oot/web/embedded/tomcat
TomcatReactiveWebServerFactory.java
TomcatServletWebServerFactory.java
237:299 (12%)
583:635 (5%)
view
18 x 2 spring-boot-project/spri...te/endpoint/web/servlet
spring-boot-project/spri...e/endpoint/web/reactive
AbstractWebMvcEndpointHandlerMapping....
AbstractWebFluxEndpointHandlerMapping...
118:142 (9%)
112:136 (9%)
view
18 x 2 spring-boot-project/spri...boot/web/embedded/jetty
spring-boot-project/spri...boot/web/embedded/jetty
JettyServletWebServerFactory.java
JettyReactiveWebServerFactory.java
173:200 (6%)
205:232 (19%)
view
17 x 2 spring-boot-project/spri...oot/web/embedded/tomcat
spring-boot-project/spri...oot/web/embedded/tomcat
TomcatReactiveWebServerFactory.java
TomcatServletWebServerFactory.java
178:199 (10%)
308:329 (4%)
view
16 x 2 spring-boot-project/spri...toconfigure/web/servlet
spring-boot-project/spri...oconfigure/web/reactive
WebMvcProperties.java
WebFluxProperties.java
489:527 (7%)
88:126 (34%)
view
16 x 2 spring-boot-project/spri...trics/export/properties
spring-boot-project/spri...re/metrics/export/atlas
PushRegistryProperties.java
AtlasProperties.java
58:87 (61%)
101:130 (23%)
view
16 x 2 spring-boot-project/spri...re/cloudfoundry/servlet
spring-boot-project/spri...e/cloudfoundry/reactive
TokenValidator.java
ReactiveTokenValidator.java
88:107 (26%)
94:113 (24%)
view
15 x 2 spring-boot-project/spri...utoconfigure/freemarker
spring-boot-project/spri...utoconfigure/freemarker
FreeMarkerReactiveWebConfiguration.java
FreeMarkerServletWebConfiguration.java
42:62 (60%)
51:71 (48%)
view
15 x 2 spring-boot-project/spri...te/web/mappings/servlet
spring-boot-project/spri...e/web/mappings/reactive
RequestMappingConditionsDescription.java
RequestMappingConditionsDescription.java
34:55 (27%)
35:56 (27%)
view
15 x 2 spring-boot-project/spri...t/gradle/tasks/bundling
spring-boot-project/spri...t/gradle/tasks/bundling
BootJar.java
BootWar.java
144:166 (11%)
98:120 (18%)
view
14 x 2 spring-boot-project/spri...oot/web/embedded/tomcat
spring-boot-project/spri...oot/web/embedded/tomcat
TomcatReactiveWebServerFactory.java
TomcatServletWebServerFactory.java
116:130 (8%)
181:195 (3%)
view
14 x 2 spring-boot-project/spri...ework/boot/jta/bitronix
spring-boot-project/spri...ework/boot/jta/bitronix
PoolingDataSourceBean.java
PoolingConnectionFactoryBean.java
64:83 (19%)
65:84 (23%)
view
14 x 2 spring-boot-project/spri...toconfigure/web/servlet
spring-boot-project/spri...toconfigure/web/servlet
DispatcherServletPath.java
JerseyApplicationPath.java
38:68 (58%)
34:64 (51%)
view
14 x 2 spring-boot-project/spri...toconfigure/web/servlet
spring-boot-project/spri...oconfigure/web/reactive
ServletWebServerFactoryAutoConfigurat...
ReactiveWebServerFactoryAutoConfigura...
98:117 (28%)
87:106 (31%)
view
14 x 2 spring-boot-project/spri...figure/security/servlet
spring-boot-project/spri...igure/security/reactive
EndpointRequest.java
EndpointRequest.java
247:267 (11%)
225:245 (13%)
view
Most Frequent Duplicates
The list of 20 most frequently found duplicates.
Size#FoldersFilesLinesCode
6 x 28 spring-boot-project/spri...uildpack/platform/build
spring-boot-project/spri...ngframework/boot/origin
spring-boot-project/spri...ck/platform/docker/type
spring-boot-project/spri...ework/boot/loader/tools
spring-boot-project/spri...t/gradle/tasks/bundling
spring-boot-project/spri...context/properties/bind
spring-boot-project/spri...ck/platform/docker/type
spring-boot-project/spri...ork/boot/context/config
spring-boot-project/spri...boot/jarmode/layertools
buildSrc/src/main/java/o...uild/context/properties
...
StackId.java
OriginTrackedResource.java
ContainerReference.java
Layer.java
LaunchScriptConfiguration.java
Bindable.java
ImageReference.java
ResourceConfigDataLocation.java
Command.java
ConfigurationTableEntry.java
...
40:46 (21%)
138:144 (6%)
36:42 (28%)
49:55 (27%)
95:101 (10%)
126:132 (5%)
92:98 (6%)
78:84 (15%)
299:305 (5%)
34:40 (31%)
...
view
6 x 13 spring-boot-project/spri...boot/devtools/filewatch
spring-boot-project/spri...ngframework/boot/origin
spring-boot-project/spri...gframework/boot/logging
buildSrc/src/main/java/o.../build/bom/bomr/version
spring-boot-project/spri...amework/boot/web/server
spring-boot-project/spri...ework/boot/loader/tools
spring-boot-project/spri...i/compiler/dependencies
spring-boot-project/spri...t/web/embedded/undertow
spring-boot-project/spri...autoconfigure/condition
spring-boot-project/spri...boot/cli/compiler/grape
...
FileSnapshot.java
TextResourceOrigin.java
LoggerConfiguration.java
ReleaseTrainDependencyVersion.java
ErrorPage.java
MainClassFinder.java
Dependency.java
UndertowWebServer.java
ConditionOutcome.java
RepositoryConfiguration.java
...
51:57 (15%)
65:71 (9%)
74:80 (14%)
88:94 (9%)
107:113 (12%)
372:378 (3%)
100:106 (7%)
351:357 (2%)
126:132 (13%)
74:80 (19%)
...
view
8 x 10 spring-boot-project/spri...boot/autoconfigure/mail
spring-boot-project/spri...gure/data/elasticsearch
spring-boot-project/spri...oot/autoconfigure/neo4j
spring-boot-project/spri...configure/elasticsearch
spring-boot-project/spri...autoconfigure/couchbase
spring-boot-project/spri...boot/autoconfigure/ldap
spring-boot-project/spri...configure/ldap/embedded
spring-boot-project/spri...oot/autoconfigure/r2dbc
spring-boot-project/spri...autoconfigure/cassandra
spring-boot-project/spri...trics/export/prometheus
MailProperties.java
ReactiveElasticsearchRestClientProper...
Neo4jProperties.java
ElasticsearchRestClientProperties.java
CouchbaseProperties.java
LdapProperties.java
EmbeddedLdapProperties.java
R2dbcProperties.java
CassandraProperties.java
PrometheusProperties.java
95:108 (19%)
88:101 (21%)
115:128 (7%)
68:81 (29%)
62:75 (7%)
88:101 (13%)
111:124 (16%)
101:114 (10%)
155:168 (4%)
150:163 (13%)
view
8 x 6 spring-boot-project/spri.../autoconfigure/sendgrid
spring-boot-project/spri.../metrics/export/ganglia
spring-boot-project/spri...boot/autoconfigure/mail
spring-boot-project/spri.../devtools/autoconfigure
spring-boot-project/spri...metrics/export/graphite
spring-boot-project/spri...e/metrics/export/statsd
SendGridProperties.java
GangliaProperties.java
MailProperties.java
RemoteDevToolsProperties.java
GraphiteProperties.java
StatsdProperties.java
73:86 (32%)
146:159 (15%)
79:92 (19%)
114:127 (19%)
117:130 (17%)
95:108 (19%)
view
8 x 6 spring-boot-project/spri.../boot/autoconfigure/web
spring-boot-project/spri.../autoconfigure/template
spring-boot-project/spri.../autoconfigure/template
spring-boot-project/spri...autoconfigure/thymeleaf
spring-boot-project/spri...toconfigure/web/servlet
spring-boot-project/spri.../boot/autoconfigure/web
ServerProperties.java
AbstractTemplateViewResolverPropertie...
PathBasedTemplateAvailabilityProvider...
ThymeleafProperties.java
WebMvcProperties.java
ServerProperties.java
781:794 (1%)
83:96 (13%)
86:99 (20%)
143:156 (7%)
350:363 (3%)
1741:1754 (1%)
view
6 x 5 spring-boot-project/spri...ingframework/boot/maven
spring-boot-project/spri...ingframework/boot/maven
spring-boot-project/spri...ingframework/boot/maven
spring-boot-project/spri...ingframework/boot/maven
spring-boot-project/spri...ingframework/boot/maven
BuildImageTests.java
BuildImageTests.java
BuildImageTests.java
BuildImageTests.java
BuildImageTests.java
59:68 (5%)
83:92 (5%)
105:114 (5%)
124:133 (5%)
142:151 (5%)
view
8 x 5 spring-boot-project/spri...t/web/embedded/undertow
buildSrc/src/main/java/o.../build/bom/bomr/version
spring-boot-project/spri...boot/cli/compiler/grape
spring-boot-project/spri...ework/boot/loader/tools
buildSrc/src/main/java/o.../build/bom/bomr/version
UndertowWebServer.java
ReleaseTrainDependencyVersion.java
RepositoryConfiguration.java
MainClassFinder.java
AbstractDependencyVersion.java
351:360 (3%)
88:97 (12%)
74:83 (25%)
372:381 (4%)
41:50 (29%)
view
6 x 5 spring-boot-project/spri...gframework/boot/context
spring-boot-project/spri...ingframework/boot/cloud
spring-boot-project/spri...oot/web/servlet/support
spring-boot-project/spri...gframework/boot/builder
spring-boot-project/spri...oot/autoconfigure/batch
ContextIdApplicationContextInitialize...
CloudFoundryVcapEnvironmentPostProces...
ServletContextApplicationContextIniti...
ParentContextApplicationContextInitia...
JobLauncherApplicationRunner.java
43:52 (20%)
128:137 (5%)
64:73 (27%)
46:55 (18%)
114:123 (5%)
view
6 x 4 spring-boot-project/spri...oconfigure/web/embedded
spring-boot-project/spri...oconfigure/web/embedded
spring-boot-project/spri...oconfigure/web/embedded
spring-boot-project/spri...oconfigure/web/embedded
TomcatWebServerFactoryCustomizer.java
NettyWebServerFactoryCustomizer.java
UndertowWebServerFactoryCustomizer.java
JettyWebServerFactoryCustomizer.java
69:78 (3%)
47:56 (13%)
67:76 (5%)
66:75 (5%)
view
6 x 4 spring-boot-project/spri...boot/web/servlet/filter
spring-boot-project/spri...pringframework/boot/env
spring-boot-project/spri...boot/web/servlet/filter
spring-boot-project/spri...oot/web/reactive/filter
OrderedFormContentFilter.java
SpringApplicationJsonEnvironmentPostP...
OrderedHiddenHttpMethodFilter.java
OrderedHiddenHttpMethodFilter.java
36:48 (75%)
82:90 (6%)
35:47 (75%)
35:47 (75%)
view
6 x 4 spring-boot-project/spri...boot/jarmode/layertools
spring-boot-project/spri...ework/boot/loader/tools
spring-boot-project/spri...ork/boot/context/config
spring-boot-project/spri...ework/boot/loader/tools
Command.java
MainClassFinder.java
ConfigFileApplicationListener.java
Layer.java
310:317 (5%)
387:394 (3%)
823:830 (1%)
60:67 (27%)
view
6 x 4 spring-boot-project/spri...ck/platform/docker/type
spring-boot-project/spri...ck/platform/docker/type
spring-boot-project/spri...ck/platform/docker/type
spring-boot-project/spri...uildpack/platform/build
VolumeName.java
ContainerReference.java
LayerId.java
StackId.java
52:59 (13%)
48:55 (28%)
70:77 (16%)
51:58 (21%)
view
8 x 4 spring-boot-project/spri...ot/autoconfigure/influx
spring-boot-project/spri...toconfigure/jms/artemis
spring-boot-project/spri...oconfigure/jms/activemq
spring-boot-project/spri...autoconfigure/liquibase
InfluxDbProperties.java
ArtemisProperties.java
ActiveMQProperties.java
LiquibaseProperties.java
54:67 (47%)
94:107 (10%)
97:110 (14%)
213:226 (8%)
view
6 x 4 spring-boot-project/spri...e/endpoint/web/reactive
spring-boot-project/spri...e/endpoint/web/reactive
spring-boot-project/spri...te/endpoint/web/servlet
spring-boot-project/spri...te/endpoint/web/servlet
ControllerEndpointHandlerMapping.java
AbstractWebFluxEndpointHandlerMapping...
AbstractWebMvcEndpointHandlerMapping....
ControllerEndpointHandlerMapping.java
111:118 (13%)
191:198 (3%)
209:216 (3%)
115:122 (11%)
view
8 x 3 spring-boot-project/spri...e/metrics/export/influx
spring-boot-project/spri.../metrics/export/elastic
spring-boot-project/spri...e/metrics/export/kairos
InfluxProperties.java
ElasticProperties.java
KairosProperties.java
112:125 (14%)
125:138 (17%)
55:68 (47%)
view
9 x 3 spring-boot-project/spri...pringframework/boot/cli
spring-boot-project/spri...pringframework/boot/cli
spring-boot-project/spri...pringframework/boot/cli
JarCommandIT.java
JarCommandIT.java
JarCommandIT.java
79:90 (11%)
98:109 (11%)
122:133 (11%)
view
8 x 3 spring-boot-project/spri.../boot/autoconfigure/web
spring-boot-project/spri...utoconfigure/web/server
spring-boot-project/spri...t/autoconfigure/rsocket
ServerProperties.java
ManagementServerProperties.java
RSocketProperties.java
127:140 (1%)
63:82 (25%)
68:81 (25%)
view
7 x 3 spring-boot-project/spri...autoconfigure/condition
spring-boot-project/spri...i/compiler/dependencies
spring-boot-project/spri...i/compiler/dependencies
ConditionOutcome.java
Dependency.java
Dependency.java
126:134 (16%)
100:108 (8%)
168:176 (8%)
view
6 x 3 spring-boot-project/spri...toconfigure/integration
spring-boot-project/spri...t/autoconfigure/session
spring-boot-project/spri...oot/autoconfigure/batch
IntegrationDataSourceInitializer.java
JdbcSessionDataSourceInitializer.java
BatchDataSourceInitializer.java
43:50 (46%)
43:50 (46%)
44:51 (31%)
view
7 x 3 spring-boot-project/spri...te/endpoint/web/servlet
spring-boot-project/spri...te/endpoint/web/servlet
spring-boot-project/spri...e/endpoint/web/reactive
ControllerEndpointHandlerMapping.java
AbstractWebMvcEndpointHandlerMapping....
AbstractWebFluxEndpointHandlerMapping...
115:125 (13%)
209:219 (3%)
191:201 (3%)
view