pytorch / ios-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:
    • 3,465 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,574 duplicated lines
  • 174 duplicates
system45% (1,574 lines)
Duplication per Extension
swift59% (1,272 lines)
mm34% (239 lines)
h48% (63 lines)
Duplication per Component (primary)
ObjectDetection72% (304 lines)
D2Go68% (303 lines)
TorchVideo56% (227 lines)
PyTorchDemo43% (224 lines)
HelloWorld90% (112 lines)
HelloWorld-CoreML70% (106 lines)
HelloWorld-Metal91% (100 lines)
ImageSegmentation29% (69 lines)
ViT4MNIST13% (45 lines)
QuestionAnswering18% (33 lines)
SpeechRecognition18% (30 lines)
Seq2SeqNMT5% (21 lines)

Duplication Between Components (50+ lines)

G D2Go D2Go ObjectDetection ObjectDetection D2Go--ObjectDetection 592 TorchVideo TorchVideo D2Go--TorchVideo 416 PyTorchDemo PyTorchDemo D2Go--PyTorchDemo 240 HelloWorld-CoreML HelloWorld-CoreML D2Go--HelloWorld-CoreML 78 HelloWorld HelloWorld D2Go--HelloWorld 78 HelloWorld-Metal HelloWorld-Metal D2Go--HelloWorld-Metal 78 ImageSegmentation ImageSegmentation D2Go--ImageSegmentation 92 ObjectDetection--TorchVideo 406 ObjectDetection--PyTorchDemo 252 PyTorchDemo--TorchVideo 240 HelloWorld-CoreML--ObjectDetection 90 HelloWorld-CoreML--TorchVideo 78 HelloWorld-CoreML--HelloWorld 212 HelloWorld-CoreML--HelloWorld-Metal 190 HelloWorld-CoreML--ImageSegmentation 80 HelloWorld--ObjectDetection 90 HelloWorld--TorchVideo 78 HelloWorld--ImageSegmentation 80 HelloWorld-Metal--ObjectDetection 90 HelloWorld-Metal--TorchVideo 78 HelloWorld-Metal--HelloWorld 200 HelloWorld-Metal--ImageSegmentation 80 ImageSegmentation--ObjectDetection 78 ImageSegmentation--TorchVideo 92 QuestionAnswering QuestionAnswering ViT4MNIST ViT4MNIST QuestionAnswering--ViT4MNIST 66 SpeechRecognition SpeechRecognition QuestionAnswering--SpeechRecognition 60 SpeechRecognition--ViT4MNIST 60

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 174 duplicates...
Size#FoldersFilesLinesCode
84 x 2 D2Go/D2Go/Live
ObjectDetection/ObjectDetection/Live
CameraController.swift
CameraController.swift
10:133 (100%)
10:133 (100%)
view
72 x 2 ObjectDetection/ObjectDetection/Live
TorchVideo/TorchVideo
CameraController.swift
CameraController.swift
10:115 (85%)
10:115 (85%)
view
72 x 2 D2Go/D2Go/Live
TorchVideo/TorchVideo
CameraController.swift
CameraController.swift
10:115 (85%)
10:115 (85%)
view
70 x 2 D2Go/D2Go/Live
PyTorchDemo/PyTorchDemo/ImageClassification
CameraController.swift
CameraController.swift
12:115 (83%)
8:111 (81%)
view
70 x 2 PyTorchDemo/PyTorchDemo/ImageClassification
TorchVideo/TorchVideo
CameraController.swift
CameraController.swift
8:111 (81%)
12:115 (83%)
view
70 x 2 ObjectDetection/ObjectDetection/Live
PyTorchDemo/PyTorchDemo/ImageClassification
CameraController.swift
CameraController.swift
12:115 (83%)
8:111 (81%)
view
34 x 2 HelloWorld/HelloWorld/HelloWorld
ImageSegmentation/ImageSegmentation
UIImage+Helper.swift
UIImage+Helper.swift
3:45 (100%)
11:53 (100%)
view
34 x 2 HelloWorld-Metal/HelloWorld-Metal/HelloWorld-Metal
HelloWorld/HelloWorld/HelloWorld
UIImage+Helper.swift
UIImage+Helper.swift
3:45 (100%)
3:45 (100%)
view
34 x 2 HelloWorld-Metal/HelloWorld-Metal/HelloWorld-Metal
ImageSegmentation/ImageSegmentation
UIImage+Helper.swift
UIImage+Helper.swift
3:45 (100%)
11:53 (100%)
view
34 x 2 HelloWorld-CoreML/HelloWorld/HelloWorld
HelloWorld/HelloWorld/HelloWorld
UIImage+Helper.swift
UIImage+Helper.swift
3:45 (100%)
3:45 (100%)
view
34 x 2 D2Go/D2Go/Utils
ObjectDetection/ObjectDetection/Utils
UIImage+Helper.swift
UIImage+Helper.swift
9:49 (100%)
9:49 (100%)
view
34 x 2 HelloWorld-CoreML/HelloWorld/HelloWorld
HelloWorld-Metal/HelloWorld-Metal/HelloWorld-Metal
UIImage+Helper.swift
UIImage+Helper.swift
3:45 (100%)
3:45 (100%)
view
34 x 2 HelloWorld-CoreML/HelloWorld/HelloWorld
ImageSegmentation/ImageSegmentation
UIImage+Helper.swift
UIImage+Helper.swift
3:45 (100%)
11:53 (100%)
view
32 x 2 HelloWorld-Metal/HelloWorld-Metal/HelloWorld-Metal
HelloWorld/HelloWorld/HelloWorld
ViewController.swift
ViewController.swift
3:41 (100%)
3:41 (100%)
view
31 x 2 D2Go/D2Go/Live
ObjectDetection/ObjectDetection/Live
LiveObjectDetectionViewController.swift
LiveObjectDetectionViewController.swift
10:48 (67%)
10:48 (67%)
view
30 x 2 HelloWorld/HelloWorld/HelloWorld
ObjectDetection/ObjectDetection/Utils
UIImage+Helper.swift
UIImage+Helper.swift
3:40 (88%)
9:44 (88%)
view
30 x 2 HelloWorld-CoreML/HelloWorld/HelloWorld
TorchVideo/TorchVideo
UIImage+Helper.swift
UIImage+Helper.swift
3:40 (88%)
9:44 (88%)
view
30 x 2 D2Go/D2Go/Utils
HelloWorld/HelloWorld/HelloWorld
UIImage+Helper.swift
UIImage+Helper.swift
9:44 (88%)
3:40 (88%)
view
30 x 2 ImageSegmentation/ImageSegmentation
TorchVideo/TorchVideo
UIImage+Helper.swift
UIImage+Helper.swift
11:48 (88%)
9:44 (88%)
view
30 x 2 D2Go/D2Go/Live
TorchVideo/TorchVideo
CVPixelBuffer+Helper.swift
CVPixelBuffer+Helper.swift
11:44 (100%)
11:44 (100%)
view
Duplicated Units
The list of top 8 duplicated units.
See data for all 8 unit duplicates...
Size#FoldersFilesLinesCode
33 x 3 TorchVideo/TorchVideo
D2Go/D2Go/Live
ObjectDetection/ObjectDetection/Live
CVPixelBuffer+Helper.swift
CVPixelBuffer+Helper.swift
CVPixelBuffer+Helper.swift
12:45 
12:45 
12:45 
view
30 x 4 HelloWorld/HelloWorld/HelloWorld
HelloWorld-CoreML/HelloWorld/HelloWorld
ImageSegmentation/ImageSegmentation
HelloWorld-Metal/HelloWorld-Metal/HelloWorld-Metal
UIImage+Helper.swift
UIImage+Helper.swift
UIImage+Helper.swift
UIImage+Helper.swift
14:46 
14:46 
22:54 
14:46 
view
30 x 2 D2Go/D2Go/Utils
ObjectDetection/ObjectDetection/Utils
UIImage+Helper.swift
UIImage+Helper.swift
20:50 
20:50 
view
27 x 4 TorchVideo/TorchVideo
D2Go/D2Go/Live
ObjectDetection/ObjectDetection/Live
PyTorchDemo/PyTorchDemo/ImageClassification
CameraController.swift
CameraController.swift
CameraController.swift
CameraController.swift
23:50 
23:50 
23:50 
19:46 
view
11 x 2 D2Go/D2Go/Live
ObjectDetection/ObjectDetection/Live
CameraController.swift
CameraController.swift
112:123 
112:123 
view
7 x 4 TorchVideo/TorchVideo
D2Go/D2Go/Live
ObjectDetection/ObjectDetection/Live
PyTorchDemo/PyTorchDemo/ImageClassification
CameraController.swift
CameraController.swift
CameraController.swift
CameraController.swift
52:59 
52:59 
52:59 
48:55 
view
6 x 4 TorchVideo/TorchVideo
D2Go/D2Go/Live
ObjectDetection/ObjectDetection/Live
PyTorchDemo/PyTorchDemo/ImageClassification
CameraController.swift
CameraController.swift
CameraController.swift
CameraController.swift
24:30 
24:30 
24:30 
20:26 
view
6 x 2 PyTorchDemo/PyTorchDemo/ImageClassification/view
PyTorchDemo/PyTorchDemo/NLP/view
ImageClassificationResultView.swift
NLPResultView.swift
34:40 
32:38 
view