openai / openai-cli
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:
    • 2,993 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 156 duplicated lines
  • 8 duplicates
system5% (156 lines)
dependency graphs: 2D graph | 2D graph (with duplicates)... | 3D graph | 3D graph (with duplicates)...
Duplication per Extension
go5% (156 lines)
Duplication per Component (primary)
internal6% (138 lines)
pkg2% (18 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
37 x 2 internal/requestflag
internal/requestflag
147:192 (22%)
457:504 (6%)
view
9 x 2 internal/requestflag
internal/requestflag
169:183 (1%)
203:215 (1%)
view
9 x 2 pkg/cmd
pkg/cmd
447:456 (2%)
496:505 (2%)
view
8 x 2 internal/jsonview
internal/jsonview
592:601 (1%)
631:640 (1%)
view
6 x 2 internal/requestflag
internal/requestflag
15:20 (3%)
44:49 (1%)
view
6 x 2 internal/jsonview
internal/jsonview
635:640 (1%)
669:674 (1%)
view
6 x 2 internal/jsonview
internal/jsonview
596:601 (1%)
669:674 (1%)
view
6 x 2 internal/jsonview
internal/jsonview
308:315 (1%)
356:362 (1%)
view
Most Frequent Duplicates
The list of 1 most frequently found duplicates.
Size#FoldersFilesLinesCode
6 x 3 internal/jsonview
internal/jsonview
internal/jsonview
596:601 (1%)
635:640 (1%)
669:674 (1%)
view