facebookresearch / dachshund
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
  • 14% duplication:
    • 4,225 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 619 duplicated lines
  • 1,155 duplicates
system14% (619 lines)
Duplication per Extension
rs14% (619 lines)
Duplication per Component (primary)
src/dachshund14% (419 lines)
src/dachshund/algorithms13% (143 lines)
src38% (57 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G src/dachshund/algorithms src/dachshund/algorithms src/dachshund src/dachshund src/dachshund/algorithms--src/dachshund 266 src src src/dachshund--src 204 src--src/dachshund/algorithms 114

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 1,155 duplicates...
Size#FoldersFilesLinesCode
16 x 2 src/dachshund
src/dachshund
connected_components_transformer.rs
simple_transformer.rs
41:59 (28%)
115:133 (10%)
view
16 x 2 src/dachshund
src/dachshund
connected_components_transformer.rs
core_transformer.rs
41:59 (28%)
52:71 (21%)
view
16 x 2 src/dachshund
src/dachshund
core_transformer.rs
simple_transformer.rs
52:71 (21%)
115:133 (10%)
view
15 x 2 src/dachshund
src/dachshund
line_processor.rs
line_processor.rs
43:61 (17%)
92:110 (17%)
view
14 x 2 src/dachshund
src/dachshund
core_transformer.rs
simple_transformer.rs
52:69 (18%)
144:160 (9%)
view
14 x 2 src
src
connected_component_extractor.rs
simple_graph_featurizer.rs
1:17 (82%)
1:17 (82%)
view
14 x 2 src/dachshund
src/dachshund
connected_components_transformer.rs
simple_transformer.rs
41:57 (25%)
144:160 (9%)
view
14 x 2 src/dachshund
src/dachshund
simple_transformer.rs
simple_transformer.rs
115:131 (9%)
144:160 (9%)
view
11 x 2 src
src
clique_miner.rs
core_miner.rs
1:13 (25%)
1:13 (61%)
view
10 x 2 src
src
connected_component_extractor.rs
core_miner.rs
1:11 (58%)
1:11 (55%)
view
10 x 2 src
src
clique_miner.rs
simple_graph_featurizer.rs
1:11 (23%)
1:11 (58%)
view
10 x 2 src
src
clique_miner.rs
connected_component_extractor.rs
1:11 (23%)
1:11 (58%)
view
10 x 2 src
src
core_miner.rs
simple_graph_featurizer.rs
1:11 (55%)
1:11 (58%)
view
9 x 2 src/dachshund/algorithms
src/dachshund/algorithms
adjacency_matrix.rs
transitivity.rs
1:9 (26%)
1:9 (16%)
view
9 x 2 src/dachshund
src/dachshund
connected_components_transformer.rs
weighted_core_transformer.rs
46:56 (16%)
49:60 (13%)
view
9 x 2 src/dachshund
src/dachshund
connected_components_transformer.rs
simple_transformer.rs
1:9 (16%)
1:9 (6%)
view
9 x 2 src/dachshund/algorithms
src/dachshund/algorithms
eigenvector_centrality.rs
laplacian.rs
1:9 (31%)
1:9 (33%)
view
9 x 2 src/dachshund
src/dachshund
line_processor.rs
transformer_base.rs
1:10 (10%)
1:10 (12%)
view
9 x 2 src/dachshund/algorithms
src/dachshund/algorithms
shortest_paths.rs
transitivity.rs
1:9 (7%)
1:9 (16%)
view
9 x 2 src/dachshund/algorithms
src/dachshund/algorithms
adjacency_matrix.rs
shortest_paths.rs
1:9 (26%)
1:9 (7%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
10 x 2 src/dachshund
src/dachshund
line_processor.rs
line_processor.rs
49:59 
98:108 
view
6 x 2 src/dachshund
src/dachshund
weighted_undirected_graph.rs
simple_undirected_graph.rs
66:72 
65:71 
view