microsoft / dowhy
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
  • 10% duplication:
    • 6,078 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 631 duplicated lines
  • 49 duplicates
system10% (631 lines)
Duplication per Extension
py10% (631 lines)
Duplication per Component (primary)
dowhy/causal_estimators20% (229 lines)
dowhy6% (159 lines)
dowhy/utils15% (95 lines)
dowhy/causal_refuters8% (76 lines)
dowhy/graph_learners35% (30 lines)
dowhy/do_samplers11% (30 lines)
dowhy/interpreters8% (12 lines)
ROOT0% (0 lines)
binder0% (0 lines)
dowhy/api0% (0 lines)
dowhy/causal_identifiers0% (0 lines)
dowhy/data_transformers0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 49 duplicates...
Size#FoldersFilesLinesCode
43 x 2 dowhy
dowhy
causal_identifier.py
causal_identifier.py
151:200 (6%)
203:252 (6%)
view
20 x 2 dowhy/utils/dgps
dowhy/utils/dgps
cubic_dgp.py
quadratic_dgp.py
53:85 (33%)
56:88 (32%)
view
18 x 2 dowhy/utils/dgps
dowhy/utils/dgps
cubic_dgp.py
quadratic_dgp.py
13:32 (30%)
13:32 (29%)
view
14 x 2 dowhy/causal_refuters
dowhy/causal_refuters
add_unobserved_common_cause.py
add_unobserved_common_cause.py
253:270 (3%)
287:304 (3%)
view
13 x 2 dowhy/utils/dgps
dowhy/utils/dgps
linear_dgp.py
quadratic_dgp.py
44:66 (30%)
66:88 (21%)
view
13 x 2 dowhy/utils/dgps
dowhy/utils/dgps
cubic_dgp.py
linear_dgp.py
63:85 (22%)
44:66 (30%)
view
11 x 2 dowhy/causal_estimators
dowhy/causal_estimators
distance_matching_estimator.py
distance_matching_estimator.py
95:105 (7%)
133:143 (7%)
view
11 x 2 dowhy/causal_estimators
dowhy/causal_estimators
propensity_score_matching_estimator.py
propensity_score_weighting_estimator.py
38:49 (14%)
55:66 (9%)
view
10 x 2 dowhy/causal_estimators
dowhy/causal_estimators
propensity_score_matching_estimator.py
propensity_score_weighting_estimator.py
23:32 (13%)
32:41 (8%)
view
10 x 2 dowhy/causal_estimators
dowhy/causal_estimators
propensity_score_stratification_estim...
propensity_score_weighting_estimator.py
29:38 (9%)
32:41 (8%)
view
10 x 2 dowhy/causal_estimators
dowhy/causal_estimators
regression_estimator.py
two_stage_regression_estimator.py
93:102 (10%)
184:193 (6%)
view
10 x 2 dowhy/causal_estimators
dowhy/causal_estimators
propensity_score_matching_estimator.py
propensity_score_stratification_estim...
38:48 (13%)
49:59 (9%)
view
10 x 2 dowhy/causal_estimators
dowhy/causal_estimators
propensity_score_matching_estimator.py
propensity_score_stratification_estim...
23:32 (13%)
29:38 (9%)
view
10 x 2 dowhy/causal_estimators
dowhy/causal_estimators
propensity_score_stratification_estim...
propensity_score_weighting_estimator.py
49:59 (9%)
55:65 (8%)
view
9 x 2 dowhy/do_samplers
dowhy/do_samplers
multivariate_weighting_sampler.py
weighting_sampler.py
22:33 (28%)
22:32 (27%)
view
9 x 2 dowhy/graph_learners
dowhy/graph_learners
cdt.py
lingam.py
12:23 (42%)
12:23 (45%)
view
9 x 2 dowhy/causal_estimators
dowhy/causal_estimators
two_stage_regression_estimator.py
two_stage_regression_estimator.py
119:127 (5%)
144:152 (5%)
view
9 x 2 dowhy/causal_estimators
dowhy/causal_estimators
distance_matching_estimator.py
distance_matching_estimator.py
109:118 (5%)
145:156 (5%)
view
8 x 2 dowhy/causal_estimators
dowhy/causal_estimators
two_stage_regression_estimator.py
two_stage_regression_estimator.py
98:105 (5%)
145:152 (5%)
view
8 x 2 dowhy/causal_estimators
dowhy/causal_estimators
two_stage_regression_estimator.py
two_stage_regression_estimator.py
98:105 (5%)
120:127 (5%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 dowhy/utils/dgps
dowhy/utils/dgps
cubic_dgp.py
quadratic_dgp.py
0:0 
0:0 
view