facebookresearch / lightweight-inference-compilation
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,043 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 111 duplicated lines
  • 9 duplicates
system5% (111 lines)
Duplication per Extension
py5% (111 lines)
Duplication per Component (primary)
src/lic/ppl/inference6% (30 lines)
src/lic/ppl/world3% (30 lines)
src/lic/ppl/inference/proposer23% (29 lines)
src/lic/ppl/experimental/inference_compilation5% (22 lines)
ROOT0% (0 lines)
src/lic/ppl/experimental0% (0 lines)
src/lic/ppl0% (0 lines)
src/lic/ppl/model0% (0 lines)
src/lic0% (0 lines)

Duplication Between Components (50+ lines)

G src/lic/ppl/experimental/inference_compilation src/lic/ppl/experimental/inference_compilation src/lic/ppl/inference/proposer src/lic/ppl/inference/proposer src/lic/ppl/experimental/inference_compilation--src/lic/ppl/inference/proposer 51

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 9 longest duplicates.
See data for all 9 duplicates...
Size#FoldersFilesLinesCode
9 x 2 src/lic/ppl/experimental/inference_compilation
src/lic/ppl/inference/proposer
ic_infer.py
abstract_single_site_proposer.py
76:84 (2%)
58:66 (32%)
view
9 x 2 src/lic/ppl/world
src/lic/ppl/world
diff.py
world_vars.py
77:101 (25%)
60:84 (25%)
view
8 x 2 src/lic/ppl/inference
src/lic/ppl/inference
abstract_mh_infer.py
abstract_mh_infer.py
172:179 (3%)
324:332 (3%)
view
7 x 2 src/lic/ppl/inference
src/lic/ppl/inference
abstract_infer.py
abstract_mh_infer.py
154:160 (4%)
286:292 (2%)
view
7 x 2 src/lic/ppl/experimental/inference_compilation
src/lic/ppl/inference/proposer
ic_infer.py
single_site_ancestral_proposer.py
50:56 (1%)
17:23 (36%)
view
7 x 2 src/lic/ppl/experimental/inference_compilation
src/lic/ppl/inference/proposer
ic_infer.py
abstract_single_site_single_step_prop...
50:56 (1%)
122:128 (9%)
view
7 x 2 src/lic/ppl/inference/proposer
src/lic/ppl/inference/proposer
abstract_single_site_single_step_prop...
single_site_ancestral_proposer.py
122:128 (9%)
17:23 (36%)
view
6 x 2 src/lic/ppl/experimental/inference_compilation
src/lic/ppl/inference/proposer
ic_infer.py
single_site_ancestral_proposer.py
69:74 (1%)
38:43 (31%)
view
6 x 2 src/lic/ppl/world
src/lic/ppl/world
variable.py
variable.py
148:153 (3%)
168:173 (3%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
7 x 2 src/lic/ppl/experimental/inference_compilation
src/lic/ppl/inference/proposer
ic_infer.py
abstract_single_site_proposer.py
0:0 
0:0 
view