awslabs / yesiscan
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
  • 5% duplication:
    • 1,495 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 80 duplicated lines
  • 8 duplicates
system5% (80 lines)
Duplication per Extension
go5% (80 lines)
Duplication per Component (primary)
util/safepath15% (54 lines)
interfaces18% (14 lines)
iterator2% (12 lines)
lib0% (0 lines)
util0% (0 lines)
util/licenses0% (0 lines)
util/errwrap0% (0 lines)
parser0% (0 lines)
backend0% (0 lines)
cmd/yesiscan0% (0 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
8 x 2 util/safepath
util/safepath
safepath.go
safepath.go
442:458 (2%)
566:582 (2%)
view
7 x 2 interfaces
interfaces
interfaces.go
interfaces.go
311:321 (9%)
326:336 (9%)
view
6 x 2 util/safepath
util/safepath
safepath.go
safepath.go
189:200 (1%)
566:577 (1%)
view
6 x 2 util/safepath
util/safepath
safepath.go
safepath.go
216:226 (1%)
467:477 (1%)
view
6 x 2 iterator
iterator
fs.go
git.go
298:304 (4%)
404:410 (2%)
view
6 x 2 util/safepath
util/safepath
safepath.go
safepath.go
346:353 (1%)
591:598 (1%)
view
6 x 2 util/safepath
util/safepath
safepath.go
safepath.go
189:200 (1%)
442:453 (1%)
view
6 x 2 util/safepath
util/safepath
safepath.go
safepath.go
196:207 (1%)
323:334 (1%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
11 x 2 util/safepath
util/safepath
safepath.go
safepath.go
441:459 
565:583 
view
9 x 2 util/safepath
util/safepath
safepath.go
safepath.go
215:227 
466:478 
view