awslabs / aws-sdk-ios-samples
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
  • 4% duplication:
    • 1,211 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 52 duplicated lines
  • 4 duplicates
system4% (52 lines)
Duplication per Extension
swift4% (40 lines)
m3% (12 lines)
Duplication per Component (primary)
IoT-Sample/Swift/IoTSampleSwift3% (14 lines)
S3TransferUtility-Sample/Swift/S3BackgroundTransferSampleSwift10% (14 lines)
S3TransferUtility-Sample/Objective-C/S3BackgroundTransferSampleObjC8% (12 lines)
Polly-Sample/Swift/PollySample4% (6 lines)
Lex-Sample/Swift/LexSwift3% (6 lines)
S3TransferUtility-Sample/Swift/S3TransferUtilitySampleSwiftUITests0% (0 lines)
Lex-Sample/ObjC/Lex-Sample0% (0 lines)
Longest Duplicates
The list of 4 longest duplicates.
See data for all 4 duplicates...
Size#FoldersFilesLinesCode
7 x 2 IoT-Sample/Swift/IoTSampleSwift
IoT-Sample/Swift/IoTSampleSwift
ConfigurationViewController.swift
ConfigurationViewController.swift
93:102 (7%)
119:128 (7%)
view
7 x 2 S3TransferUtility-Sample...oundTransferSampleSwift
S3TransferUtility-Sample...oundTransferSampleSwift
DownloadViewController.swift
UploadViewController.swift
27:36 (13%)
29:38 (10%)
view
6 x 2 Lex-Sample/Swift/LexSwift
Polly-Sample/Swift/PollySample
AppDelegate.swift
AppDelegate.swift
21:31 (37%)
20:28 (60%)
view
6 x 2 S3TransferUtility-Sample...roundTransferSampleObjC
S3TransferUtility-Sample...roundTransferSampleObjC
FirstViewController.m
SecondViewController.m
93:99 (10%)
80:86 (12%)
view