Commit 297af80
fix(bench): Java oracle miscounts package-private test methods as call sites
`ground_truth.py`'s Java "method" definition pattern required an explicit
`public`/`private`/`protected` modifier -- so a package-private method (the
standard JUnit 5 convention for test methods, e.g. `void testFoo() { ... }`
with no modifier at all) was never recognized as a *definition*. A JUnit
test named after the production method it exercises (e.g. `void
initUpdateOwnerForm() throws Exception` testing `OwnerController.
initUpdateOwnerForm()`) fell through and got miscounted as a real *call
site* of the production method.
Found while building B15 (cross-language competitor benchmark): on
spring-petclinic, CALM, CodeGraph, and Ctxo all scored 0/1 "missing" a call
to `initUpdateOwnerForm()` that was never real -- the oracle's sole "hit"
was the test method's own declaration line. Verified live: with the
modifier now optional (same as the pre-existing class/interface patterns
in this same file already treat it), `git_grep_call_sites` correctly
returns 0 sites for that symbol.
Shared by B7/B12/B13/B15 (all import `ground_truth.py`), so this closes the
same false-positive class for every consumer, not just B15.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 822e238 commit 297af80
1 file changed
Lines changed: 14 additions & 1 deletion
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
64 | 77 | | |
65 | 78 | | |
66 | 79 | | |
| |||
0 commit comments