CasualML
Duplication

Intro
  • For duplication, we look at places in code where there are six 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
  • 25% duplication:
    • 5,175 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,323 duplicated lines
  • 59 duplicates
system25% (1,323 lines)
Duplication per Extension
py25% (1,323 lines)
Duplication per Component (primary)
causalml/inference38% (1,108 lines)
causalml/metrics17% (122 lines)
causalml/dataset11% (63 lines)
causalml/feature_selection9% (18 lines)
causalml2% (12 lines)
ROOT0% (0 lines)
causalml/optimize0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
Size#FoldersFilesLinesCode
46 x 2 causalml/inference/meta
causalml/inference/meta
tlearner.py
slearner.py
245:394 (19%)
257:407 (20%)
view
41 x 2 causalml/inference/meta
causalml/inference/meta
xlearner.py
xlearner.py
85:141 (10%)
611:667 (10%)
view
38 x 4 causalml/inference/meta
causalml/inference/meta
causalml/inference/meta
causalml/inference/meta
rlearner.py
slearner.py
tlearner.py
xlearner.py
302:441 (9%)
268:407 (16%)
255:394 (16%)
382:521 (9%)
view
35 x 2 causalml/inference/meta
causalml/inference/meta
xlearner.py
xlearner.py
152:208 (8%)
678:735 (8%)
view
34 x 2 causalml/inference/meta
causalml/inference/meta
rlearner.py
rlearner.py
73:122 (8%)
640:688 (8%)
view
26 x 2 causalml/inference/meta
causalml/inference/meta
rlearner.py
xlearner.py
85:113 (6%)
96:124 (6%)
view
25 x 2 causalml/inference/meta
causalml/inference/meta
tlearner.py
slearner.py
188:219 (10%)
200:231 (10%)
view
21 x 2 causalml/metrics
causalml/metrics
visualize.py
visualize.py
501:526 (5%)
549:574 (5%)
view
17 x 2 causalml/inference/tree
causalml/inference/tree
models.py
models.py
458:478 (1%)
1290:1310 (1%)
view
17 x 2 causalml/inference/tree
causalml/inference/tree
utils.py
utils.py
39:61 (9%)
75:97 (9%)
view
15 x 2 causalml/inference/meta
causalml/inference/meta
rlearner.py
rlearner.py
122:139 (3%)
563:580 (3%)
view
14 x 2 causalml/inference/meta
causalml/inference/meta
tlearner.py
slearner.py
112:129 (5%)
126:143 (6%)
view
14 x 2 causalml/dataset
causalml/dataset
regression.py
regression.py
117:132 (8%)
183:198 (8%)
view
13 x 2 causalml/inference/meta
causalml/inference/meta
rlearner.py
xlearner.py
235:250 (3%)
304:318 (3%)
view
12 x 2 causalml/inference/meta
causalml/inference/meta
tlearner.py
tlearner.py
402:422 (5%)
430:450 (5%)
view
12 x 2 causalml/inference/meta
causalml/inference/meta
tlearner.py
slearner.py
478:492 (5%)
476:490 (5%)
view
12 x 2 causalml/dataset
causalml/dataset
regression.py
regression.py
87:102 (7%)
120:134 (7%)
view
11 x 2 causalml/dataset
causalml/dataset
regression.py
regression.py
53:65 (6%)
152:164 (6%)
view
11 x 2 causalml/inference/tree
causalml/inference/tree
models.py
models.py
1091:1101 (1%)
1138:1148 (1%)
view
11 x 2 causalml/metrics
causalml/metrics
visualize.py
visualize.py
77:89 (2%)
185:197 (2%)
view
Most Frequent Duplicates
The list of 9 most frequently found duplicates.
Size#FoldersFilesLinesCode
7 x 4 causalml/inference/meta
causalml/inference/meta
causalml/inference/meta
causalml/inference/meta
tlearner.py
tlearner.py
slearner.py
slearner.py
119:126 (2%)
485:492 (2%)
133:140 (3%)
483:490 (3%)
view
38 x 4 causalml/inference/meta
causalml/inference/meta
causalml/inference/meta
causalml/inference/meta
rlearner.py
slearner.py
tlearner.py
xlearner.py
302:441 (9%)
268:407 (16%)
255:394 (16%)
382:521 (9%)
view
6 x 3 causalml/inference/meta
causalml/inference/meta
causalml/inference/meta
xlearner.py
slearner.py
tlearner.py
132:137 (1%)
84:90 (2%)
74:79 (2%)
view
10 x 3 causalml/inference/meta
causalml/inference/meta
causalml/inference/meta
tlearner.py
rlearner.py
xlearner.py
214:225 (4%)
260:271 (2%)
337:348 (2%)
view
7 x 3 causalml/inference/tree
causalml/inference/tree
causalml/inference/tree
models.py
models.py
models.py
605:611 (<1%)
632:638 (<1%)
658:664 (<1%)
view
7 x 3 causalml/inference/meta
causalml/inference/meta
causalml/inference/meta
xlearner.py
slearner.py
tlearner.py
314:322 (1%)
202:210 (3%)
190:198 (2%)
view
6 x 3 causalml/inference/meta
causalml/inference/meta
causalml/inference/meta
rlearner.py
tmle.py
xlearner.py
105:111 (1%)
116:121 (6%)
116:122 (1%)
view
6 x 3 causalml/feature_selection
causalml/feature_selection
causalml/feature_selection
filters.py
filters.py
filters.py
235:240 (3%)
254:259 (3%)
274:279 (3%)
view
6 x 3 causalml/inference/meta
causalml/inference/meta
causalml/inference/meta
rlearner.py
xlearner.py
xlearner.py
238:244 (1%)
247:252 (1%)
307:312 (1%)
view