pytorch / android-demo-app
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
  • 45% duplication:
    • 6,162 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,784 duplicated lines
  • 221 duplicates
system45% (2,784 lines)
Duplication per Extension
xml69% (2,749 lines)
java2% (35 lines)
Duplication per Component (primary)
D2Go78% (305 lines)
ObjectDetection94% (305 lines)
TorchVideo73% (252 lines)
ASLRecognition46% (252 lines)
StreamingASR45% (238 lines)
ImageSegmentation61% (231 lines)
SpeechRecognition79% (215 lines)
ViT4MNIST48% (202 lines)
QuestionAnswering73% (202 lines)
Seq2SeqNMT42% (201 lines)
HelloWorldApp15% (196 lines)
PyTorchDemoApp20% (174 lines)
NativeApp10% (11 lines)

Duplication Between Components (50+ lines)

G D2Go D2Go ObjectDetection ObjectDetection D2Go--ObjectDetection 610 TorchVideo TorchVideo D2Go--TorchVideo 474 StreamingASR StreamingASR D2Go--StreamingASR 402 SpeechRecognition SpeechRecognition D2Go--SpeechRecognition 402 ImageSegmentation ImageSegmentation D2Go--ImageSegmentation 416 QuestionAnswering QuestionAnswering D2Go--QuestionAnswering 402 ViT4MNIST ViT4MNIST D2Go--ViT4MNIST 402 Seq2SeqNMT Seq2SeqNMT D2Go--Seq2SeqNMT 402 HelloWorldApp HelloWorldApp D2Go--HelloWorldApp 368 ObjectDetection--TorchVideo 474 ObjectDetection--StreamingASR 402 ObjectDetection--SpeechRecognition 402 ObjectDetection--QuestionAnswering 402 ObjectDetection--ViT4MNIST 402 ObjectDetection--Seq2SeqNMT 402 TorchVideo--ViT4MNIST 402 ASLRecognition ASLRecognition ASLRecognition--D2Go 430 ASLRecognition--ObjectDetection 430 ASLRecognition--TorchVideo 436 ASLRecognition--StreamingASR 450 ASLRecognition--SpeechRecognition 404 ASLRecognition--ImageSegmentation 424 ASLRecognition--QuestionAnswering 404 ASLRecognition--ViT4MNIST 404 ASLRecognition--Seq2SeqNMT 402 StreamingASR--TorchVideo 402 StreamingASR--ViT4MNIST 404 SpeechRecognition--TorchVideo 402 SpeechRecognition--StreamingASR 430 SpeechRecognition--ViT4MNIST 404 ImageSegmentation--ObjectDetection 416 ImageSegmentation--TorchVideo 402 ImageSegmentation--StreamingASR 404 ImageSegmentation--SpeechRecognition 404 ImageSegmentation--QuestionAnswering 404 ImageSegmentation--ViT4MNIST 404 ImageSegmentation--Seq2SeqNMT 402 QuestionAnswering--TorchVideo 402 QuestionAnswering--StreamingASR 404 QuestionAnswering--SpeechRecognition 404 QuestionAnswering--ViT4MNIST 404 QuestionAnswering--Seq2SeqNMT 402 Seq2SeqNMT--TorchVideo 402 Seq2SeqNMT--StreamingASR 402 Seq2SeqNMT--SpeechRecognition 402 Seq2SeqNMT--ViT4MNIST 402 HelloWorldApp--ObjectDetection 368 HelloWorldApp--SpeechRecognition 368 HelloWorldApp--ImageSegmentation 392 HelloWorldApp--Seq2SeqNMT 368

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 50 longest duplicates.
See data for all 221 duplicates...
Size#FoldersFilesLinesCode
169 x 2 ASLRecognition/app/src/main/res/drawable
StreamingASR/StreamingAS...p/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ASLRecognition/app/src/main/res/drawable
QuestionAnswering/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ASLRecognition/app/src/main/res/drawable
ObjectDetection/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 Seq2SeqNMT/app/src/main/res/drawable
SpeechRecognition/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ImageSegmentation/app/src/main/res/drawable
QuestionAnswering/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 QuestionAnswering/app/src/main/res/drawable
SpeechRecognition/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ImageSegmentation/app/src/main/res/drawable
TorchVideo/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 QuestionAnswering/app/src/main/res/drawable
ViT4MNIST/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ObjectDetection/app/src/main/res/drawable
QuestionAnswering/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 StreamingASR/StreamingAS...p/src/main/res/drawable
ViT4MNIST/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 QuestionAnswering/app/src/main/res/drawable
Seq2SeqNMT/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 Seq2SeqNMT/app/src/main/res/drawable
StreamingASR/StreamingAS...p/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ObjectDetection/app/src/main/res/drawable
SpeechRecognition/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ASLRecognition/app/src/main/res/drawable
Seq2SeqNMT/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ASLRecognition/app/src/main/res/drawable
ViT4MNIST/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 QuestionAnswering/app/src/main/res/drawable
TorchVideo/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 D2Go/ObjectDetection/app/src/main/res/drawable
ImageSegmentation/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 TorchVideo/app/src/main/res/drawable
ViT4MNIST/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 D2Go/ObjectDetection/app/src/main/res/drawable
ObjectDetection/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ASLRecognition/app/src/main/res/drawable
SpeechRecognition/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 SpeechRecognition/app/src/main/res/drawable
StreamingASR/StreamingAS...p/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ObjectDetection/app/src/main/res/drawable
ViT4MNIST/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 D2Go/ObjectDetection/app/src/main/res/drawable
StreamingASR/StreamingAS...p/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 D2Go/ObjectDetection/app/src/main/res/drawable
QuestionAnswering/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 D2Go/ObjectDetection/app/src/main/res/drawable
TorchVideo/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 Seq2SeqNMT/app/src/main/res/drawable
TorchVideo/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 D2Go/ObjectDetection/app/src/main/res/drawable
SpeechRecognition/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ASLRecognition/app/src/main/res/drawable
D2Go/ObjectDetection/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ImageSegmentation/app/src/main/res/drawable
SpeechRecognition/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 QuestionAnswering/app/src/main/res/drawable
StreamingASR/StreamingAS...p/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ObjectDetection/app/src/main/res/drawable
TorchVideo/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 D2Go/ObjectDetection/app/src/main/res/drawable
Seq2SeqNMT/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ASLRecognition/app/src/main/res/drawable
TorchVideo/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 Seq2SeqNMT/app/src/main/res/drawable
ViT4MNIST/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 SpeechRecognition/app/src/main/res/drawable
ViT4MNIST/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ASLRecognition/app/src/main/res/drawable
ImageSegmentation/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ImageSegmentation/app/src/main/res/drawable
StreamingASR/StreamingAS...p/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 StreamingASR/StreamingAS...p/src/main/res/drawable
TorchVideo/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ImageSegmentation/app/src/main/res/drawable
ObjectDetection/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ObjectDetection/app/src/main/res/drawable
Seq2SeqNMT/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ImageSegmentation/app/src/main/res/drawable
Seq2SeqNMT/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ImageSegmentation/app/src/main/res/drawable
ViT4MNIST/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 D2Go/ObjectDetection/app/src/main/res/drawable
ViT4MNIST/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 SpeechRecognition/app/src/main/res/drawable
TorchVideo/app/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
169 x 2 ObjectDetection/app/src/main/res/drawable
StreamingASR/StreamingAS...p/src/main/res/drawable
1:169 (100%)
1:169 (100%)
view
161 x 2 HelloWorldApp/app/src/main/res/drawable
SpeechRecognition/app/src/main/res/drawable
9:169 (95%)
9:169 (95%)
view
161 x 2 D2Go/ObjectDetection/app/src/main/res/drawable
HelloWorldApp/app/src/main/res/drawable
9:169 (95%)
9:169 (95%)
view
161 x 2 HelloWorldApp/app/src/main/res/drawable
Seq2SeqNMT/app/src/main/res/drawable
9:169 (95%)
9:169 (95%)
view
161 x 2 HelloWorldApp/app/src/main/res/drawable
ImageSegmentation/app/src/main/res/drawable
9:169 (95%)
9:169 (95%)
view
161 x 2 HelloWorldApp/app/src/main/res/drawable
ObjectDetection/app/src/main/res/drawable
9:169 (95%)
9:169 (95%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
15 x 2 ImageSegmentation/app/sr...torch/imagesegmentation
HelloWorldApp/app/src/ma.../org/pytorch/helloworld
44:61 
83:100 
view