CodeClone Report for codeclone

Generated at 2026-03-25T12:25:10Z
What is the current code-health snapshot?
Health 81/100 (B); 8 clone groups; 0 dead-code items (0 suppressed); 0 dependency cycles.
81
Grade B
+3
Clone Groups?
8
1func7block0seg✓ baselined
High Complexity?
0
2.92avg20max
High Coupling?
0
0.5avg10max
Low Cohesion?
3
1.22avg5max
Dep. Cycles?
0
10depth
Dead Code?
0
0high-conf
Findings?
12
1kinds
Suggestions?
23
8clone12struct3metric

Executive Summary

Project-wide context derived from the full scanned root.

Issue breakdown
Clone Groups8
Structural12
Cohesion3
Source breakdown
Production14
Fixtures8
Tests1

Health Profile

Dimension scores across all quality axes.

Health profile
Clones89Complexity69Coupling77Cohesion60Dead Code100Deps84Coverage100
Where is duplication concentrated right now?
8 groups total; 0 new vs 8 known.

Duplicate Scope

Split is based on baseline: known duplicates are already recorded in baseline, new duplicates are absent from baseline.

transform_alpha • transform_beta • transform_shared_a
4 instances • block size 43 • spread 4 fn / 4 files
FixturesType-24
transform_alpha
tests/fixtures/golden_project/alpha.py:1-43
1 | def transform_alpha(items: list[int]) -> tuple[list[int], int]:
2 | if not items:
3 | return [], 0
4 |
5 | prepared: list[int] = []
6 | total = 0
7 | count = 0
8 |
9 | for item in items:
10 | doubled = item * 2
11 | if doubled % 3 == 0:
12 | prepared.append(doubled)
13 | else:
14 | prepared.append(doubled + 1)
15 | total += prepared[-1]
16 | count += 1
17 |
18 | average = total // count if count else 0
19 | marker = len(prepared)
20 | audit = marker + average
21 | checksum = audit + total
22 | signature = checksum - marker
23 | offset = signature + 1
24 | window = offset + 2
25 | anchor = window + 3
26 | tail = anchor + 4
27 | extra = tail + 5
28 | checksum2 = extra + 6
29 | checksum3 = checksum2 + 7
30 | checksum4 = checksum3 + 8
31 | checksum5 = checksum4 + 9
32 | checksum6 = checksum5 + 10
33 | checksum7 = checksum6 + 11
34 | checksum8 = checksum7 + 12
35 | checksum9 = checksum8 + 13
36 | checksum10 = checksum9 + 14
37 | checksum11 = checksum10 + 15
38 | checksum12 = checksum11 + 16
39 | checksum13 = checksum12 + 17
40 | checksum14 = checksum13 + 18
41 | checksum15 = checksum14 + 19
42 |
43 | return prepared, checksum15
transform_beta
tests/fixtures/golden_project/beta.py:1-43
1 | def transform_beta(items: list[int]) -> tuple[list[int], int]:
2 | if not items:
3 | return [], 0
4 |
5 | prepared: list[int] = []
6 | total = 0
7 | count = 0
8 |
9 | for item in items:
10 | doubled = item * 2
11 | if doubled % 3 == 0:
12 | prepared.append(doubled)
13 | else:
14 | prepared.append(doubled + 1)
15 | total += prepared[-1]
16 | count += 1
17 |
18 | average = total // count if count else 0
19 | marker = len(prepared)
20 | audit = marker + average
21 | checksum = audit + total
22 | signature = checksum - marker
23 | offset = signature + 1
24 | window = offset + 2
25 | anchor = window + 3
26 | tail = anchor + 4
27 | extra = tail + 5
28 | checksum2 = extra + 6
29 | checksum3 = checksum2 + 7
30 | checksum4 = checksum3 + 8
31 | checksum5 = checksum4 + 9
32 | checksum6 = checksum5 + 10
33 | checksum7 = checksum6 + 11
34 | checksum8 = checksum7 + 12
35 | checksum9 = checksum8 + 13
36 | checksum10 = checksum9 + 14
37 | checksum11 = checksum10 + 15
38 | checksum12 = checksum11 + 16
39 | checksum13 = checksum12 + 17
40 | checksum14 = checksum13 + 18
41 | checksum15 = checksum14 + 19
42 |
43 | return prepared, checksum15
transform_shared_a
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:14-56
11 | return transform_shared_a(values)
12 |
13 |
14 | def transform_shared_a(items: list[int]) -> tuple[list[int], int]:
15 | if not items:
16 | return [], 0
17 |
18 | prepared: list[int] = []
19 | total = 0
20 | count = 0
21 |
22 | for item in items:
23 | doubled = item * 2
24 | if doubled % 3 == 0:
25 | prepared.append(doubled)
26 | else:
27 | prepared.append(doubled + 1)
28 | total += prepared[-1]
29 | count += 1
30 |
31 | average = total // count if count else 0
32 | marker = len(prepared)
33 | audit = marker + average
34 | checksum = audit + total
35 | signature = checksum - marker
36 | offset = signature + 1
37 | window = offset + 2
38 | anchor = window + 3
39 | tail = anchor + 4
40 | extra = tail + 5
41 | checksum2 = extra + 6
42 | checksum3 = checksum2 + 7
43 | checksum4 = checksum3 + 8
44 | checksum5 = checksum4 + 9
45 | checksum6 = checksum5 + 10
46 | checksum7 = checksum6 + 11
47 | checksum8 = checksum7 + 12
48 | checksum9 = checksum8 + 13
49 | checksum10 = checksum9 + 14
50 | checksum11 = checksum10 + 15
51 | checksum12 = checksum11 + 16
52 | checksum13 = checksum12 + 17
53 | checksum14 = checksum13 + 18
54 | checksum15 = checksum14 + 19
55 |
56 | return prepared, checksum15
transform_shared_b
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/b.py:14-56
11 | return transform_shared_b(values)
12 |
13 |
14 | def transform_shared_b(items: list[int]) -> tuple[list[int], int]:
15 | if not items:
16 | return [], 0
17 |
18 | prepared: list[int] = []
19 | total = 0
20 | count = 0
21 |
22 | for item in items:
23 | doubled = item * 2
24 | if doubled % 3 == 0:
25 | prepared.append(doubled)
26 | else:
27 | prepared.append(doubled + 1)
28 | total += prepared[-1]
29 | count += 1
30 |
31 | average = total // count if count else 0
32 | marker = len(prepared)
33 | audit = marker + average
34 | checksum = audit + total
35 | signature = checksum - marker
36 | offset = signature + 1
37 | window = offset + 2
38 | anchor = window + 3
39 | tail = anchor + 4
40 | extra = tail + 5
41 | checksum2 = extra + 6
42 | checksum3 = checksum2 + 7
43 | checksum4 = checksum3 + 8
44 | checksum5 = checksum4 + 9
45 | checksum6 = checksum5 + 10
46 | checksum7 = checksum6 + 11
47 | checksum8 = checksum7 + 12
48 | checksum9 = checksum8 + 13
49 | checksum10 = checksum9 + 14
50 | checksum11 = checksum10 + 15
51 | checksum12 = checksum11 + 16
52 | checksum13 = checksum12 + 17
53 | checksum14 = checksum13 + 18
54 | checksum15 = checksum14 + 19
55 |
56 | return prepared, checksum15
3c1b5cf24b4d x4
4 instances • block size 4 • spread 4 fn / 4 files
FixturesType-44
N-way group: each block matches 3 peers in this group.
match_rule: normalized_sliding_windowblock_size: 4signature_kind: stmt_hash_sequencemerged_regions: truepattern: repeated_stmt_hash (3c1b5cf24b4d x4)
transform_alpha
tests/fixtures/golden_project/alpha.py:24-39
instance 1/4 • matches 3 peers
21 | checksum = audit + total
22 | signature = checksum - marker
23 | offset = signature + 1
24 | window = offset + 2
25 | anchor = window + 3
26 | tail = anchor + 4
27 | extra = tail + 5
28 | checksum2 = extra + 6
29 | checksum3 = checksum2 + 7
30 | checksum4 = checksum3 + 8
31 | checksum5 = checksum4 + 9
32 | checksum6 = checksum5 + 10
33 | checksum7 = checksum6 + 11
34 | checksum8 = checksum7 + 12
35 | checksum9 = checksum8 + 13
36 | checksum10 = checksum9 + 14
37 | checksum11 = checksum10 + 15
38 | checksum12 = checksum11 + 16
39 | checksum13 = checksum12 + 17
40 | checksum14 = checksum13 + 18
41 | checksum15 = checksum14 + 19
42 |
transform_beta
tests/fixtures/golden_project/beta.py:24-39
instance 2/4 • matches 3 peers
21 | checksum = audit + total
22 | signature = checksum - marker
23 | offset = signature + 1
24 | window = offset + 2
25 | anchor = window + 3
26 | tail = anchor + 4
27 | extra = tail + 5
28 | checksum2 = extra + 6
29 | checksum3 = checksum2 + 7
30 | checksum4 = checksum3 + 8
31 | checksum5 = checksum4 + 9
32 | checksum6 = checksum5 + 10
33 | checksum7 = checksum6 + 11
34 | checksum8 = checksum7 + 12
35 | checksum9 = checksum8 + 13
36 | checksum10 = checksum9 + 14
37 | checksum11 = checksum10 + 15
38 | checksum12 = checksum11 + 16
39 | checksum13 = checksum12 + 17
40 | checksum14 = checksum13 + 18
41 | checksum15 = checksum14 + 19
42 |
transform_shared_a
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:37-52
instance 3/4 • matches 3 peers
34 | checksum = audit + total
35 | signature = checksum - marker
36 | offset = signature + 1
37 | window = offset + 2
38 | anchor = window + 3
39 | tail = anchor + 4
40 | extra = tail + 5
41 | checksum2 = extra + 6
42 | checksum3 = checksum2 + 7
43 | checksum4 = checksum3 + 8
44 | checksum5 = checksum4 + 9
45 | checksum6 = checksum5 + 10
46 | checksum7 = checksum6 + 11
47 | checksum8 = checksum7 + 12
48 | checksum9 = checksum8 + 13
49 | checksum10 = checksum9 + 14
50 | checksum11 = checksum10 + 15
51 | checksum12 = checksum11 + 16
52 | checksum13 = checksum12 + 17
53 | checksum14 = checksum13 + 18
54 | checksum15 = checksum14 + 19
55 |
transform_shared_b
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/b.py:37-52
instance 4/4 • matches 3 peers
34 | checksum = audit + total
35 | signature = checksum - marker
36 | offset = signature + 1
37 | window = offset + 2
38 | anchor = window + 3
39 | tail = anchor + 4
40 | extra = tail + 5
41 | checksum2 = extra + 6
42 | checksum3 = checksum2 + 7
43 | checksum4 = checksum3 + 8
44 | checksum5 = checksum4 + 9
45 | checksum6 = checksum5 + 10
46 | checksum7 = checksum6 + 11
47 | checksum8 = checksum7 + 12
48 | checksum9 = checksum8 + 13
49 | checksum10 = checksum9 + 14
50 | checksum11 = checksum10 + 15
51 | checksum12 = checksum11 + 16
52 | checksum13 = checksum12 + 17
53 | checksum14 = checksum13 + 18
54 | checksum15 = checksum14 + 19
55 |
transform_alpha • transform_beta • transform_shared_a
4 instances • block size 4 • spread 4 fn / 4 files
FixturesType-44
N-way group: each block matches 3 peers in this group.
match_rule: normalized_sliding_windowblock_size: 4signature_kind: stmt_hash_sequencemerged_regions: true
transform_alpha
tests/fixtures/golden_project/alpha.py:39-43
instance 1/4 • matches 3 peers
36 | checksum10 = checksum9 + 14
37 | checksum11 = checksum10 + 15
38 | checksum12 = checksum11 + 16
39 | checksum13 = checksum12 + 17
40 | checksum14 = checksum13 + 18
41 | checksum15 = checksum14 + 19
42 |
43 | return prepared, checksum15
transform_beta
tests/fixtures/golden_project/beta.py:39-43
instance 2/4 • matches 3 peers
36 | checksum10 = checksum9 + 14
37 | checksum11 = checksum10 + 15
38 | checksum12 = checksum11 + 16
39 | checksum13 = checksum12 + 17
40 | checksum14 = checksum13 + 18
41 | checksum15 = checksum14 + 19
42 |
43 | return prepared, checksum15
transform_shared_a
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:52-56
instance 3/4 • matches 3 peers
49 | checksum10 = checksum9 + 14
50 | checksum11 = checksum10 + 15
51 | checksum12 = checksum11 + 16
52 | checksum13 = checksum12 + 17
53 | checksum14 = checksum13 + 18
54 | checksum15 = checksum14 + 19
55 |
56 | return prepared, checksum15
transform_shared_b
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/b.py:52-56
instance 4/4 • matches 3 peers
49 | checksum10 = checksum9 + 14
50 | checksum11 = checksum10 + 15
51 | checksum12 = checksum11 + 16
52 | checksum13 = checksum12 + 17
53 | checksum14 = checksum13 + 18
54 | checksum15 = checksum14 + 19
55 |
56 | return prepared, checksum15
transform_alpha • transform_beta • transform_shared_a
4 instances • block size 4 • spread 4 fn / 4 files
FixturesType-44
N-way group: each block matches 3 peers in this group.
match_rule: normalized_sliding_windowblock_size: 4signature_kind: stmt_hash_sequencemerged_regions: true
transform_alpha
tests/fixtures/golden_project/alpha.py:18-21
instance 1/4 • matches 3 peers
15 | total += prepared[-1]
16 | count += 1
17 |
18 | average = total // count if count else 0
19 | marker = len(prepared)
20 | audit = marker + average
21 | checksum = audit + total
22 | signature = checksum - marker
23 | offset = signature + 1
24 | window = offset + 2
transform_beta
tests/fixtures/golden_project/beta.py:18-21
instance 2/4 • matches 3 peers
15 | total += prepared[-1]
16 | count += 1
17 |
18 | average = total // count if count else 0
19 | marker = len(prepared)
20 | audit = marker + average
21 | checksum = audit + total
22 | signature = checksum - marker
23 | offset = signature + 1
24 | window = offset + 2
transform_shared_a
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:31-34
instance 3/4 • matches 3 peers
28 | total += prepared[-1]
29 | count += 1
30 |
31 | average = total // count if count else 0
32 | marker = len(prepared)
33 | audit = marker + average
34 | checksum = audit + total
35 | signature = checksum - marker
36 | offset = signature + 1
37 | window = offset + 2
transform_shared_b
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/b.py:31-34
instance 4/4 • matches 3 peers
28 | total += prepared[-1]
29 | count += 1
30 |
31 | average = total // count if count else 0
32 | marker = len(prepared)
33 | audit = marker + average
34 | checksum = audit + total
35 | signature = checksum - marker
36 | offset = signature + 1
37 | window = offset + 2
transform_alpha • transform_beta • transform_shared_a
4 instances • block size 4 • spread 4 fn / 4 files
FixturesType-44
N-way group: each block matches 3 peers in this group.
match_rule: normalized_sliding_windowblock_size: 4signature_kind: stmt_hash_sequencemerged_regions: true
transform_alpha
tests/fixtures/golden_project/alpha.py:9-20
instance 1/4 • matches 3 peers
6 | total = 0
7 | count = 0
8 |
9 | for item in items:
10 | doubled = item * 2
11 | if doubled % 3 == 0:
12 | prepared.append(doubled)
13 | else:
14 | prepared.append(doubled + 1)
15 | total += prepared[-1]
16 | count += 1
17 |
18 | average = total // count if count else 0
19 | marker = len(prepared)
20 | audit = marker + average
21 | checksum = audit + total
22 | signature = checksum - marker
23 | offset = signature + 1
transform_beta
tests/fixtures/golden_project/beta.py:9-20
instance 2/4 • matches 3 peers
6 | total = 0
7 | count = 0
8 |
9 | for item in items:
10 | doubled = item * 2
11 | if doubled % 3 == 0:
12 | prepared.append(doubled)
13 | else:
14 | prepared.append(doubled + 1)
15 | total += prepared[-1]
16 | count += 1
17 |
18 | average = total // count if count else 0
19 | marker = len(prepared)
20 | audit = marker + average
21 | checksum = audit + total
22 | signature = checksum - marker
23 | offset = signature + 1
transform_shared_a
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:22-33
instance 3/4 • matches 3 peers
19 | total = 0
20 | count = 0
21 |
22 | for item in items:
23 | doubled = item * 2
24 | if doubled % 3 == 0:
25 | prepared.append(doubled)
26 | else:
27 | prepared.append(doubled + 1)
28 | total += prepared[-1]
29 | count += 1
30 |
31 | average = total // count if count else 0
32 | marker = len(prepared)
33 | audit = marker + average
34 | checksum = audit + total
35 | signature = checksum - marker
36 | offset = signature + 1
transform_shared_b
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/b.py:22-33
instance 4/4 • matches 3 peers
19 | total = 0
20 | count = 0
21 |
22 | for item in items:
23 | doubled = item * 2
24 | if doubled % 3 == 0:
25 | prepared.append(doubled)
26 | else:
27 | prepared.append(doubled + 1)
28 | total += prepared[-1]
29 | count += 1
30 |
31 | average = total // count if count else 0
32 | marker = len(prepared)
33 | audit = marker + average
34 | checksum = audit + total
35 | signature = checksum - marker
36 | offset = signature + 1
transform_alpha • transform_beta • transform_shared_a
4 instances • block size 4 • spread 4 fn / 4 files
FixturesType-44
N-way group: each block matches 3 peers in this group.
match_rule: normalized_sliding_windowblock_size: 4signature_kind: stmt_hash_sequencemerged_regions: true
transform_alpha
tests/fixtures/golden_project/alpha.py:2-7
instance 1/4 • matches 3 peers
1 | def transform_alpha(items: list[int]) -> tuple[list[int], int]:
2 | if not items:
3 | return [], 0
4 |
5 | prepared: list[int] = []
6 | total = 0
7 | count = 0
8 |
9 | for item in items:
10 | doubled = item * 2
transform_beta
tests/fixtures/golden_project/beta.py:2-7
instance 2/4 • matches 3 peers
1 | def transform_beta(items: list[int]) -> tuple[list[int], int]:
2 | if not items:
3 | return [], 0
4 |
5 | prepared: list[int] = []
6 | total = 0
7 | count = 0
8 |
9 | for item in items:
10 | doubled = item * 2
transform_shared_a
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:15-20
instance 3/4 • matches 3 peers
12 |
13 |
14 | def transform_shared_a(items: list[int]) -> tuple[list[int], int]:
15 | if not items:
16 | return [], 0
17 |
18 | prepared: list[int] = []
19 | total = 0
20 | count = 0
21 |
22 | for item in items:
23 | doubled = item * 2
transform_shared_b
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/b.py:15-20
instance 4/4 • matches 3 peers
12 |
13 |
14 | def transform_shared_b(items: list[int]) -> tuple[list[int], int]:
15 | if not items:
16 | return [], 0
17 |
18 | prepared: list[int] = []
19 | total = 0
20 | count = 0
21 |
22 | for item in items:
23 | doubled = item * 2
transform_alpha • transform_beta • transform_shared_a
4 instances • block size 4 • spread 4 fn / 4 files
FixturesType-44
N-way group: each block matches 3 peers in this group.
match_rule: normalized_sliding_windowblock_size: 4signature_kind: stmt_hash_sequencemerged_regions: true
transform_alpha
tests/fixtures/golden_project/alpha.py:5-16
instance 1/4 • matches 3 peers
2 | if not items:
3 | return [], 0
4 |
5 | prepared: list[int] = []
6 | total = 0
7 | count = 0
8 |
9 | for item in items:
10 | doubled = item * 2
11 | if doubled % 3 == 0:
12 | prepared.append(doubled)
13 | else:
14 | prepared.append(doubled + 1)
15 | total += prepared[-1]
16 | count += 1
17 |
18 | average = total // count if count else 0
19 | marker = len(prepared)
transform_beta
tests/fixtures/golden_project/beta.py:5-16
instance 2/4 • matches 3 peers
2 | if not items:
3 | return [], 0
4 |
5 | prepared: list[int] = []
6 | total = 0
7 | count = 0
8 |
9 | for item in items:
10 | doubled = item * 2
11 | if doubled % 3 == 0:
12 | prepared.append(doubled)
13 | else:
14 | prepared.append(doubled + 1)
15 | total += prepared[-1]
16 | count += 1
17 |
18 | average = total // count if count else 0
19 | marker = len(prepared)
transform_shared_a
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:18-29
instance 3/4 • matches 3 peers
15 | if not items:
16 | return [], 0
17 |
18 | prepared: list[int] = []
19 | total = 0
20 | count = 0
21 |
22 | for item in items:
23 | doubled = item * 2
24 | if doubled % 3 == 0:
25 | prepared.append(doubled)
26 | else:
27 | prepared.append(doubled + 1)
28 | total += prepared[-1]
29 | count += 1
30 |
31 | average = total // count if count else 0
32 | marker = len(prepared)
transform_shared_b
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/b.py:18-29
instance 4/4 • matches 3 peers
15 | if not items:
16 | return [], 0
17 |
18 | prepared: list[int] = []
19 | total = 0
20 | count = 0
21 |
22 | for item in items:
23 | doubled = item * 2
24 | if doubled % 3 == 0:
25 | prepared.append(doubled)
26 | else:
27 | prepared.append(doubled + 1)
28 | total += prepared[-1]
29 | count += 1
30 |
31 | average = total // count if count else 0
32 | marker = len(prepared)
transform_alpha • transform_beta • transform_shared_a
4 instances • block size 4 • spread 4 fn / 4 files
FixturesType-44
N-way group: each block matches 3 peers in this group.
match_rule: normalized_sliding_windowblock_size: 4signature_kind: stmt_hash_sequencemerged_regions: true
transform_alpha
tests/fixtures/golden_project/alpha.py:21-24
instance 1/4 • matches 3 peers
18 | average = total // count if count else 0
19 | marker = len(prepared)
20 | audit = marker + average
21 | checksum = audit + total
22 | signature = checksum - marker
23 | offset = signature + 1
24 | window = offset + 2
25 | anchor = window + 3
26 | tail = anchor + 4
27 | extra = tail + 5
transform_beta
tests/fixtures/golden_project/beta.py:21-24
instance 2/4 • matches 3 peers
18 | average = total // count if count else 0
19 | marker = len(prepared)
20 | audit = marker + average
21 | checksum = audit + total
22 | signature = checksum - marker
23 | offset = signature + 1
24 | window = offset + 2
25 | anchor = window + 3
26 | tail = anchor + 4
27 | extra = tail + 5
transform_shared_a
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:34-37
instance 3/4 • matches 3 peers
31 | average = total // count if count else 0
32 | marker = len(prepared)
33 | audit = marker + average
34 | checksum = audit + total
35 | signature = checksum - marker
36 | offset = signature + 1
37 | window = offset + 2
38 | anchor = window + 3
39 | tail = anchor + 4
40 | extra = tail + 5
transform_shared_b
tests/fixtures/golden_v2/clone_metrics_cycle/pkg/b.py:34-37
instance 4/4 • matches 3 peers
31 | average = total // count if count else 0
32 | marker = len(prepared)
33 | audit = marker + average
34 | checksum = audit + total
35 | signature = checksum - marker
36 | offset = signature + 1
37 | window = offset + 2
38 | anchor = window + 3
39 | tail = anchor + 4
40 | extra = tail + 5
Are there quality hotspots in the codebase?
High-complexity: 0; high-coupling: 0; low-cohesion: 3; max CC 20; max CBO 10; max LCOM4 5.
Function ?File ?CC ?Nesting ?Risk ?
_encode_wire_file_entrycodeclone/cache.py204medium
Cache._decode_segment_report_projectioncodeclone/cache.py203medium
write_report_outputscodeclone/_cli_reports.py203medium
metric_gate_reasonscodeclone/pipeline.py202medium
Cache.get_file_entrycodeclone/cache.py202medium
compute_lcom4codeclone/metrics/cohesion.py194medium
resolve_clone_baseline_statecodeclone/_cli_baselines.py185medium
extract_units_and_stats_from_sourcecodeclone/extractor.py183medium
_run_analysis_stagescodeclone/cli.py173medium
Cache._load_and_validatecodeclone/cache.py172medium
_FunctionStructureScanner._visit_statementcodeclone/structural_findings.py163medium
compute_cbocodeclone/metrics/coupling.py163medium
render_meta_panelcodeclone/_html_report/_sections/_meta.py163medium
CFGBuilder._visit_trycodeclone/cfg.py152medium
Baseline.savecodeclone/baseline.py143medium
_render_group_explanationcodeclone/_html_report/_sections/_clones.py142medium
_derive_group_display_namecodeclone/_html_report/_sections/_clones.py134medium
build_html_reportcodeclone/_html_report/_assemble.py133medium
_enforce_gatingcodeclone/cli.py132medium
reportcodeclone/pipeline.py131medium
processcodeclone/pipeline.py127medium
_collect_report_file_listcodeclone/report/json_contract.py124medium
_location_entrycodeclone/report/sarif.py122medium
Baseline.loadcodeclone/baseline.py122medium
load_pyproject_configcodeclone/_cli_config.py121medium
_summarize_branchcodeclone/structural_findings.py116medium
_build_layer_groupscodeclone/_html_report/_sections/_dependencies.py113medium
MetricsBaseline.loadcodeclone/metrics_baseline.py112medium
_main_implcodeclone/cli.py112medium
_decode_wire_file_entrycodeclone/cache.py112medium
_decode_wire_dead_candidatecodeclone/cache.py112medium
_health_gauge_htmlcodeclone/_html_report/_sections/_overview.py112medium
_baseline_payloadtests/test_cli_inprocess.py103low
_collect_paths_from_metricscodeclone/report/json_contract.py103low
assert_range_statscodeclone/report/explain.py103low
merge_overlapping_itemscodeclone/report/merge.py102low
_derive_inventory_code_countscodeclone/report/json_contract.py102low
extract_blockscodeclone/blocks.py102low
serialize_finding_group_cardcodeclone/report/overview.py98low
render_markdown_report_documentcodeclone/report/markdown.py94low
iter_py_filescodeclone/scanner.py93low
discovercodeclone/pipeline.py93low
render_dead_code_panelcodeclone/_html_report/_sections/_dead_code.py93low
_terminal_kindcodeclone/structural_findings.py92low
_structural_summarycodeclone/report/suggestions.py92low
render_text_report_documentcodeclone/report/serialize.py92low
_clone_summary_from_groupcodeclone/report/overview.py92low
_build_design_groupscodeclone/report/json_contract.py92low
_decode_wire_structural_groupcodeclone/cache.py92low
_decode_optional_wire_coupled_classescodeclone/cache.py92low
Class ?File ?CBO ?Risk ?Coupled classes ?
Cachecodeclone/cache.py10medium
CacheDataCacheEntryCacheStatus(+7 more)
CacheDataCacheEntryCacheStatusFileStatSegmentR..ojectionSourceStatsDicthashlibhmacjsonos
CacheEntrycodeclone/cache.py6medium
CacheEntryBaseClassMetricsDictDeadCandidateDict(+3 more)
CacheEntryBaseClassMetricsDictDeadCandidateDictModuleDepDictSourceStatsDictStructur..roupDict
AstNormalizercodeclone/normalize.py3lowNormaliz..onConfigastcopy
ProjectMetricscodeclone/models.py3lowDeadItemHealthScoreModuleDep
FileMetricscodeclone/models.py3lowClassMetricsDeadCandidateModuleDep
CFGBuildercodeclone/cfg.py3low_LoopContext_TryLikeast
MetricsBaselinecodeclone/metrics_baseline.py2lowMetricsB..neStatushmac
_FunctionStructureScannercodeclone/structural_findings.py2lowFunction..ureFactsast
CacheDatacodeclone/cache.py2lowAnalysisProfileCacheEntry
_ArgumentParsercodeclone/_cli_args.py2lowargparsesys
Baselinecodeclone/baseline.py1lowhmac
_DummyExecutortests/test_golden_v2.py1low_DummyFuture
_FixedExecutortests/test_cli_inprocess.py1low_FixedFuture
Blockcodeclone/cfg_model.py1lowast
_FileCachecodeclone/_html_snippets.py1low_CacheInfo
_DummyExecutortests/test_cli_inprocess.py1low_DummyFuture
ReportArtifactsscripts/build_docs_example_report.py1lowjson
_StatementRecordcodeclone/report/explain.py1lowast
BootstrapResultcodeclone/pipeline.py1lowOutputPaths
Suggestioncodeclone/models.py1lowReportLocation
StructuralFindingGroupcodeclone/models.py1lowStructur..currence
FunctionGroupItemcodeclone/models.py1lowFunction..ItemBase
DepGraphcodeclone/models.py1lowModuleDep
_QualnameCollectorcodeclone/extractor.py1lowast
_ModuleWalkStatecodeclone/extractor.py1lowast
ValidationErrorcodeclone/errors.py1lowCodeCloneError
ParseErrorcodeclone/errors.py1lowFileProc..ingError
FileProcessingErrorcodeclone/errors.py1lowCodeCloneError
CacheErrorcodeclone/errors.py1lowCodeCloneError
BaselineValidationErrorcodeclone/errors.py1lowBaseline..emaError
BaselineSchemaErrorcodeclone/errors.py1lowCodeCloneError
CFGcodeclone/cfg_model.py1lowBlock
_TryLikecodeclone/cfg.py1lowast
StructuralFindingGroupDictcodeclone/cache.py1lowStructur..enceDict
DeadCandidateDictcodeclone/cache.py1lowDeadCand..DictBase
ClassMetricsDictcodeclone/cache.py1lowClassMet..DictBase
CacheEntryBasecodeclone/cache.py1lowFileStat
_HelpFormattercodeclone/_cli_args.py1lowargparse
_FailExectests/test_pipeline_process.py0low-
_FailingExecutortests/test_cli_inprocess.py0low-
ReportContextcodeclone/_html_report/_context.py0low-
_CacheLikecodeclone/_cli_runtime.py0low-
TestAdmissionThresholdBoundariestests/test_extractor.py0low-
ServiceBtests/fixtures/golden_v2/clone_metrics_cycle/pkg/b.py0low-
ServiceAtests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py0low-
PlainConsolecodeclone/_cli_rich.py0low-
_UnexpectedExectests/test_pipeline_process.py0low-
_DummyFuturetests/test_golden_v2.py0low-
_RecordingPrintertests/test_cli_unit.py0low-
_FixedFuturetests/test_cli_inprocess.py0low-
Class ?File ?LCOM4 ?Risk ?Methods ?Fields ?
Cachecodeclone/cache.py1low2030
CacheEntrycodeclone/cache.py1low00
AstNormalizercodeclone/normalize.py2medium135
ProjectMetricscodeclone/models.py1low00
FileMetricscodeclone/models.py1low00
CFGBuildercodeclone/cfg.py1low1819
MetricsBaselinecodeclone/metrics_baseline.py5high78
_FunctionStructureScannercodeclone/structural_findings.py2medium810
CacheDatacodeclone/cache.py1low00
_ArgumentParsercodeclone/_cli_args.py1low12
Baselinecodeclone/baseline.py5high74
_DummyExecutortests/test_golden_v2.py4high41
_FixedExecutortests/test_cli_inprocess.py3medium41
Blockcodeclone/cfg_model.py2medium32
_FileCachecodeclone/_html_snippets.py2medium43
_DummyExecutortests/test_cli_inprocess.py1low42
ReportArtifactsscripts/build_docs_example_report.py1low00
_StatementRecordcodeclone/report/explain.py1low00
BootstrapResultcodeclone/pipeline.py1low00
Suggestioncodeclone/models.py1low00
StructuralFindingGroupcodeclone/models.py1low00
FunctionGroupItemcodeclone/models.py1low00
DepGraphcodeclone/models.py1low00
_QualnameCollectorcodeclone/extractor.py1low59
_ModuleWalkStatecodeclone/extractor.py1low00
ValidationErrorcodeclone/errors.py1low00
ParseErrorcodeclone/errors.py1low00
FileProcessingErrorcodeclone/errors.py1low00
CacheErrorcodeclone/errors.py1low00
BaselineValidationErrorcodeclone/errors.py1low11
BaselineSchemaErrorcodeclone/errors.py1low00
CFGcodeclone/cfg_model.py1low24
_TryLikecodeclone/cfg.py1low00
StructuralFindingGroupDictcodeclone/cache.py1low00
DeadCandidateDictcodeclone/cache.py1low00
ClassMetricsDictcodeclone/cache.py1low00
CacheEntryBasecodeclone/cache.py1low00
_HelpFormattercodeclone/_cli_args.py1low00
_FailExectests/test_pipeline_process.py3medium30
_FailingExecutortests/test_cli_inprocess.py3medium31
ReportContextcodeclone/_html_report/_context.py3medium66
_CacheLikecodeclone/_cli_runtime.py3medium30
TestAdmissionThresholdBoundariestests/test_extractor.py2medium141
ServiceBtests/fixtures/golden_v2/clone_metrics_cycle/pkg/b.py2medium21
ServiceAtests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py2medium21
PlainConsolecodeclone/_cli_rich.py2medium20
_UnexpectedExectests/test_pipeline_process.py1low10
_DummyFuturetests/test_golden_v2.py1low11
_RecordingPrintertests/test_cli_unit.py1low21
_FixedFuturetests/test_cli_inprocess.py1low12
Do module dependencies form cycles?
Cycles: 0; max dependency depth: 10.
Modules ?
215
1072imports
Edges ?
1072
5.0avg/module
Max depth ?
10
< 8target
Cycles ?
0
cleanstatus
Top connected__future__111typing77cli62abc56models42
__future____future__astastcodeclonecodeclonecodeclone.baselinebaselinecodeclone.cachecachecodeclone.cliclicodeclone.contractscontractscodeclone.extractorextractorcodeclone.modelsmodelscodeclone.normalizenormalizecodeclone.pipelinepipelinecodeclone.reportreportcodeclone.report.sarifsarifcollections.abcabcdataclassesdataclassespathlibpathlibtests.test_cli_inprocesstest_cli_inprocesstests.test_cli_unittest_cli_unittests.test_report_contract_coveragetest_rep..coveragetypingtyping
Hub Leaf Cycle

Longest chains

Longest chain ?Length ?
test_cli_unitclipipelinesegmentsextractorblocksblockhashnormalizemeta_markers__future__10
test_cor..coverageclipipelinesegmentsextractorblocksblockhashnormalizemeta_markers__future__10
test_securityclipipelinesegmentsextractorblocksblockhashnormalizemeta_markers__future__10
clipipelinesegmentsextractorblocksblockhashnormalizemeta_markers__future__9
test_cli_inprocesspipelinesegmentsextractorblocksblockhashnormalizemeta_markers__future__9

Detected cycles

No dependency cycles detected.
Nothing to report - keep up the good work.
Do we have actionable unused code?
0 candidates total; 0 high-confidence items; 0 suppressed.
No dead code detected.
Nothing to report - keep up the good work.
No suppressed dead-code candidates.
Nothing to report - keep up the good work.
What should be prioritized next?
23 suggestions: 8 critical, 3 warning, 12 info.
criticalFunction clone group (Type-2)easyP34 fn / 4 files
FixturescloneType-2
same parameterized function body
Extract a shared implementation with explicit parameters.
Details
Facts
Finding
Function clone group
Spread
4 fn / 4 files
Source
Fixtures 4
Scope
4 occurrences across 4 files / 4 functions
Assessment
Severity
critical
Confidence
high
Priority
3
Family
clones
Locations (3)
  • tests/fixtures/golden_project/alpha.py:1–43transform_alpha
  • tests/fixtures/golden_project/beta.py:1–43transform_beta
  • tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:14–56transform_shared_a
Refactoring steps
  1. Extract a shared implementation with explicit parameters.
  2. Replace identifier-only variations with arguments.
criticalBlock clone group (Type-4)moderateP1.54 fn / 4 files
FixturescloneType-4
same repeated setup/assert pattern
Extract the repeated statement sequence into a helper.
Details
Facts
Finding
Block clone group
Spread
4 fn / 4 files
Source
Fixtures 4
Scope
4 occurrences across 4 files / 4 functions
Assessment
Severity
critical
Confidence
high
Priority
1.5
Family
clones
Locations (3)
  • tests/fixtures/golden_project/alpha.py:24–39transform_alpha
  • tests/fixtures/golden_project/beta.py:24–39transform_beta
  • tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:37–52transform_shared_a
Refactoring steps
  1. Extract the repeated statement sequence into a helper.
  2. Keep setup data close to the call site and move shared logic out.
criticalBlock clone group (Type-4)moderateP1.54 fn / 4 files
FixturescloneType-4
same structural sequence with small value changes
Extract the repeated statement sequence into a helper.
Details
Facts
Finding
Block clone group
Spread
4 fn / 4 files
Source
Fixtures 4
Scope
4 occurrences across 4 files / 4 functions
Assessment
Severity
critical
Confidence
high
Priority
1.5
Family
clones
Locations (3)
  • tests/fixtures/golden_project/alpha.py:39–43transform_alpha
  • tests/fixtures/golden_project/beta.py:39–43transform_beta
  • tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:52–56transform_shared_a
Refactoring steps
  1. Extract the repeated statement sequence into a helper.
  2. Keep setup data close to the call site and move shared logic out.
criticalBlock clone group (Type-4)moderateP1.54 fn / 4 files
FixturescloneType-4
same structural sequence with small value changes
Extract the repeated statement sequence into a helper.
Details
Facts
Finding
Block clone group
Spread
4 fn / 4 files
Source
Fixtures 4
Scope
4 occurrences across 4 files / 4 functions
Assessment
Severity
critical
Confidence
high
Priority
1.5
Family
clones
Locations (3)
  • tests/fixtures/golden_project/alpha.py:18–21transform_alpha
  • tests/fixtures/golden_project/beta.py:18–21transform_beta
  • tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:31–34transform_shared_a
Refactoring steps
  1. Extract the repeated statement sequence into a helper.
  2. Keep setup data close to the call site and move shared logic out.
criticalBlock clone group (Type-4)moderateP1.54 fn / 4 files
FixturescloneType-4
same structural sequence with small value changes
Extract the repeated statement sequence into a helper.
Details
Facts
Finding
Block clone group
Spread
4 fn / 4 files
Source
Fixtures 4
Scope
4 occurrences across 4 files / 4 functions
Assessment
Severity
critical
Confidence
high
Priority
1.5
Family
clones
Locations (3)
  • tests/fixtures/golden_project/alpha.py:9–20transform_alpha
  • tests/fixtures/golden_project/beta.py:9–20transform_beta
  • tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:22–33transform_shared_a
Refactoring steps
  1. Extract the repeated statement sequence into a helper.
  2. Keep setup data close to the call site and move shared logic out.
criticalBlock clone group (Type-4)moderateP1.54 fn / 4 files
FixturescloneType-4
same structural sequence with small value changes
Extract the repeated statement sequence into a helper.
Details
Facts
Finding
Block clone group
Spread
4 fn / 4 files
Source
Fixtures 4
Scope
4 occurrences across 4 files / 4 functions
Assessment
Severity
critical
Confidence
high
Priority
1.5
Family
clones
Locations (3)
  • tests/fixtures/golden_project/alpha.py:2–7transform_alpha
  • tests/fixtures/golden_project/beta.py:2–7transform_beta
  • tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:15–20transform_shared_a
Refactoring steps
  1. Extract the repeated statement sequence into a helper.
  2. Keep setup data close to the call site and move shared logic out.
criticalBlock clone group (Type-4)moderateP1.54 fn / 4 files
FixturescloneType-4
same structural sequence with small value changes
Extract the repeated statement sequence into a helper.
Details
Facts
Finding
Block clone group
Spread
4 fn / 4 files
Source
Fixtures 4
Scope
4 occurrences across 4 files / 4 functions
Assessment
Severity
critical
Confidence
high
Priority
1.5
Family
clones
Locations (3)
  • tests/fixtures/golden_project/alpha.py:5–16transform_alpha
  • tests/fixtures/golden_project/beta.py:5–16transform_beta
  • tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:18–29transform_shared_a
Refactoring steps
  1. Extract the repeated statement sequence into a helper.
  2. Keep setup data close to the call site and move shared logic out.
criticalBlock clone group (Type-4)moderateP1.54 fn / 4 files
FixturescloneType-4
same structural sequence with small value changes
Extract the repeated statement sequence into a helper.
Details
Facts
Finding
Block clone group
Spread
4 fn / 4 files
Source
Fixtures 4
Scope
4 occurrences across 4 files / 4 functions
Assessment
Severity
critical
Confidence
high
Priority
1.5
Family
clones
Locations (3)
  • tests/fixtures/golden_project/alpha.py:21–24transform_alpha
  • tests/fixtures/golden_project/beta.py:21–24transform_beta
  • tests/fixtures/golden_v2/clone_metrics_cycle/pkg/a.py:34–37transform_shared_a
Refactoring steps
  1. Extract the repeated statement sequence into a helper.
  2. Keep setup data close to the call site and move shared logic out.
warningSplit low-cohesion classmoderateP11 fn / 1 files
Productioncohesion
lcom4: 5
Split class by responsibility boundaries.
Details
Facts
Finding
Low cohesion class
Spread
1 fn / 1 files
Source
Production 1
Scope
codeclone/baseline.py:98-415
Assessment
Severity
warning
Confidence
high
Priority
1
Family
metrics
Locations (1)
  • codeclone/baseline.py:98–415Baseline
Refactoring steps
  1. Split class by responsibility boundaries.
  2. Group methods by shared state and extract subcomponents.
warningSplit low-cohesion classmoderateP11 fn / 1 files
Productioncohesion
lcom4: 5
Split class by responsibility boundaries.
Details
Facts
Finding
Low cohesion class
Spread
1 fn / 1 files
Source
Production 1
Scope
codeclone/metrics_baseline.py:158-451
Assessment
Severity
warning
Confidence
high
Priority
1
Family
metrics
Locations (1)
  • codeclone/metrics_baseline.py:158–451MetricsBaseline
Refactoring steps
  1. Split class by responsibility boundaries.
  2. Group methods by shared state and extract subcomponents.
warningSplit low-cohesion classmoderateP11 fn / 1 files
Testscohesion
lcom4: 4
Split class by responsibility boundaries.
Details
Facts
Finding
Low cohesion class
Spread
1 fn / 1 files
Source
Tests 1
Scope
tests/test_golden_v2.py:35-57
Assessment
Severity
warning
Confidence
high
Priority
1
Family
metrics
Locations (1)
  • tests/test_golden_v2.py:35–57_DummyExecutor
Refactoring steps
  1. Split class by responsibility boundaries.
  2. Group methods by shared state and extract subcomponents.
infoRepeated branch familymoderateP0.51 fn / 1 files
Productionstructural
same repeated branch shape (ImportFrom, Assign)
Review whether the repeated branch family should become a helper.
Details
Facts
Finding
Structural finding
Spread
1 fn / 1 files
Source
Production 2
Scope
2 occurrences across 1 file / 1 function
Assessment
Severity
info
Confidence
medium
Priority
0.5
Family
structural
Locations (2)
  • codeclone/pipeline.py:1529–1545report
  • codeclone/pipeline.py:1548–1564report
Refactoring steps
  1. Review whether the repeated branch family should become a helper.
  2. Keep this as a report-only hint if the local duplication is intentional.
infoRepeated branch familymoderateP0.51 fn / 1 files
Productionstructural
same repeated branch shape (Assign, Return)
Review whether the repeated branch family should become a helper.
Details
Facts
Finding
Structural finding
Spread
1 fn / 1 files
Source
Production 2
Scope
2 occurrences across 1 file / 1 function
Assessment
Severity
info
Confidence
medium
Priority
0.5
Family
structural
Locations (2)
  • codeclone/report/findings.py:186–207_finding_reason_list_html
  • codeclone/report/findings.py:209–219_finding_reason_list_html
Refactoring steps
  1. Review whether the repeated branch family should become a helper.
  2. Keep this as a report-only hint if the local duplication is intentional.
infoRepeated branch familymoderateP0.51 fn / 1 files
Productionstructural
same repeated branch shape (Continue)
Review whether the repeated branch family should become a helper.
Details
Facts
Finding
Structural finding
Spread
1 fn / 1 files
Source
Production 2
Scope
2 occurrences across 1 file / 1 function
Assessment
Severity
info
Confidence
medium
Priority
0.5
Family
structural
Locations (2)
  • codeclone/metrics/cohesion.py:69–69compute_lcom4
  • codeclone/metrics/cohesion.py:75–75compute_lcom4
Refactoring steps
  1. Review whether the repeated branch family should become a helper.
  2. Keep this as a report-only hint if the local duplication is intentional.
infoRepeated branch familymoderateP0.51 fn / 1 files
Productionstructural
same repeated branch shape (Continue)
Review whether the repeated branch family should become a helper.
Details
Facts
Finding
Structural finding
Spread
1 fn / 1 files
Source
Production 2
Scope
2 occurrences across 1 file / 1 function
Assessment
Severity
info
Confidence
medium
Priority
0.5
Family
structural
Locations (2)
  • codeclone/cache.py:2156–2156_encode_wire_file_entry
  • codeclone/cache.py:2159–2159_encode_wire_file_entry
Refactoring steps
  1. Review whether the repeated branch family should become a helper.
  2. Keep this as a report-only hint if the local duplication is intentional.
infoRepeated branch familymoderateP0.51 fn / 1 files
Productionstructural
same repeated branch shape (Assign, If, Continue)
Review whether the repeated branch family should become a helper.
Details
Facts
Finding
Structural finding
Spread
1 fn / 1 files
Source
Production 2
Scope
2 occurrences across 1 file / 1 function
Assessment
Severity
info
Confidence
medium
Priority
0.5
Family
structural
Locations (2)
  • codeclone/metrics/coupling.py:59–62compute_cbo
  • codeclone/metrics/coupling.py:64–67compute_cbo
Refactoring steps
  1. Review whether the repeated branch family should become a helper.
  2. Keep this as a report-only hint if the local duplication is intentional.
infoRepeated branch familymoderateP0.51 fn / 1 files
Productionstructural
same repeated branch shape (Continue)
Review whether the repeated branch family should become a helper.
Details
Facts
Finding
Structural finding
Spread
1 fn / 1 files
Source
Production 2
Scope
2 occurrences across 1 file / 1 function
Assessment
Severity
info
Confidence
medium
Priority
0.5
Family
structural
Locations (2)
  • codeclone/extractor.py:771–771_collect_dead_candidates
  • codeclone/extractor.py:777–777_collect_dead_candidates
Refactoring steps
  1. Review whether the repeated branch family should become a helper.
  2. Keep this as a report-only hint if the local duplication is intentional.
infoRepeated branch familymoderateP0.51 fn / 1 files
Productionstructural
same repeated branch shape (Continue)
Review whether the repeated branch family should become a helper.
Details
Facts
Finding
Structural finding
Spread
1 fn / 1 files
Source
Production 2
Scope
2 occurrences across 1 file / 1 function
Assessment
Severity
info
Confidence
medium
Priority
0.5
Family
structural
Locations (2)
  • codeclone/_html_report/_assemble.py:288–288build_html_report
  • codeclone/_html_report/_assemble.py:290–290build_html_report
Refactoring steps
  1. Review whether the repeated branch family should become a helper.
  2. Keep this as a report-only hint if the local duplication is intentional.
infoRepeated branch familymoderateP0.51 fn / 1 files
Productionstructural
same repeated branch shape (Expr, Continue)
Review whether the repeated branch family should become a helper.
Details
Facts
Finding
Structural finding
Spread
1 fn / 1 files
Source
Production 2
Scope
2 occurrences across 1 file / 1 function
Assessment
Severity
info
Confidence
medium
Priority
0.5
Family
structural
Locations (2)
  • codeclone/extractor.py:691–697_collect_module_walk_data
  • codeclone/extractor.py:699–705_collect_module_walk_data
Refactoring steps
  1. Review whether the repeated branch family should become a helper.
  2. Keep this as a report-only hint if the local duplication is intentional.
infoRepeated branch familymoderateP0.51 fn / 1 files
Productionstructural
same repeated branch shape (Continue)
Review whether the repeated branch family should become a helper.
Details
Facts
Finding
Structural finding
Spread
1 fn / 1 files
Source
Production 2
Scope
2 occurrences across 1 file / 1 function
Assessment
Severity
info
Confidence
medium
Priority
0.5
Family
structural
Locations (2)
  • codeclone/extractor.py:653–653_resolve_referenced_qualnames
  • codeclone/extractor.py:660–660_resolve_referenced_qualnames
Refactoring steps
  1. Review whether the repeated branch family should become a helper.
  2. Keep this as a report-only hint if the local duplication is intentional.
infoRepeated branch familymoderateP0.51 fn / 1 files
Productionstructural
same repeated branch shape (Assign, Return)
Review whether the repeated branch family should become a helper.
Details
Facts
Finding
Structural finding
Spread
1 fn / 1 files
Source
Production 2
Scope
2 occurrences across 1 file / 1 function
Assessment
Severity
info
Confidence
medium
Priority
0.5
Family
structural
Locations (2)
  • codeclone/report/findings.py:260–265_finding_matters_html
  • codeclone/report/findings.py:267–272_finding_matters_html
Refactoring steps
  1. Review whether the repeated branch family should become a helper.
  2. Keep this as a report-only hint if the local duplication is intentional.
infoRepeated branch familymoderateP0.51 fn / 1 files
Productionstructural
same repeated branch shape (Continue)
Review whether the repeated branch family should become a helper.
Details
Facts
Finding
Structural finding
Spread
1 fn / 1 files
Source
Production 2
Scope
2 occurrences across 1 file / 1 function
Assessment
Severity
info
Confidence
medium
Priority
0.5
Family
structural
Locations (2)
  • codeclone/blocks.py:53–53extract_blocks
  • codeclone/blocks.py:56–56extract_blocks
Refactoring steps
  1. Review whether the repeated branch family should become a helper.
  2. Keep this as a report-only hint if the local duplication is intentional.
infoRepeated branch familymoderateP0.51 fn / 1 files
Productionstructural
same repeated branch shape (Continue)
Review whether the repeated branch family should become a helper.
Details
Facts
Finding
Structural finding
Spread
1 fn / 1 files
Source
Production 3
Scope
3 occurrences across 1 file / 1 function
Assessment
Severity
info
Confidence
medium
Priority
0.5
Family
structural
Locations (3)
  • codeclone/extractor.py:992–992extract_units_and_stats_from_source
  • codeclone/extractor.py:998–998extract_units_and_stats_from_source
  • codeclone/extractor.py:1088–1088extract_units_and_stats_from_source
Refactoring steps
  1. Review whether the repeated branch family should become a helper.
  2. Keep this as a report-only hint if the local duplication is intentional.
What are structural findings?
Repeated non-overlapping branch-body shapes detected inside individual functions. These are local, report-only refactoring hints and do not affect clone detection or CI verdicts.
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone.extractor:extract_units_and_stats_from_source
Occurrences (3)
FileLocationLines
codeclone/extractor.pyProduction codeclone.extractor:extract_units_and_stats_from_source992-992
codeclone/extractor.pyProduction codeclone.extractor:extract_units_and_stats_from_source998-998
codeclone/extractor.pyProduction codeclone.extractor:extract_units_and_stats_from_source1088-1088
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls2+ has loop0 has try0 nested if0 raises0 stmt seqImportFrom,Assign terminalassign
inside codeclone.pipeline:report
Occurrences (2)
FileLocationLines
codeclone/pipeline.pyProduction codeclone.pipeline:report1529-1545
codeclone/pipeline.pyProduction codeclone.pipeline:report1548-1564
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls2+ has loop0 has try0 nested if0 raises0 stmt seqAssign,Return terminalreturn_expr
inside codeclone.report.findings:_finding_reason_list_html
Occurrences (2)
FileLocationLines
codeclone/report/findings.pyProduction codeclone.report.findings:_finding_reason_list_html186-207
codeclone/report/findings.pyProduction codeclone.report.findings:_finding_reason_list_html209-219
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone.metrics.cohesion:compute_lcom4
Occurrences (2)
FileLocationLines
codeclone/metrics/cohesion.pyProduction codeclone.metrics.cohesion:compute_lcom469-69
codeclone/metrics/cohesion.pyProduction codeclone.metrics.cohesion:compute_lcom475-75
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone.cache:_encode_wire_file_entry
Occurrences (2)
FileLocationLines
codeclone/cache.pyProduction codeclone.cache:_encode_wire_file_entry2156-2156
codeclone/cache.pyProduction codeclone.cache:_encode_wire_file_entry2159-2159
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls2+ has loop0 has try0 nested if1 raises0 stmt seqAssign,If,Continue terminalfallthrough
inside codeclone.metrics.coupling:compute_cbo
Occurrences (2)
FileLocationLines
codeclone/metrics/coupling.pyProduction codeclone.metrics.coupling:compute_cbo59-62
codeclone/metrics/coupling.pyProduction codeclone.metrics.coupling:compute_cbo64-67
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone.extractor:_collect_dead_candidates
Occurrences (2)
FileLocationLines
codeclone/extractor.pyProduction codeclone.extractor:_collect_dead_candidates771-771
codeclone/extractor.pyProduction codeclone.extractor:_collect_dead_candidates777-777
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone._html_report._assemble:build_html_report
Occurrences (2)
FileLocationLines
codeclone/_html_report/_assemble.pyProduction codeclone._html_report._assemble:build_html_report288-288
codeclone/_html_report/_assemble.pyProduction codeclone._html_report._assemble:build_html_report290-290
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls1 has loop0 has try0 nested if0 raises0 stmt seqExpr,Continue terminalfallthrough
inside codeclone.extractor:_collect_module_walk_data
Occurrences (2)
FileLocationLines
codeclone/extractor.pyProduction codeclone.extractor:_collect_module_walk_data691-697
codeclone/extractor.pyProduction codeclone.extractor:_collect_module_walk_data699-705
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone.extractor:_resolve_referenced_qualnames
Occurrences (2)
FileLocationLines
codeclone/extractor.pyProduction codeclone.extractor:_resolve_referenced_qualnames653-653
codeclone/extractor.pyProduction codeclone.extractor:_resolve_referenced_qualnames660-660
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls1 has loop0 has try0 nested if0 raises0 stmt seqAssign,Return terminalreturn_expr
inside codeclone.report.findings:_finding_matters_html
Occurrences (2)
FileLocationLines
codeclone/report/findings.pyProduction codeclone.report.findings:_finding_matters_html260-265
codeclone/report/findings.pyProduction codeclone.report.findings:_finding_matters_html267-272
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone.blocks:extract_blocks
Occurrences (2)
FileLocationLines
codeclone/blocks.pyProduction codeclone.blocks:extract_blocks53-53
codeclone/blocks.pyProduction codeclone.blocks:extract_blocks56-56
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone.extractor:extract_units_and_stats_from_source
Occurrences (3)
FileLocationLines
codeclone/extractor.pyProduction codeclone.extractor:extract_units_and_stats_from_source992-992
codeclone/extractor.pyProduction codeclone.extractor:extract_units_and_stats_from_source998-998
codeclone/extractor.pyProduction codeclone.extractor:extract_units_and_stats_from_source1088-1088
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls2+ has loop0 has try0 nested if0 raises0 stmt seqImportFrom,Assign terminalassign
inside codeclone.pipeline:report
Occurrences (2)
FileLocationLines
codeclone/pipeline.pyProduction codeclone.pipeline:report1529-1545
codeclone/pipeline.pyProduction codeclone.pipeline:report1548-1564
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls2+ has loop0 has try0 nested if0 raises0 stmt seqAssign,Return terminalreturn_expr
inside codeclone.report.findings:_finding_reason_list_html
Occurrences (2)
FileLocationLines
codeclone/report/findings.pyProduction codeclone.report.findings:_finding_reason_list_html186-207
codeclone/report/findings.pyProduction codeclone.report.findings:_finding_reason_list_html209-219
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone.metrics.cohesion:compute_lcom4
Occurrences (2)
FileLocationLines
codeclone/metrics/cohesion.pyProduction codeclone.metrics.cohesion:compute_lcom469-69
codeclone/metrics/cohesion.pyProduction codeclone.metrics.cohesion:compute_lcom475-75
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone.cache:_encode_wire_file_entry
Occurrences (2)
FileLocationLines
codeclone/cache.pyProduction codeclone.cache:_encode_wire_file_entry2156-2156
codeclone/cache.pyProduction codeclone.cache:_encode_wire_file_entry2159-2159
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls2+ has loop0 has try0 nested if1 raises0 stmt seqAssign,If,Continue terminalfallthrough
inside codeclone.metrics.coupling:compute_cbo
Occurrences (2)
FileLocationLines
codeclone/metrics/coupling.pyProduction codeclone.metrics.coupling:compute_cbo59-62
codeclone/metrics/coupling.pyProduction codeclone.metrics.coupling:compute_cbo64-67
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone.extractor:_collect_dead_candidates
Occurrences (2)
FileLocationLines
codeclone/extractor.pyProduction codeclone.extractor:_collect_dead_candidates771-771
codeclone/extractor.pyProduction codeclone.extractor:_collect_dead_candidates777-777
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone._html_report._assemble:build_html_report
Occurrences (2)
FileLocationLines
codeclone/_html_report/_assemble.pyProduction codeclone._html_report._assemble:build_html_report288-288
codeclone/_html_report/_assemble.pyProduction codeclone._html_report._assemble:build_html_report290-290
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls1 has loop0 has try0 nested if0 raises0 stmt seqExpr,Continue terminalfallthrough
inside codeclone.extractor:_collect_module_walk_data
Occurrences (2)
FileLocationLines
codeclone/extractor.pyProduction codeclone.extractor:_collect_module_walk_data691-697
codeclone/extractor.pyProduction codeclone.extractor:_collect_module_walk_data699-705
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone.extractor:_resolve_referenced_qualnames
Occurrences (2)
FileLocationLines
codeclone/extractor.pyProduction codeclone.extractor:_resolve_referenced_qualnames653-653
codeclone/extractor.pyProduction codeclone.extractor:_resolve_referenced_qualnames660-660
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls1 has loop0 has try0 nested if0 raises0 stmt seqAssign,Return terminalreturn_expr
inside codeclone.report.findings:_finding_matters_html
Occurrences (2)
FileLocationLines
codeclone/report/findings.pyProduction codeclone.report.findings:_finding_matters_html260-265
codeclone/report/findings.pyProduction codeclone.report.findings:_finding_matters_html267-272
infoDuplicated branches1 function · 1 file
Productionduplicated branches
calls0 has loop0 has try0 nested if0 raises0 stmt seqContinue terminalfallthrough
inside codeclone.blocks:extract_blocks
Occurrences (2)
FileLocationLines
codeclone/blocks.pyProduction codeclone.blocks:extract_blocks53-53
codeclone/blocks.pyProduction codeclone.blocks:extract_blocks56-56

Report Provenance

Baseline verifiedSchema 2.1Fingerprint 1Cache missMode: fullMetrics baseline verifiedBaseline-aware · contract-verified

General

CodeClone2.0.0b1
Projectcodeclone
Report schema2.1
Scan root/home/runner/work/codeclone/codeclone
Python3.13
Python tagcp313
Analysis modefull
Report modefull
Report generated (UTC)2026-03-25T12:25:10Z
Metrics computedcomplexity, coupling, cohesion, health, dependencies, dead_code
Health score81
Health gradeB
Source IO skipped0

Clone Baseline

Baseline filecodeclone.baseline.json
Baseline path/home/runner/work/codeclone/codeclone/codeclone.baseline.json
Baseline statusok
Baseline loaded
Baseline fingerprint1
Baseline schema2.0
Baseline Python tagcp313
Baseline generator namecodeclone
Baseline generator version2.0.0b1
Baseline payload sha256691c6cedd10e2a51d6038780f3ae9dffe763356dd2aba742b3980f131b79f217
Baseline payload verified

Metrics Baseline

Metrics baseline path/home/runner/work/codeclone/codeclone/codeclone.baseline.json
Metrics baseline loaded
Metrics baseline statusok
Metrics baseline schema2.0
Metrics baseline payload sha2563310d3a0f64d5fa0373546c5c4c82675dc5a441344f876092005665e81234e94
Metrics baseline payload verified

Cache

Cache path/home/runner/work/codeclone/codeclone/.cache/codeclone/cache.json
Cache statusmissing
Cache used

Integrity

Canonicalization version1
Canonicalization scopecanonical_only
Canonical sectionsreport_schema_version, meta, inventory, findings, metrics
Digest algorithmsha256
Digest valuec139f0ed25006e5836697664e21dc5a84b0a5c65c8e2d9c941ebe8c8aad38829
Digest verified