golang / protobuf
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
  • 3% duplication:
    • 10,609 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 324 duplicated lines
  • 18 duplicates
system3% (324 lines)
Duplication per Extension
go3% (324 lines)
Duplication per Component (primary)
internal/testprotos2% (130 lines)
jsonpb11% (82 lines)
proto2% (46 lines)
protoc-gen-go/generator2% (40 lines)
protoc-gen-go/grpc5% (20 lines)
internal/gengogrpc2% (6 lines)
descriptor0% (0 lines)
protoc-gen-go/descriptor0% (0 lines)
protoc-gen-go0% (0 lines)
protoc-gen-go/plugin0% (0 lines)
ROOT0% (0 lines)
ptypes0% (0 lines)
ptypes/wrappers0% (0 lines)
ptypes/any0% (0 lines)
ptypes/empty0% (0 lines)
ptypes/timestamp0% (0 lines)
ptypes/duration0% (0 lines)
ptypes/struct0% (0 lines)
internal/cmd0% (0 lines)

Duplication Between Components (50+ lines)

G jsonpb jsonpb proto proto jsonpb--proto 64

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 18 longest duplicates.
See data for all 18 duplicates...
Size#FoldersFilesLinesCode
20 x 2 internal/testprotos/proto2_proto
internal/testprotos/proto3_proto
test.pb.go
test.pb.go
3632:3665 (<1%)
463:496 (5%)
view
19 x 2 jsonpb
proto
encode.go
text_encode.go
452:471 (5%)
298:317 (5%)
view
13 x 2 jsonpb
proto
encode.go
text_encode.go
271:286 (3%)
502:517 (3%)
view
12 x 2 internal/testprotos/proto2_proto
internal/testprotos/proto3_proto
test.pb.go
test.pb.go
3592:3610 (<1%)
423:441 (3%)
view
11 x 2 internal/testprotos/proto2_proto
internal/testprotos/proto3_proto
test.pb.go
test.pb.go
3004:3020 (<1%)
300:316 (2%)
view
8 x 2 internal/testprotos/proto2_proto
internal/testprotos/proto3_proto
test.pb.go
test.pb.go
3614:3628 (<1%)
445:459 (2%)
view
8 x 2 protoc-gen-go/generator
protoc-gen-go/generator
generator.go
generator.go
161:169 (<1%)
207:216 (<1%)
view
7 x 2 jsonpb
jsonpb
decode.go
decode.go
335:344 (2%)
368:377 (2%)
view
7 x 2 proto
proto
text_decode.go
text_decode.go
191:197 (1%)
309:315 (1%)
view
7 x 2 internal/testprotos/proto2_proto
internal/testprotos/proto3_proto
test.pb.go
test.pb.go
2992:3000 (<1%)
288:296 (1%)
view
7 x 2 internal/testprotos/proto2_proto
internal/testprotos/proto3_proto
test.pb.go
test.pb.go
3580:3588 (<1%)
411:419 (1%)
view
7 x 2 protoc-gen-go/grpc
protoc-gen-go/grpc
grpc.go
grpc.go
394:402 (2%)
418:426 (2%)
view
6 x 2 jsonpb
jsonpb
encode.go
encode.go
435:442 (1%)
497:504 (1%)
view
6 x 2 protoc-gen-go/generator
protoc-gen-go/generator
generator.go
generator.go
1711:1718 (<1%)
2013:2020 (<1%)
view
6 x 2 jsonpb
jsonpb
decode.go
encode.go
166:172 (1%)
325:331 (1%)
view
6 x 2 jsonpb
jsonpb
encode.go
encode.go
427:432 (1%)
476:481 (1%)
view
6 x 2 internal/gengogrpc
protoc-gen-go/grpc
grpc.go
grpc.go
230:235 (2%)
324:329 (1%)
view
6 x 2 protoc-gen-go/generator
protoc-gen-go/generator
generator.go
generator.go
2326:2331 (<1%)
2353:2358 (<1%)
view