duplicatecode 0.3.2__py3-none-win_amd64.whl → 0.4.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {duplicatecode-0.3.2.data → duplicatecode-0.4.0.data}/scripts/duplicatecode.exe +0 -0
- {duplicatecode-0.3.2.dist-info → duplicatecode-0.4.0.dist-info}/METADATA +17 -3
- duplicatecode-0.4.0.dist-info/RECORD +5 -0
- {duplicatecode-0.3.2.dist-info → duplicatecode-0.4.0.dist-info}/sboms/duplicatecode.cyclonedx.json +15 -14
- duplicatecode-0.3.2.dist-info/RECORD +0 -5
- {duplicatecode-0.3.2.dist-info → duplicatecode-0.4.0.dist-info}/WHEEL +0 -0
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: duplicatecode
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Environment :: Console
|
|
6
6
|
Summary: Static (LLM-free) detection of duplicate/similar code in Python, TypeScript/JavaScript, SQL and C#
|
|
@@ -80,6 +80,19 @@ Two optional signals, both off by default (the detector stays static and offline
|
|
|
80
80
|
[ollama](https://ollama.com): `ollama pull embeddinggemma`), the best model in the codebase benchmark (issue #12: re-implementation
|
|
81
81
|
retrieval R@1 0.94 vs 0.89 for the static detector alone, unchanged when function names are masked). Other presets:
|
|
82
82
|
`--embed=minilm|qwen3|potion|openai|cohere`; MiniLM is smaller but clearly weaker (0.85) and leans on names. Model ids go into the cache key, so vectors of different models never mix.
|
|
83
|
+
**How much it helps, and what is not proven.** On the labeled holdout (`eval-groups`) the score goes from 0.76 to
|
|
84
|
+
0.91 with `--embed` (gemma): independently written solutions to the same task improve most (Python 0.66 to 0.95,
|
|
85
|
+
JavaScript 0.50 to 0.79, TypeScript functions 0.73 to 0.92); sets that were already easy (SQL, React) barely move.
|
|
86
|
+
Without `--embed` nothing changes. Not measured yet:
|
|
87
|
+
- the false-positive rate of a real `scan` on a real repository (the benchmark measures ranking, not how many wrong
|
|
88
|
+
pairs you see); the thresholds used with embeddings were tuned for MiniLM, so expect to adjust `--threshold`;
|
|
89
|
+
- the CodeNet holdout shares a few problems with the dev set (13 of 60 Python, 4 of 60 JavaScript), so those two
|
|
90
|
+
numbers are somewhat optimistic;
|
|
91
|
+
- the public-library part of the retrieval benchmark is probably inflated because the model that wrote the
|
|
92
|
+
re-implementations may have seen those libraries; the internal codebases are the cleaner signal.
|
|
93
|
+
It also needs ollama with the model pulled, and a GPU to be fast (about 5 ms per unit; much slower on CPU).
|
|
94
|
+
Details: issue #12.
|
|
95
|
+
|
|
83
96
|
- `--embed-code` embeds the *whole text of every unit* (function, class, file, SQL statement) and blends
|
|
84
97
|
the cosine into the score (`--embed-weight`, default 0.35, others scaled by 1 - weight). It finds
|
|
85
98
|
re-implementations that share no tokens. On function-level LLM re-implementations it lifted Python from
|
|
@@ -130,7 +143,7 @@ Shared options: `--profile copies|reimpl`, `--threshold`, `--min-tokens`, `--min
|
|
|
130
143
|
`--embed-weight`, `--embed-max-chars`, `--embeddings`, `--embed-cache`, `--embed-dims`.
|
|
131
144
|
|
|
132
145
|
```sh
|
|
133
|
-
duplicatecode scan . --profile reimpl --
|
|
146
|
+
duplicatecode scan . --profile reimpl --embed minilm --pairs --explain
|
|
134
147
|
duplicatecode fragments src/ --min-stmts 4 --min-tokens 30 --cross-file --json
|
|
135
148
|
duplicatecode find "retry with exponential backoff" src/ --top 5 --json
|
|
136
149
|
duplicatecode diff --repo . < change.diff --embed openai
|
|
@@ -223,7 +236,8 @@ Self-scans of three internal repositories (Python + TypeScript), 189 pairs judge
|
|
|
223
236
|
judged sample gives ~50% true duplicates and ~76% incl. partial while keeping ~70% of the true ones.
|
|
224
237
|
These numbers are partly in-sample (weights and filters were chosen on the same pairs) — re-judge a fresh sample
|
|
225
238
|
before trusting them. A structure-heavy `--profile reimpl` exists for renamed re-implementations
|
|
226
|
-
(
|
|
239
|
+
(implies `--min-name 0` and `--min-lines 12`; on a 11k-unit repo the name gate off adds many small wrappers, so the
|
|
240
|
+
line floor matters) but has no judged real-repo precision data yet.
|
|
227
241
|
|
|
228
242
|
### Fresh held-out check (copies profile, threshold 0.6 = the `copies` default for `scan`)
|
|
229
243
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
duplicatecode-0.4.0.data/scripts/duplicatecode.exe,sha256=dcE4Zx4lEQQh3VYEM7-wQGkVHcMsqZ7vaSJc3iPa2cE,17586688
|
|
2
|
+
duplicatecode-0.4.0.dist-info/METADATA,sha256=bMbhlMhg-jM7gWFvFq_CW2ZGJqEJqxfAsYZ5CmUwqL0,22353
|
|
3
|
+
duplicatecode-0.4.0.dist-info/WHEEL,sha256=8Aej0W0a6Cz6apA3IzJrTnxLRVLAt-w0Oh8SA3Con_c,94
|
|
4
|
+
duplicatecode-0.4.0.dist-info/sboms/duplicatecode.cyclonedx.json,sha256=M1Ppro4VOyzoROrLuC7rA1TYGAKm2SpPczSI1OzryvI,126828
|
|
5
|
+
duplicatecode-0.4.0.dist-info/RECORD,,
|
{duplicatecode-0.3.2.dist-info → duplicatecode-0.4.0.dist-info}/sboms/duplicatecode.cyclonedx.json
RENAMED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"bomFormat": "CycloneDX",
|
|
3
3
|
"specVersion": "1.5",
|
|
4
4
|
"version": 1,
|
|
5
|
-
"serialNumber": "urn:uuid:
|
|
5
|
+
"serialNumber": "urn:uuid:bd315273-c92a-49b6-a190-2514407341c6",
|
|
6
6
|
"metadata": {
|
|
7
|
-
"timestamp": "2026-10-
|
|
7
|
+
"timestamp": "2026-10-27T15:21:21.586204300Z",
|
|
8
8
|
"tools": [
|
|
9
9
|
{
|
|
10
10
|
"vendor": "CycloneDX",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
],
|
|
15
15
|
"component": {
|
|
16
16
|
"type": "application",
|
|
17
|
-
"bom-ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-cli#duplicatecode@0.
|
|
17
|
+
"bom-ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-cli#duplicatecode@0.4.0",
|
|
18
18
|
"name": "duplicatecode",
|
|
19
|
-
"version": "0.
|
|
19
|
+
"version": "0.4.0",
|
|
20
20
|
"description": "CLI to detect duplicate/similar code in Python and TypeScript",
|
|
21
21
|
"scope": "required",
|
|
22
22
|
"licenses": [
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"expression": "MIT"
|
|
25
25
|
}
|
|
26
26
|
],
|
|
27
|
-
"purl": "pkg:cargo/duplicatecode@0.
|
|
27
|
+
"purl": "pkg:cargo/duplicatecode@0.4.0?download_url=file://.",
|
|
28
28
|
"components": [
|
|
29
29
|
{
|
|
30
30
|
"type": "application",
|
|
31
|
-
"bom-ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-cli#duplicatecode@0.
|
|
31
|
+
"bom-ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-cli#duplicatecode@0.4.0 bin-target-0",
|
|
32
32
|
"name": "duplicatecode",
|
|
33
|
-
"version": "0.
|
|
34
|
-
"purl": "pkg:cargo/duplicatecode@0.
|
|
33
|
+
"version": "0.4.0",
|
|
34
|
+
"purl": "pkg:cargo/duplicatecode@0.4.0?download_url=file://.#src/main.rs"
|
|
35
35
|
}
|
|
36
36
|
]
|
|
37
37
|
},
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"components": [
|
|
46
46
|
{
|
|
47
47
|
"type": "library",
|
|
48
|
-
"bom-ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-engine#0.
|
|
48
|
+
"bom-ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-engine#0.4.0",
|
|
49
49
|
"name": "duplicatecode-engine",
|
|
50
|
-
"version": "0.
|
|
50
|
+
"version": "0.4.0",
|
|
51
51
|
"description": "Static duplicate/similar code detection engine for Python, TypeScript/JavaScript, SQL and C#",
|
|
52
52
|
"scope": "required",
|
|
53
53
|
"licenses": [
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"expression": "MIT"
|
|
56
56
|
}
|
|
57
57
|
],
|
|
58
|
-
"purl": "pkg:cargo/duplicatecode-engine@0.
|
|
58
|
+
"purl": "pkg:cargo/duplicatecode-engine@0.4.0?download_url=file://..\\duplicatecode-engine"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"type": "library",
|
|
@@ -3324,11 +3324,11 @@
|
|
|
3324
3324
|
],
|
|
3325
3325
|
"dependencies": [
|
|
3326
3326
|
{
|
|
3327
|
-
"ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-cli#duplicatecode@0.
|
|
3327
|
+
"ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-cli#duplicatecode@0.4.0",
|
|
3328
3328
|
"dependsOn": [
|
|
3329
3329
|
"registry+https://github.com/rust-lang/crates.io-index#anyhow@1.0.104",
|
|
3330
3330
|
"registry+https://github.com/rust-lang/crates.io-index#clap@4.6.7",
|
|
3331
|
-
"path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-engine#0.
|
|
3331
|
+
"path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-engine#0.4.0",
|
|
3332
3332
|
"registry+https://github.com/rust-lang/crates.io-index#rayon@1.12.0",
|
|
3333
3333
|
"registry+https://github.com/rust-lang/crates.io-index#serde@1.0.229",
|
|
3334
3334
|
"registry+https://github.com/rust-lang/crates.io-index#serde_json@1.0.151",
|
|
@@ -3337,9 +3337,10 @@
|
|
|
3337
3337
|
]
|
|
3338
3338
|
},
|
|
3339
3339
|
{
|
|
3340
|
-
"ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-engine#0.
|
|
3340
|
+
"ref": "path+file:///D:/a/duplicatecode/duplicatecode/crates/duplicatecode-engine#0.4.0",
|
|
3341
3341
|
"dependsOn": [
|
|
3342
3342
|
"registry+https://github.com/rust-lang/crates.io-index#ignore@0.4.33",
|
|
3343
|
+
"registry+https://github.com/rust-lang/crates.io-index#rayon@1.12.0",
|
|
3343
3344
|
"registry+https://github.com/rust-lang/crates.io-index#serde@1.0.229",
|
|
3344
3345
|
"registry+https://github.com/rust-lang/crates.io-index#serde_json@1.0.151",
|
|
3345
3346
|
"registry+https://github.com/rust-lang/crates.io-index#tree-sitter@0.27.0",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
duplicatecode-0.3.2.data/scripts/duplicatecode.exe,sha256=GMEyfGmRO_Zz_1cxqLnF4qDXUXlYWZvkZmL64ZEiDIQ,17515520
|
|
2
|
-
duplicatecode-0.3.2.dist-info/METADATA,sha256=aL-J7lqHKeSxRM_3lyy7t2NWBub4KV86wNqDFepYLQI,21127
|
|
3
|
-
duplicatecode-0.3.2.dist-info/WHEEL,sha256=8Aej0W0a6Cz6apA3IzJrTnxLRVLAt-w0Oh8SA3Con_c,94
|
|
4
|
-
duplicatecode-0.3.2.dist-info/sboms/duplicatecode.cyclonedx.json,sha256=yohNjoxi1_-lKbdeW4X2DEnAQRzHzB5-z5RUhEb65lQ,126750
|
|
5
|
-
duplicatecode-0.3.2.dist-info/RECORD,,
|
|
File without changes
|