awslabs / aws-greengrass-labs-kvs-stream-uploader
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
  • 15% duplication:
    • 3,194 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 509 duplicated lines
  • 31 duplicates
system15% (509 lines)
Duplication per Extension
java15% (509 lines)
Duplication per Component (primary)
integrationtests/java/com/aws/iot/integrationtests/edgeconnectorforkvs/videorecorder42% (273 lines)
main/java/com/aws/iot/edgeconnectorforkvs/videouploader/mkv25% (124 lines)
integrationtests/java/com/aws/iot/integrationtests/edgeconnectorforkvs51% (72 lines)
integrationtests/java/com/aws/iot/integrationtests/edgeconnectorforkvs/videouploader32% (40 lines)
main/java/com/aws/iot/iotlab/streamuploader0% (0 lines)
main/java/com/aws/iot/iotlab/streamuploader/model0% (0 lines)
main/java/com/aws/iot/edgeconnectorforkvs/videouploader0% (0 lines)
main/java/com/aws/iot/edgeconnectorforkvs/videouploader/model0% (0 lines)
main/java/com/aws/iot/edgeconnectorforkvs/videouploader/visitors0% (0 lines)
main/java/com/aws/iot/edgeconnectorforkvs/videouploader/callback0% (0 lines)
main/java/com/aws/iot/edgeconnectorforkvs/util0% (0 lines)
main/java/com/aws/iot/edgeconnectorforkvs/videorecorder0% (0 lines)
main/java/com/aws/iot/edgeconnectorforkvs/videorecorder/model0% (0 lines)
main/java/com/aws/iot/edgeconnectorforkvs/videorecorder/util0% (0 lines)
main/java/com/aws/iot/edgeconnectorforkvs/videorecorder/callback0% (0 lines)
main/java/com/aws/iot/edgeconnectorforkvs/videorecorder/base0% (0 lines)

Duplication Between Components (50+ lines)

G integrationtests/java/com/aws/iot/integrationtests/edgeconnectorforkvs integrationtests/java/com/aws/iot/integrationtests/edgeconnectorforkvs integrationtests/java/com/aws/iot/integrationtests/edgeconnectorforkvs/videouploader integrationtests/java/com/aws/iot/integrationtests/edgeconnectorforkvs/videouploader integrationtests/java/com/aws/iot/integrationtests/edgeconnectorforkvs--integrationtests/java/com/aws/iot/integrationtests/edgeconnectorforkvs/videouploader 112

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 31 duplicates...
Size#FoldersFilesLinesCode
39 x 2 src/main/java/com/aws/io...orkvs/videouploader/mkv
src/main/java/com/aws/io...orkvs/videouploader/mkv
MkvFilesInputStream.java
MkvInputStream.java
63:117 (39%)
56:110 (58%)
view
37 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderToggleAppPathTest.java
VideoRecorderToggleSetAppPathTest.java
23:65 (27%)
23:65 (25%)
view
29 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderNewRecorderAppPathTest.java
VideoRecorderToggleSetAppPathTest.java
81:119 (21%)
101:139 (19%)
view
25 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderNewRecorderAppPathTest.java
VideoRecorderToggleAppPathTest.java
71:102 (18%)
85:116 (18%)
view
20 x 2 src/integrationtests/jav...sts/edgeconnectorforkvs
src/integrationtests/jav...sts/edgeconnectorforkvs
HistoricalUploadingIntegrationTest.java
LiveUploadingIntegrationTest.java
144:168 (25%)
110:134 (31%)
view
20 x 2 src/integrationtests/jav...sts/edgeconnectorforkvs
src/integrationtests/jav...torforkvs/videouploader
LiveUploadingIntegrationTest.java
VideoUploaderIntegrationTest.java
110:134 (31%)
142:166 (16%)
view
20 x 2 src/integrationtests/jav...sts/edgeconnectorforkvs
src/integrationtests/jav...torforkvs/videouploader
HistoricalUploadingIntegrationTest.java
VideoUploaderIntegrationTest.java
144:168 (25%)
142:166 (16%)
view
19 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderToggleAppPathTest.java
VideoRecorderToggleSetAppPathTest.java
95:116 (14%)
101:122 (12%)
view
15 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderToggleAppPathTest.java
VideoRecorderToggleSetAppPathTest.java
140:165 (11%)
144:169 (10%)
view
12 x 2 src/integrationtests/jav...sts/edgeconnectorforkvs
src/integrationtests/jav...sts/edgeconnectorforkvs
HistoricalUploadingIntegrationTest.java
LiveUploadingIntegrationTest.java
54:69 (15%)
54:69 (19%)
view
12 x 2 src/integrationtests/jav...sts/edgeconnectorforkvs
src/integrationtests/jav...torforkvs/videouploader
HistoricalUploadingIntegrationTest.java
VideoUploaderIntegrationTest.java
54:69 (15%)
57:72 (9%)
view
12 x 2 src/integrationtests/jav...sts/edgeconnectorforkvs
src/integrationtests/jav...torforkvs/videouploader
LiveUploadingIntegrationTest.java
VideoUploaderIntegrationTest.java
54:69 (19%)
57:72 (9%)
view
11 x 2 src/main/java/com/aws/io...orkvs/videouploader/mkv
src/main/java/com/aws/io...orkvs/videouploader/mkv
MkvDataRawElement.java
MkvParentRawElement.java
78:98 (20%)
84:104 (20%)
view
10 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderNewRecorderAppPathTest.java
VideoRecorderToggleAppPathTest.java
45:56 (7%)
57:68 (7%)
view
9 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderNewRecorderAppPathTest.java
VideoRecorderToggleAppPathTest.java
108:119 (6%)
122:133 (6%)
view
9 x 2 src/main/java/com/aws/io...orkvs/videouploader/mkv
src/main/java/com/aws/io...orkvs/videouploader/mkv
MkvFilesInputStream.java
MkvInputStream.java
179:187 (9%)
128:136 (13%)
view
9 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderToggleAppPathTest.java
VideoRecorderToggleSetAppPathTest.java
122:133 (6%)
128:139 (6%)
view
8 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderNewRecorderAppPathTest.java
VideoRecorderToggleSetAppPathTest.java
26:34 (6%)
33:41 (5%)
view
8 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderNewRecorderAppPathTest.java
VideoRecorderToggleAppPathTest.java
26:34 (6%)
33:41 (5%)
view
8 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderNewRecorderAppPathTest.java
VideoRecorderToggleSetAppPathTest.java
45:53 (6%)
57:65 (5%)
view
Duplicated Units
The list of top 11 duplicated units.
See data for all 11 unit duplicates...
Size#FoldersFilesLinesCode
24 x 3 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderToggleSetAppPathTest.java
VideoRecorderToggleAppPathTest.java
VideoRecorderNewRecorderAppPathTest.java
101:125 
95:119 
81:105 
view
22 x 3 src/integrationtests/jav...torforkvs/videouploader
src/integrationtests/jav...sts/edgeconnectorforkvs
src/integrationtests/jav...sts/edgeconnectorforkvs
VideoUploaderIntegrationTest.java
HistoricalUploadingIntegrationTest.java
LiveUploadingIntegrationTest.java
142:167 
144:169 
110:135 
view
12 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderToggleSetAppPathTest.java
VideoRecorderNewRecorderAppPathTest.java
127:142 
107:122 
view
11 x 2 src/main/java/com/aws/io...orkvs/videouploader/mkv
src/main/java/com/aws/io...orkvs/videouploader/mkv
MkvInputStream.java
MkvFilesInputStream.java
57:68 
64:75 
view
11 x 2 src/main/java/com/aws/io...orkvs/videouploader/mkv
src/main/java/com/aws/io...orkvs/videouploader/mkv
MkvInputStream.java
MkvFilesInputStream.java
128:139 
179:190 
view
9 x 2 src/integrationtests/jav...torforkvs/videouploader
src/integrationtests/jav...sts/edgeconnectorforkvs
VideoUploaderIntegrationTest.java
HistoricalUploadingIntegrationTest.java
169:180 
131:142 
view
8 x 3 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderToggleSetAppPathTest.java
VideoRecorderToggleAppPathTest.java
VideoRecorderNewRecorderAppPathTest.java
84:92 
84:92 
70:78 
view
8 x 2 src/integrationtests/jav...torforkvs/videorecorder
src/integrationtests/jav...torforkvs/videorecorder
VideoRecorderToggleSetAppPathTest.java
VideoRecorderToggleAppPathTest.java
156:167 
152:163 
view
8 x 2 src/main/java/com/aws/io...orkvs/videouploader/mkv
src/main/java/com/aws/io...orkvs/videouploader/mkv
MkvInputStream.java
MkvFilesInputStream.java
71:80 
78:87 
view
6 x 2 src/main/java/com/aws/io...orkvs/videouploader/mkv
src/main/java/com/aws/io...orkvs/videouploader/mkv
MkvInputStream.java
MkvFilesInputStream.java
88:94 
95:101 
view
6 x 2 src/main/java/com/aws/io...orkvs/videouploader/mkv
src/main/java/com/aws/io...orkvs/videouploader/mkv
MkvInputStream.java
MkvFilesInputStream.java
97:103 
104:110 
view