diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml new file mode 100644 index 0000000..dea6558 --- /dev/null +++ b/.github/workflows/eval.yml @@ -0,0 +1,56 @@ +name: eval + +# gitnext's answers checked against real projects' compilers and test suites +# (eval/run.py): callers vs compiler errors, rename vs build + tests, tests-for vs +# a failing mutant. Weekly and on demand; fails when a rate drops below eval/baseline.json. +on: + workflow_dispatch: + schedule: + - cron: "17 3 * * 1" + +jobs: + eval: + runs-on: ubuntu-latest + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - uses: actions/setup-go@v5 + with: { go-version: "stable" } + - uses: actions/setup-node@v4 + with: { node-version: "22" } + - uses: actions/setup-java@v4 + with: { distribution: temurin, java-version: "21", cache: maven } + - uses: actions/setup-python@v5 + with: { python-version: "3.12" } + - name: build gitnext + run: cargo build --release -p gitnext-cli + # What the compilers and test suites said (eval/.work/truth.json) does not change while the + # repos stay on their commits: keep it between runs, so a run only asks gitnext again. + # A new key every run (a key cannot be overwritten), restored by its prefix. + - name: truth cache key + id: truth + run: echo "key=eval-truth-v$(python3 -c "import sys; sys.path.insert(0, 'eval'); import run; print(run.CACHE_VERSION)")-${{ hashFiles('eval/repos.json') }}" >> "$GITHUB_OUTPUT" + - uses: actions/cache/restore@v4 + with: + path: eval/.work/truth.json + key: ${{ steps.truth.outputs.key }}-${{ github.run_id }} + restore-keys: ${{ steps.truth.outputs.key }}- + # A small sample here (its own baseline in eval/baseline.json): with an empty cache it asks the compilers + # and test suites for about 55 minutes, one seed of 20 functions for about 120. The three seeds and the + # thresholds are run locally. The step stops before the job does, so what was asked so far is still saved. + - name: eval + timeout-minutes: 100 + run: GITNEXT=$PWD/target/release/gitnext python3 eval/run.py --seed 7 --n 8 --mutants 4 --check + - uses: actions/cache/save@v4 + if: always() + with: + path: eval/.work/truth.json + key: ${{ steps.truth.outputs.key }}-${{ github.run_id }} + - name: results + if: always() + run: cat eval/results/latest.md >> "$GITHUB_STEP_SUMMARY" + - uses: actions/upload-artifact@v4 + if: always() + with: { name: eval-results, path: eval/results/latest.* } diff --git a/.gitignore b/.gitignore index bea1e49..c18124b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ target/ integrations/loca/runs/ +eval/.work/ +eval/results/agent-* +__pycache__/ diff --git a/.gitnext/.gitignore b/.gitnext/.gitignore index fa208a9..9d3b1e6 100644 --- a/.gitnext/.gitignore +++ b/.gitnext/.gitignore @@ -5,3 +5,7 @@ journal.jsonl hook-seen.tsv tui-welcomed .fuse_hidden* +tests.db +tests.db-* +coverage.db* +ops.jsonl diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..cad0493 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,56 @@ +# Changelog + +## 0.3.0 — 2026-11-12 + +Measured on ten open-source projects in five languages; the numbers and how they are obtained are in +[eval/results/HISTORY.md](eval/results/HISTORY.md). + +### New + +- **`gitnext why `** (MCP: `why`, or `check` with `test`) — a test fails: run it and get the failure in a + few lines, the code the test ran with the most likely culprit first, and the lines changed since the tests + last passed. On 57 seeded bugs the function at fault is first in 81% with a learned coverage map + (18% from the call graph alone). +- **`gitnext learn-tests`** — one test run with coverage remembers which test runs which function: + Python (pytest-cov), Go (`go test -cover`, every test alone), Rust (`llvm-tools-preview`, every test alone). + `tests-for`, `look`, `check` and `why` then name the tests that really run the code: 100% of the failing + tests found (the call graph: 19% on click, Go 78%, Rust 59%). +- **`gitnext digest`** — a long build or test log in a few lines: what failed, where, the message + (rustc, cargo test, pytest, go, tsc, vitest, jest, maven; a vitest run with 35 failures: 843 lines → 12). +- **`gitnext check `** answers as `why`; `gitnext check` after a change prints a verdict. +- **`gitnext ops`, `gitnext undo --op N`** — every edit made through gitnext (CLI and MCP) is in a journal + and can be taken back one by one. +- **Short tool list for small models** — `gitnext mcp --profile lite`: `look`, `replace`, `add_after`, + `rename`, `check`. A 4B local model solved 17 of 18 tasks with the five tools and 14 with eleven. + +### Better + +- **rename**: the project still builds and its tests pass in 91% of 338 renames (83% before): `#private` + names, names in Rust `use` groups, methods of a library's result are left alone. +- **tests-for, TypeScript / JavaScript**: the test is the file (`it('…', () => …)` is not a named function) — + failing test files found 3% → 19%. +- **Python calls**: calls inside nested functions, `module.func` through `__init__` re-exports, functions + passed as values and decorators. +- **callers** in Go directories the build skips (`_examples`, `testdata`) are no longer counted as callers. +- `gitnext outline ` says what is in a folder with nothing public instead of printing nothing. +- `why` and `check` accept the id a test runner prints (`tests/test_x.py::TestA::test_b[case]`, `TestRun/sub`). + +### Measured + +- `eval/run.py`: 10 projects, 3 samples, a noise interval next to every number; `--compare A B` — two versions + on the same functions. +- `eval/agent.py`: a 4B local model (Qwen 3.5 4B) on real tasks — 4 of 24 solved with plain tools, 17 with gitnext. +- `eval/why_rank.py`: where the function at fault is in the answer of `why`, on seeded bugs. +- `eval/smoke.py`: every command and every MCP tool on every project — 860 calls, none fails. +- What checks each function: [eval/results/COVERAGE.md](eval/results/COVERAGE.md). + +### Known gaps + +- TypeScript: no coverage map yet; `tests-for` finds 19% of the failing test files. +- A rename breaks the build or the tests in 9% of cases (dynamic access, names shared by unrelated types). +- Rust tests written inside a macro are not seen. +- A 4B model rarely fixes a seeded bug yet (3 of 12 on click). + +## 0.2.0, 0.1.0 + +See the release pages on GitHub. diff --git a/CLAUDE.md b/CLAUDE.md index 323dbbd..3e5e533 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -8,6 +8,7 @@ This repo is indexed by gitnext (MCP server `gitnext`, or the `gitnext` command) 3. Edit by symbol: `replace_symbol` / `insert_after` / `rename_symbol` (rename also fixes imports, `__all__`, tests and `module.func` uses, and lists any text it did not change) — no need to read the file first. 4. New repo: `overview` once. Resuming: `brief`, then `changes`. 5. Worked out what undocumented code does? `annotate` it in one line; later sessions get it for free. +6. A test fails: `why ` runs it and returns the failure in a few lines and the code to look at, the most likely culprit first. After a change: `gitnext check` builds and runs the tests of what changed. A long build or test log: `… 2>&1 | gitnext digest` gives what failed, where and the message. -Plain reads are fine for non-code files and small files. Run the tests yourself — gitnext does not run them. +Plain reads are fine for non-code files and small files. diff --git a/Cargo.lock b/Cargo.lock index 97aae03..10dee48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -617,7 +617,7 @@ dependencies = [ [[package]] name = "gitnext-cli" -version = "0.2.0" +version = "0.3.0" dependencies = [ "anyhow", "clap", @@ -634,7 +634,7 @@ dependencies = [ [[package]] name = "gitnext-core" -version = "0.2.0" +version = "0.3.0" dependencies = [ "anyhow", "git2", @@ -643,7 +643,7 @@ dependencies = [ [[package]] name = "gitnext-docs" -version = "0.2.0" +version = "0.3.0" dependencies = [ "anyhow", "gitnext-index", @@ -652,7 +652,7 @@ dependencies = [ [[package]] name = "gitnext-index" -version = "0.2.0" +version = "0.3.0" dependencies = [ "anyhow", "gitnext-parse", @@ -665,7 +665,7 @@ dependencies = [ [[package]] name = "gitnext-ops" -version = "0.2.0" +version = "0.3.0" dependencies = [ "anyhow", "git2", @@ -679,7 +679,7 @@ dependencies = [ [[package]] name = "gitnext-parse" -version = "0.2.0" +version = "0.3.0" dependencies = [ "anyhow", "serde", @@ -695,7 +695,7 @@ dependencies = [ [[package]] name = "gitnext-tui" -version = "0.2.0" +version = "0.3.0" dependencies = [ "anyhow", "gitnext-core", @@ -703,6 +703,7 @@ dependencies = [ "gitnext-ops", "gitnext-parse", "ratatui", + "unicode-width", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 9a912c2..63f0877 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,11 @@ [workspace] resolver = "2" members = ["crates/*"] +# eval clones Rust projects under eval/.work: they are not part of this workspace +exclude = ["eval/.work"] [workspace.package] -version = "0.2.0" +version = "0.3.0" edition = "2021" license = "MIT" diff --git a/README.md b/README.md index 67ec1f7..acf8132 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,47 @@ gitnext is a drop-in companion to git (`gitnext` = `git` + a code index). It par The repository stays plain git — GitHub, CI and your other tools keep working. -## Measured on a real repository +## Results + +Everything here is measured on other people's code — ten open-source projects in five languages — and judged by their own compilers and test suites. How each number is obtained and how much of it is noise: [eval/results/HISTORY.md](eval/results/HISTORY.md). + +### A small local model solves more + +

Tasks solved by a 4B local model: with plain tools 4 of 24, with gitnext tools 17 of 24

+ +The same 4B model, the same tasks, the same judge. With plain tools it guesses file paths and answers from memory; with gitnext one call gives it the code, the callers and the tests. For small models there is a short list of five tools (`gitnext mcp --profile lite`): in a separate run of 18 tasks the model solved 17 with the five and 14 with eleven, and spent 15% fewer tokens. + +### A failing test leads to the function at fault + +

Share of seeded bugs where gitnext why names the function at fault first: 18% from the call graph, 81% with the learned coverage map

+ +`gitnext why ` runs the test and answers in a dozen lines: the failure itself, the code the test ran with the most likely culprit first, and the lines that changed since the tests last passed. `gitnext learn-tests` is one test run with coverage (Python, Go, Rust); a long build or test log goes through `gitnext digest` (a vitest run with 35 failures: 843 lines → 12). + +### How accurate the code graph is + +| | Go | Python | TypeScript | Java | Rust | all | +|---|---:|---:|---:|---:|---:|---:| +| who calls a function — found | 100% | — | 100% | 100% | 99% | **100%** ±1 | +| who calls a function — correct | 98% | — | 100% | 100% | 100% | **99%** ±1 | +| rename — the project still builds and its tests pass | 93% | 90% | 85% | 96% | 87% | **91%** ±3 | +| tests for a function — one of the first 10 named does fail | 84% | 81% | 41% | 95% | 73% | **79%** ±6 | +| … with a learned coverage map — failing tests found | 100% | 100% | — | — | 100% | | + +232 functions for callers, 338 renames, 167 functions for tests; ± is the 90% interval, a difference inside it is noise. Python has no compiler to say who calls what, so callers are not scored there. `python3 eval/run.py` repeats the run; the full table is [eval/results/latest.md](eval/results/latest.md). + +### Fewer steps, less to read

Bytes of code an agent read for six tasks: 49 KB without gitnext, 29 KB recounted, 22 KB with gitnext look

-Most of an agent session is the system prompt re-sent on every step, so the win comes from **fewer steps**, not just shorter output: `gitnext look A B C` answers *what is it · who calls it · what it calls · which tests reach it and how to run them · what a change affects* for several targets at once. Small local models (4B) did not use the tools at all — for them the compact code map in `AGENTS.md` is what helps. Details and how to reproduce: [docs/GUIDE.ru.md](docs/GUIDE.ru.md), [integrations/ab](integrations/ab). +Most of an agent session is the system prompt re-sent on every step, so the win comes from **fewer steps**, not just shorter output: `gitnext look A B C` answers *what is it · who calls it · what it calls · which tests reach it and how to run them · what a change affects* for several targets at once. How to reproduce: [integrations/ab](integrations/ab). + +### What is checked, and what is not good yet + +- 115 unit tests; parser output is pinned by fixtures in eight languages; every command and every MCP tool — 86 in all — is run on each of the ten projects (860 calls, none fails). What checks each function: [eval/results/COVERAGE.md](eval/results/COVERAGE.md). +- TypeScript: `tests-for` finds 19% of the failing test files (it was 3%); the coverage map exists for Python, Go and Rust only. +- A rename breaks the build or the tests in 9% of cases — mostly dynamic access and names shared by unrelated types. +- A 4B model rarely fixes a seeded bug yet: 3 of 12 on click. +- Rust tests written inside a macro are not seen (22% of the tests of indexmap). ## Install @@ -53,13 +89,19 @@ gitnext # open the TUI | skeleton of a file or folder | `gitnext outline ` / `outline` | | edit one function without reading the file | `gitnext edit replace -f new.py` / `replace_symbol` | | rename everywhere (imports, tests, `__all__`, `mod.func`) | `gitnext rename ` / `rename_symbol` | -| what breaks, which tests to run | `gitnext impact ` · `gitnext tests-for ` | +| what breaks, which tests to run | `gitnext impact ` · `gitnext tests-for ` (the 10 most likely to fail + one command for the rest) | +| which tests really run a function | `gitnext learn-tests` — the tests run once with coverage (Python: pytest-cov; Go; Rust: `llvm-tools-preview`); `tests-for`, `look`, `check` and `why` then use the real list | +| did my change break anything | `gitnext check` — builds and runs the tests of what changed, prints a verdict (`gitnext rename A B --check` does it right after the rename) | +| a test fails — why | `gitnext why ` / `check` with `test` — runs it: the failure in a few lines, the code the test ran with the most likely culprit first, the lines changed since the tests passed | +| a long build or test log | `cargo test 2>&1 \| gitnext digest` — what failed, where, the message (a vitest run with 35 failures: 843 lines → 12) | | error or traceback → code | `gitnext locate` (stdin) / `locate` | | where were we | `gitnext brief` · `gitnext journal` | | which libraries the code calls, with versions | `gitnext libs` (and `look` shows them per function) | `gitnext setup` writes the MCP config and a short instruction block for each agent; `--hooks` makes Claude Code see an outline before reading a big file whole. +**Small local models.** `gitnext mcp --profile lite` shows five tools instead of 29 — `look`, `replace`, `add_after`, `rename`, `check` — with short descriptions and short answers: a 4B model chooses better from a short list. For a model that calls no tools at all, `gitnext context ""` prints the code the task is about, to put into the prompt. + ## Git in plain words

Changes screen: one function staged, a commit message suggested

@@ -92,10 +134,25 @@ In the TUI: `s` changes, `space` stages a file or one function, `enter` shows be | `crates/gitnext-cli` | the `gitnext` command and the MCP server | | `crates/gitnext-tui` | the terminal UI | | `integrations/` | A/B test kit for real agents, loca (llama.cpp) benchmark | +| `eval/` | the measurements: `run.py` (accuracy on ten projects), `agent.py` (a local model on real tasks), `why_rank.py` (seeded bugs), `smoke.py` (every command on every project) | ## Status -Early but used daily on its own code (this repository is indexed by gitnext — see `AGENTS.md`). Name-based resolution is approximate for dynamic code; `gitnext lsp` refines it with rust-analyzer / pyright / clangd. Parser output is pinned by fixtures in `crates/gitnext-parse/tests/fixtures`. +Early, and used daily on its own code (this repository is indexed by gitnext — see `AGENTS.md`). Languages: Rust, Python, Go, Java, TypeScript, JavaScript, C, C++. Name-based resolution is approximate for dynamic code; `gitnext lsp` refines it with rust-analyzer / pyright / clangd. Every change to what the tools answer is measured before it is merged: [eval/results/HISTORY.md](eval/results/HISTORY.md). + +## Similar projects + +Each piece exists elsewhere; gitnext puts them in one tool and measures the effect. + +| Project | What it does | How gitnext differs | +|---|---|---| +| [Aider repo map](https://aider.chat/docs/repomap.html) | tree-sitter map of the repo in the prompt | the map is committed to the repo (`AGENTS.md`, `.gitnext/map`), so any agent — even a small local model without tools — gets it | +| [Serena](https://oraios.github.io/serena/01-about/035_tools.html) | MCP tools to find, edit and rename by symbol, via language servers | one call `look` returns code + callers + callees + tests + impact; works without a language server (LSP is optional refinement) | +| [CodeGraph](https://colbymchenry.github.io/codegraph/), [CodeGraphContext](https://mcpservers.org/servers/shashankss1205/codegraphcontext) | code graph over MCP: callers, callees, impact | also injects the code a task needs before the request (`gitnext context`) for agents that do not call tools | +| [sem](https://docs.rs/sem-cli/0.7.0/sem/) | entity-level diff, blame and impact on top of git | adds plain-language git: stage or commit one function, undo, timeline, commit message from changed functions | +| [lazygit](https://github.com/jesseduffield/lazygit), [GitButler](https://gitbutler.com) | friendly git UIs | the TUI shows code by function and relation, not only files and hunks | + +What we can show that others do not: accuracy against compilers and tests on ten projects, and the effect on a real agent — including a 4B local model ([eval](eval), [integrations/ab](integrations/ab), [integrations/loca](integrations/loca)). ## License diff --git a/README.ru.md b/README.ru.md index 8a1ba8d..612462c 100644 --- a/README.ru.md +++ b/README.ru.md @@ -21,11 +21,47 @@ gitnext — спутник git (`gitnext` = `git` + индекс кода). Он Репозиторий остаётся обычным git: GitHub, CI и остальные инструменты работают как раньше. -## Замер на настоящем проекте +## Результаты + +Всё здесь измерено на чужом коде — десять открытых проектов на пяти языках — и судят компиляторы и тесты самих проектов. Как получена каждая цифра и какая её часть — шум: [eval/results/HISTORY.md](eval/results/HISTORY.md). + +### Маленькая локальная модель решает больше + +

Задания, решённые локальной моделью на 4B: с обычными инструментами 4 из 24, с gitnext 17 из 24

+ +Та же модель на 4B, те же задания, тот же судья. С обычными инструментами она угадывает пути к файлам и отвечает по памяти; с gitnext один вызов даёт ей код, вызывающих и тесты. Для маленьких моделей есть короткий список из пяти инструментов (`gitnext mcp --profile lite`): в отдельном замере из 18 заданий модель решила 17 с пятью инструментами и 14 с одиннадцатью, потратив на 15% меньше токенов. + +### От упавшего теста — к виновной функции + +

Доля подсаженных ошибок, где gitnext why называет виновную функцию первой: 18% по графу вызовов, 81% с картой покрытия

+ +`gitnext why <тест>` запускает тест и отвечает в десяток строк: сам сбой, код, который тест запускал, — самый вероятный виновник первым — и строки, изменённые с тех пор, как тесты проходили. `gitnext learn-tests` — один прогон тестов с покрытием (Python, Go, Rust). Длинный лог сборки или тестов сжимает `gitnext digest` (прогон vitest с 35 падениями: 843 строки → 12). + +### Насколько точен граф кода + +| | Go | Python | TypeScript | Java | Rust | все | +|---|---:|---:|---:|---:|---:|---:| +| кто вызывает функцию — найдено | 100% | — | 100% | 100% | 99% | **100%** ±1 | +| кто вызывает функцию — верно | 98% | — | 100% | 100% | 100% | **99%** ±1 | +| переименование — проект собирается, тесты проходят | 93% | 90% | 85% | 96% | 87% | **91%** ±3 | +| тесты функции — хоть один из первых 10 названных падает | 84% | 81% | 41% | 95% | 73% | **79%** ±6 | +| … с картой покрытия — найдено падающих тестов | 100% | 100% | — | — | 100% | | + +232 функции для вызывающих, 338 переименований, 167 функций для тестов; ± — интервал 90%, разница внутри него — шум. У Python нет компилятора, который скажет, кто кого вызывает, поэтому вызывающие там не оцениваются. Повторить: `python3 eval/run.py`; полная таблица — [eval/results/latest.md](eval/results/latest.md). + +### Меньше шагов, меньше читать

Сколько кода прочитал агент на 6 задачах

-Большую часть сессии агента съедают системные инструкции, которые отправляются заново на каждом шаге. Поэтому выигрыш даёт **меньшее число шагов**, а не только более короткий вывод: `gitnext look A B C` сразу для нескольких целей отвечает *что это · кто вызывает · что вызывает · какие тесты и как их запустить · что заденет изменение*. Маленькие локальные модели (4B) инструментами не пользовались вовсе — им помогает компактная карта кода в `AGENTS.md`. Подробности и как повторить: [docs/GUIDE.ru.md](docs/GUIDE.ru.md), [integrations/ab](integrations/ab). +Большую часть сессии агента съедают системные инструкции, которые отправляются заново на каждом шаге. Поэтому выигрыш даёт **меньшее число шагов**, а не только более короткий вывод: `gitnext look A B C` сразу для нескольких целей отвечает *что это · кто вызывает · что вызывает · какие тесты и как их запустить · что заденет изменение*. Как повторить: [integrations/ab](integrations/ab). + +### Что проверено и что пока плохо + +- 115 модульных тестов; вывод парсеров закреплён эталонами на восьми языках; каждая команда и каждый MCP-инструмент — всего 86 — запускаются на каждом из десяти проектов (860 вызовов, ни один не падает). Чем проверена каждая функция: [eval/results/COVERAGE.md](eval/results/COVERAGE.md). +- TypeScript: `tests-for` находит 19% падающих файлов тестов (было 3%); карта покрытия есть только для Python, Go и Rust. +- Переименование ломает сборку или тесты в 9% случаев — в основном динамический доступ и одинаковые имена у несвязанных типов. +- Модель на 4B пока редко чинит подсаженную ошибку: 3 из 12 на click. +- Тесты Rust, написанные внутри макроса, не видны (22% тестов indexmap). ## Установка @@ -54,13 +90,19 @@ gitnext # открыть TUI | скелет файла или папки | `gitnext outline <путь>` / `outline` | | поправить функцию, не читая файл | `gitnext edit replace -f new.py` / `replace_symbol` | | переименовать везде (импорты, тесты, `__all__`, `mod.func`) | `gitnext rename <старое> <новое>` / `rename_symbol` | -| что сломается и какие тесты гонять | `gitnext impact ` · `gitnext tests-for ` | +| что сломается и какие тесты гонять | `gitnext impact ` · `gitnext tests-for ` (10 самых вероятных + одна команда на остальные) | +| какие тесты на самом деле исполняют функцию | `gitnext learn-tests` — один прогон тестов с покрытием (Python: pytest-cov; Go; Rust: `llvm-tools-preview`); `tests-for`, `look`, `check` и `why` дальше берут настоящий список | +| не сломал ли я что-то правкой | `gitnext check` — собирает проект, гонит тесты изменённого и выдаёт вердикт (`gitnext rename A B --check` — сразу после переименования) | +| тест падает — почему | `gitnext why <тест>` / `check` с `test` — запускает его: сбой в нескольких строках, код, который тест запускал (самый вероятный виновник первым), строки, изменённые с тех пор, как тесты проходили | +| длинный лог сборки или тестов | `cargo test 2>&1 \| gitnext digest` — что упало, где, сообщение | | ошибка или traceback → код | `gitnext locate` (stdin) / `locate` | | на чём остановились | `gitnext brief` · `gitnext journal` | | какие библиотеки и версии использует код | `gitnext libs` (а `look` показывает их у каждой функции) | `gitnext setup` пишет конфиг MCP и короткий блок инструкций для каждого агента; с `--hooks` Claude Code сначала видит скелет большого файла, а не читает его целиком. +**Маленькие локальные модели.** `gitnext mcp --profile lite` показывает пять инструментов вместо 29 — `look`, `replace`, `add_after`, `rename`, `check` — с короткими описаниями и короткими ответами: модель на 4B лучше выбирает из короткого списка. Для модели, которая инструменты не вызывает совсем, `gitnext context "<задача>"` печатает код, о котором задача, — его кладут в запрос. + ## Git понятными словами

Экран изменений

@@ -97,6 +139,7 @@ gitnext branches # насколько ветки впереди/поз | `crates/gitnext-tui` | терминальный интерфейс: панели и навигация (`lib.rs`), git словами (`git.rs`), понятные описания папок и функций (`views.rs`) | | `integrations/ab` | A/B-тест на настоящем агенте: две копии проекта, промпт, проверка | | `integrations/loca` | бенчмарк с локальной моделью через loca (llama.cpp / Ollama) | +| `eval/` | замеры: `run.py` (точность на десяти проектах), `agent.py` (локальная модель на настоящих заданиях), `why_rank.py` (подсаженные ошибки), `smoke.py` (каждая команда на каждом проекте) | | `scripts/install.sh`, `.github/workflows` | установка, CI (clippy + тесты на Ubuntu и macOS), релизы по тегу | Внутри `crates/gitnext-ops/src`: @@ -120,7 +163,21 @@ gitnext branches # насколько ветки впереди/поз ## Состояние -Рабочий ранний вариант; этот репозиторий сам проиндексирован gitnext (см. `AGENTS.md`). Связи по именам для динамического кода приблизительны — `gitnext lsp` уточняет их языковыми серверами. Результат парсеров закреплён эталонами в `crates/gitnext-parse/tests/fixtures`. +Ранний рабочий вариант; этот репозиторий сам проиндексирован gitnext (см. `AGENTS.md`). Языки: Rust, Python, Go, Java, TypeScript, JavaScript, C, C++. Связи по именам для динамического кода приблизительны — `gitnext lsp` уточняет их языковыми серверами. Каждое изменение того, что отвечают инструменты, измеряется до слияния: [eval/results/HISTORY.md](eval/results/HISTORY.md). + +## Похожие проекты + +Каждая часть по отдельности уже есть; gitnext собирает их в одну программу и замеряет эффект. + +| Проект | Что делает | Чем отличается gitnext | +|---|---|---| +| [Aider repo map](https://aider.chat/docs/repomap.html) | карта репозитория (tree-sitter) в подсказке | карта лежит в самом репозитории (`AGENTS.md`, `.gitnext/map`) — её получает любой агент, даже маленькая локальная модель без инструментов | +| [Serena](https://oraios.github.io/serena/01-about/035_tools.html) | MCP-инструменты: найти, править, переименовать по символу через языковые серверы | один вызов `look` отдаёт код, вызывающих, вызываемых, тесты и влияние; работает без языкового сервера (LSP — необязательное уточнение) | +| [CodeGraph](https://colbymchenry.github.io/codegraph/), [CodeGraphContext](https://mcpservers.org/servers/shashankss1205/codegraphcontext) | граф кода через MCP: кто вызывает, что заденет | ещё и сам подкладывает код под задачу перед запросом (`gitnext context`) — для агентов, которые не вызывают инструменты | +| [sem](https://docs.rs/sem-cli/0.7.0/sem/) | изменения, blame и влияние по функциям поверх git | плюс git понятными словами: застейджить или закоммитить одну функцию, отмена, машина времени, сообщение коммита по изменённым функциям | +| [lazygit](https://github.com/jesseduffield/lazygit), [GitButler](https://gitbutler.com) | удобный git-интерфейс | TUI показывает код по функциям и связям, а не только файлы и куски diff | + +Чего нет у других: точность, проверенная компиляторами и тестами на десяти проектах, и эффект на настоящем агенте — в том числе на локальной модели на 4B ([eval](eval), [integrations/ab](integrations/ab), [integrations/loca](integrations/loca)). ## Лицензия diff --git a/crates/gitnext-cli/Cargo.toml b/crates/gitnext-cli/Cargo.toml index 2131276..cbc62a7 100644 --- a/crates/gitnext-cli/Cargo.toml +++ b/crates/gitnext-cli/Cargo.toml @@ -7,12 +7,12 @@ license.workspace = true [dependencies] anyhow = "1.0.104" clap = { version = "4.6.7", features = ["derive"] } -gitnext-core = { version = "0.2.0", path = "../gitnext-core" } -gitnext-docs = { version = "0.2.0", path = "../gitnext-docs" } -gitnext-index = { version = "0.2.0", path = "../gitnext-index" } -gitnext-ops = { version = "0.2.0", path = "../gitnext-ops" } -gitnext-parse = { version = "0.2.0", path = "../gitnext-parse" } -gitnext-tui = { version = "0.2.0", path = "../gitnext-tui" } +gitnext-core = { version = "0.3.0", path = "../gitnext-core" } +gitnext-docs = { version = "0.3.0", path = "../gitnext-docs" } +gitnext-index = { version = "0.3.0", path = "../gitnext-index" } +gitnext-ops = { version = "0.3.0", path = "../gitnext-ops" } +gitnext-parse = { version = "0.3.0", path = "../gitnext-parse" } +gitnext-tui = { version = "0.3.0", path = "../gitnext-tui" } serde = { version = "1.0.229", features = ["derive"] } serde_json = "1.0.154" diff --git a/crates/gitnext-cli/src/cmds.rs b/crates/gitnext-cli/src/cmds.rs index 995fa02..8174a4b 100644 --- a/crates/gitnext-cli/src/cmds.rs +++ b/crates/gitnext-cli/src/cmds.rs @@ -173,8 +173,18 @@ pub enum More { }, /// Check that everything is in place for agents (binary on PATH, index, map, agent configs, model server) Doctor, - /// Take back the last commit; its changes stay staged (refuses if already pushed) - Undo, + /// Take back the last commit; its changes stay staged (refuses if already pushed). + /// `--op N` undoes one gitnext edit instead (see `gitnext ops`) + Undo { + /// operation number from `gitnext ops`; other changes stay as they are + #[arg(long)] + op: Option, + }, + /// Edits made through gitnext (CLI and MCP), newest first: who, what, which files; `undo --op N` takes one back + Ops { + #[arg(short = 'n', default_value_t = 20)] + n: usize, + }, /// Branches: ahead / behind and what each one changes Branches, /// Every earlier point of HEAD (commits, resets, checkouts); `--to N` goes back to one @@ -189,16 +199,53 @@ pub enum More { Msg, /// Hooks for agent harnesses (reads the hook JSON on stdin): `read`, `session-start` Hook { event: String }, - /// Tests that exercise a symbol, with the command to run just those + /// Run the tests once with coverage and remember which test runs which function (Python: pytest-cov; Go: go test -cover; Rust: llvm-tools); + /// `tests-for`, `look` and `check` then name the tests that really execute a function + LearnTests, + /// A test fails: run it and get the failure in a few lines and the code it reaches, the most likely + /// culprit first (exit 1 while it fails). `greater_than` finds `test_greater_than` + Why { + /// Test names + names: Vec, + /// Seconds the test command may take + #[arg(long, default_value_t = 600)] + timeout: u64, + }, + /// Build or test output (stdin, or the arguments) in a few lines: what failed, where, the message — + /// `cargo test 2>&1 | gitnext digest` + Digest { + text: Vec, + /// Failures printed in full; the rest are counted and named + #[arg(long, default_value_t = 5)] + max: usize, + }, + /// After a change: build the project and run the tests of what changed; prints a verdict (exit 1 if it fails). + /// With test names: why they fail (the same as `gitnext why `) + Check { + /// Tests to explain instead of checking the change + names: Vec, + /// Seconds each command may take + #[arg(long, default_value_t = 600)] + timeout: u64, + }, + /// Tests that exercise a symbol: the 10 most likely to fail first, with the command to run them TestsFor { symbol: String, #[arg(short, long, default_value_t = 4)] depth: usize, + /// Name every test, not only the 10 most likely + #[arg(short, long)] + all: bool, }, } pub fn more(cwd: &Path, m: More, out: &Out) -> Result<()> { let ws = Workspace::open(cwd)?; + // `check ` is `why ` + let m = match m { + More::Check { names, timeout } if !names.is_empty() => More::Why { names, timeout }, + other => other, + }; match m { More::Explain { path, provider, limit, dry_run } => { let g = ws.graph()?; @@ -248,10 +295,56 @@ pub fn more(cwd: &Path, m: More, out: &Out) -> Result<()> { }; out.text(&gitnext_ops::locate::render_locate(&g, &ws.root, &t, !no_code)); } - More::TestsFor { symbol, depth } => { + More::LearnTests => { + let g = ws.graph()?; + out.text(&gitnext_ops::learn::render(&gitnext_ops::learn::learn(&ws.root, &g)?)); + } + More::Why { names, timeout } => { + let g = ws.graph()?; + if names.is_empty() { + bail!("which test? `gitnext why `"); + } + let mut ids: Vec = Vec::new(); + for t in &names { + let found = gitnext_ops::why::find_tests(&g, t); + if found.is_empty() { + let near: Vec<&str> = gitnext_ops::why::similar_tests(&g, t).into_iter().map(|i| g.syms[i].sym.name.as_str()).collect(); + bail!("no test named `{t}`{}", if near.is_empty() { String::new() } else { format!("; close: {}", near.join(", ")) }); + } + ids.extend(found.into_iter().filter(|i| !ids.contains(i)).collect::>()); + } + let w = gitnext_ops::why::why(&ws.root, &g, &ids, std::time::Duration::from_secs(timeout)); + if out.json { + out.json(&gitnext_ops::why::json(&g, &w))?; + } else { + out.text(&gitnext_ops::why::render(&g, &ws.root, &w)); + } + if w.failed() { + std::process::exit(1); + } + } + More::Digest { text, max } => { + let t = if text.is_empty() { + let mut s = String::new(); + std::io::stdin().read_to_string(&mut s)?; + s + } else { + text.join(" ") + }; + out.text(&gitnext_ops::digest::render(&gitnext_ops::digest::digest(&t), max)); + } + More::Check { timeout, .. } => { + let g = ws.graph()?; + let c = gitnext_ops::check::check(&ws.root, &g, std::time::Duration::from_secs(timeout)); + out.text(&gitnext_ops::check::render(&g, &c)); + if !c.ok() { + std::process::exit(1); + } + } + More::TestsFor { symbol, depth, all } => { let g = ws.graph()?; for i in lookup(&g, &symbol)? { - out.text(&gitnext_ops::locate::render_tests_for(&g, &ws.root, i, depth)); + out.text(&gitnext_ops::locate::render_tests_for(&g, &ws.root, i, depth, all)); } } More::Lsp { lang, limit, all } => { @@ -378,7 +471,21 @@ pub fn more(cwd: &Path, m: More, out: &Out) -> Result<()> { println!(" tip: `gitnext setup claude --hooks` also answers whole reads of big code files with an outline"); } } - More::Undo => { + More::Undo { op: Some(id) } => { + let r = gitnext_ops::oplog::undo(&ws.root, id)?; + if out.json { + return out.json(&r); + } + out.text(&gitnext_ops::oplog::render_undo(&r)); + } + More::Ops { n } => { + let ops = gitnext_ops::oplog::load(&ws.root); + if out.json { + return out.json(&ops.iter().rev().take(n).collect::>()); + } + out.text(&gitnext_ops::oplog::render(&ops, n)); + } + More::Undo { op: None } => { let c = ws.repo()?.undo_commit().map_err(|e| anyhow::anyhow!(gitnext_ops::changes::humanize(&e)))?; println!("✓ took back {} “{}” — its changes are staged; edit and `gitnext commit` again", c.short, c.summary); println!(" (to redo it as it was: `gitnext timeline --to 1`)"); diff --git a/crates/gitnext-cli/src/main.rs b/crates/gitnext-cli/src/main.rs index 0453e44..860fb3d 100644 --- a/crates/gitnext-cli/src/main.rs +++ b/crates/gitnext-cli/src/main.rs @@ -105,6 +105,9 @@ enum Cmd { query: Vec, #[arg(short = 'n', default_value_t = 20)] limit: usize, + /// Search the text of the files instead of names: every line that contains the query, with the function it is in + #[arg(long)] + text: bool, }, /// List symbols in a file or directory (default: whole repo) Symbols { @@ -117,7 +120,11 @@ enum Cmd { public: bool, }, /// Who calls this function/method (or instantiates this class) - Callers { symbol: String }, + Callers { + /// One or more functions / methods / classes + #[arg(required = true)] + symbols: Vec, + }, /// What this function/method calls Callees { symbol: String }, /// What breaks if this symbol changes: reverse dependencies, files, tests @@ -154,6 +161,9 @@ enum Cmd { /// Also rename the old name where it is only text: comments, strings, docs #[arg(long)] text: bool, + /// Then build and run the tests of what changed, and print the verdict (as `gitnext check`) + #[arg(long)] + check: bool, }, #[command(flatten)] More(cmds::More), @@ -162,7 +172,7 @@ enum Cmd { /// Write/merge .mcp.json in the repository root instead of serving #[arg(long)] install: bool, - /// full (every tool) or lite (7 tools, terse, small outputs — for local 3–14B models) + /// full (every tool) or lite (5 tools, terse, small outputs — for local 3–14B models) #[arg(long, default_value = "full")] profile: String, }, @@ -221,7 +231,7 @@ fn run() -> Result<()> { let out = Out { json: cli.json, pretty: cli.pretty, - opts: Opts { verbose: color_on(), tests: cli.tests, all: false, full_doc: cli.full }, + opts: Opts { verbose: color_on(), tests: cli.tests, all: false, full_doc: cli.full, lite: false }, }; let Some(cmd) = cli.cmd else { return gitnext_tui::run(&Workspace::open(&cwd)?); @@ -429,10 +439,18 @@ fn run() -> Result<()> { out.text(&render::show(&g, i, out.opts)); } } - Cmd::Search { query, limit } => { + Cmd::Search { query, limit, text } => { let ws = Workspace::open(&cwd)?; let g = ws.graph()?; let q = query.join(" "); + if text { + let hits = gitnext_ops::look::text_hits(&g, &ws.root, &q, limit); + if out.json { + return out.json(&hits); + } + out.text(&if hits.is_empty() { format!("no line contains `{q}`\n") } else { hits.join("\n") + "\n" }); + return Ok(()); + } if out.json { let v: Vec<_> = g.search(&q, limit).into_iter().map(|i| g.sym_ref(i)).collect(); return out.json(&v); @@ -457,15 +475,25 @@ fn run() -> Result<()> { } out.text(&render::symbols(&g, &p, kind, public, out.opts)); } - Cmd::Callers { symbol } => { + Cmd::Callers { symbols } => { let ws = Workspace::open(&cwd)?; let g = ws.graph()?; - let ids = lookup(&g, &symbol)?; + // several names in one run: the graph is loaded once (it is the slow part on a big repo) + let mut ids = Vec::new(); + for symbol in &symbols { + ids.extend(lookup(&g, symbol)?); + } if out.json { let v: Vec<_> = ids .iter() - .map(|&i| serde_json::json!({ "symbol": g.sym_ref(i), - "callers": g.callers(i).into_iter().filter(|(c, _)| out.opts.tests || !g.syms[*c].sym.test).map(|(c, l)| (g.sym_ref(c), l)).collect::>() })) + .map(|&i| { + // `maybe`: a call on a value of unknown type that could reach this method + let (sure, maybe): (Vec<_>, Vec<_>) = + g.callers(i).into_iter().filter(|(c, _)| out.opts.tests || !g.syms[*c].sym.test).partition(|(c, _)| !g.is_guess(*c, i)); + serde_json::json!({ "symbol": g.sym_ref(i), + "callers": sure.into_iter().map(|(c, l)| (g.sym_ref(c), l)).collect::>(), + "maybe": maybe.into_iter().map(|(c, l)| (g.sym_ref(c), l)).collect::>() }) + }) .collect(); return out.json(&v); } @@ -555,10 +583,11 @@ fn run() -> Result<()> { let ws = Workspace::open(&cwd)?; cmds::edit(&ws, op, out.json)?; } - Cmd::Rename { symbol, new_name, dry_run, text } => { + Cmd::Rename { symbol, new_name, dry_run, text, check } => { let ws = Workspace::open(&cwd)?; let g = ws.graph()?; let i = one(&g, &symbol)?; + let _op = gitnext_ops::oplog::Group::start(&ws.root, "rename", &format!("{} → {new_name}", g.syms[i].sym.qualified)); let mut r = gitnext_ops::edit::rename(&ws.root, &g, i, &new_name, dry_run)?; if text { gitnext_ops::edit::rename_leftover_text(&ws.root, &mut r)?; @@ -567,6 +596,14 @@ fn run() -> Result<()> { return out.json(&r); } out.text(&gitnext_ops::edit::render_rename(&r)); + if check && !dry_run { + let g = ws.graph()?; // the files changed: index them again + let c = gitnext_ops::check::check(&ws.root, &g, std::time::Duration::from_secs(600)); + out.text(&gitnext_ops::check::render(&g, &c)); + if !c.ok() { + std::process::exit(1); + } + } } Cmd::More(m) => cmds::more(&cwd, m, &out)?, Cmd::Tui => gitnext_tui::run(&Workspace::open(&cwd)?)?, diff --git a/crates/gitnext-cli/src/mcp.rs b/crates/gitnext-cli/src/mcp.rs index 9be1e04..fd93a75 100644 --- a/crates/gitnext-cli/src/mcp.rs +++ b/crates/gitnext-cli/src/mcp.rs @@ -38,6 +38,7 @@ impl Server { let snapshot = Snapshot::of(&graph); let t = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.as_secs()).unwrap_or(0); let session = format!("{:x}", t ^ (std::process::id() as u64) << 32).chars().rev().take(6).collect(); + gitnext_ops::oplog::set_actor(format!("mcp:{session}")); Ok(Server { ws, index, graph, sent: HashMap::new(), snapshot, session, profile }) } @@ -103,8 +104,12 @@ fn tools() -> Value { json!({ "items": { "type": "array", "items": { "type": "object", "properties": { "symbol": { "type": "string" }, "summary": { "type": "string" } }, "required": ["symbol", "summary"] } } }), &["items"]), tool("locate", "Paste a compiler error, panic, test failure or traceback: returns the repo symbols at those file:line locations (innermost function/method) and the code of the top one.", json!({ "text": { "type": "string" } }), &["text"]), - tool("tests_for", "Tests that exercise a symbol (via the call graph) and the exact command to run only those tests.", - json!({ "symbol": sym, "depth": { "type": "integer" } }), &["symbol"]), + tool("check", "After a change: builds the project and runs the tests of what changed, answers with a verdict (ok / what failed, where, the message). With `test`: the same as `why`.", + json!({ "test": { "type": "string", "description": "a failing test to explain instead of checking the change" } }), &[]), + tool("why", "A test fails: runs it and returns the failure in a few lines (what, where, the message) and the code the test reaches, most likely culprit first, with the code of the top ones. Use this first when told that a test fails.", + json!({ "test": { "type": "string", "description": "test name; `greater_than` finds `test_greater_than`" } }), &["test"]), + tool("tests_for", "Tests that exercise a symbol: the 10 most likely to fail if it breaks (direct calls and tests named after it first) with the exact command to run them, plus one command for the whole test files.", + json!({ "symbol": sym, "depth": { "type": "integer" }, "all": { "type": "boolean", "description": "name every test, not only the top 10" } }), &["symbol"]), tool("history", "Commits that changed one symbol (added / signature / body / docs), newest first — the 'why is it like this' view without reading git logs.", json!({ "symbol": sym, "limit": { "type": "integer" } }), &["symbol"]), tool("changelog", "Semantic changelog of a git range (e.g. main..HEAD): breaking API changes with external refs, added symbols by area, changed bodies, commits.", @@ -128,6 +133,12 @@ fn lite_tools() -> Value { { "name": "add_after", "description": "Add new code (e.g. a new function) right after an existing function or class.", "inputSchema": { "type": "object", "properties": { "symbol": str_("existing function or class"), "code": str_("the new code") }, "required": ["symbol", "code"] } }, + { "name": "rename", + "description": "Rename a function or class everywhere: definition, calls, imports, tests.", + "inputSchema": { "type": "object", "properties": { "symbol": str_("current name"), "new_name": str_("new name") }, "required": ["symbol", "new_name"] } }, + { "name": "check", + "description": "A test fails: call this first with test = its name — it runs the test and shows the failure and the code to fix. After your change: call it with no arguments — says ok or what failed.", + "inputSchema": { "type": "object", "properties": { "test": str_("the name of a failing test (optional)") } } }, ]) } @@ -150,6 +161,7 @@ impl Server { tests: a.get("tests").and_then(Value::as_bool).unwrap_or(false), all: a.get("all").and_then(Value::as_bool).unwrap_or(false), full_doc: a.get("full_doc").and_then(Value::as_bool).unwrap_or(false), + lite: matches!(self.profile, Profile::Lite), }; let sym = |k: &str| -> Result, String> { let q = s_arg(a, k).ok_or_else(|| format!("missing `{k}`"))?; @@ -280,9 +292,23 @@ impl Server { s } "locate" => gitnext_ops::locate::render_locate(g, &root, s_arg(a, "text").ok_or("missing `text`")?, true), + "check" if s_arg(a, "test").is_none_or(|t| t.trim().is_empty()) => { + let c = gitnext_ops::check::check(&root, g, std::time::Duration::from_secs(600)); + gitnext_ops::check::render(g, &c) + } + "why" | "check" => { + let name = s_arg(a, "test").ok_or("missing `test`")?; + let ids = gitnext_ops::why::find_tests(g, name); + if ids.is_empty() { + let near: Vec<&str> = gitnext_ops::why::similar_tests(g, name).into_iter().map(|i| g.syms[i].sym.name.as_str()).collect(); + return Err(format!("no test named `{name}`{}", if near.is_empty() { String::new() } else { format!("; close: {}", near.join(", ")) })); + } + gitnext_ops::why::render(g, &root, &gitnext_ops::why::why(&root, g, &ids, std::time::Duration::from_secs(600))) + } "tests_for" => { let d = a.get("depth").and_then(Value::as_u64).unwrap_or(4) as usize; - sym("symbol")?.iter().map(|&i| gitnext_ops::locate::render_tests_for(g, &root, i, d)).collect() + let all = a.get("all").and_then(Value::as_bool).unwrap_or(false); + sym("symbol")?.iter().map(|&i| gitnext_ops::locate::render_tests_for(g, &root, i, d, all)).collect() } "history" => { let repo = self.ws.repo().map_err(|e| e.to_string())?; @@ -318,12 +344,14 @@ impl Server { } "overview" => gitnext_ops::insight::overview(self.ws.repo.as_ref(), g, &root), "entrypoints" => gitnext_ops::insight::render_entrypoints(&gitnext_ops::insight::entrypoints(g, &root)), - "rename_symbol" => { - let i = find_one(g, s_arg(a, "symbol").ok_or("missing `symbol`")?)?; - let new = s_arg(a, "new_name").ok_or("missing `new_name`")?; + "rename_symbol" | "rename" => { + let i = find_one(g, any_str(a, &["symbol", "old", "name"]).ok_or("missing `symbol`")?)?; + let new = a.get("new_name").or_else(|| a.get("new")).and_then(Value::as_str).ok_or("missing `new_name`")?; let dry = a.get("dry_run").and_then(Value::as_bool).unwrap_or(false); + let _op = gitnext_ops::oplog::Group::start(&root, "rename", &format!("{} → {new}", g.syms[i].sym.qualified)); let mut r = edit::rename(&root, g, i, new, dry).map_err(|e| format!("{e:#}"))?; - if a.get("text").and_then(Value::as_bool).unwrap_or(false) { + // the short `rename` of the lite profile also follows the name into comments and strings + if name == "rename" || a.get("text").and_then(Value::as_bool).unwrap_or(false) { edit::rename_leftover_text(&root, &mut r).map_err(|e| format!("{e:#}"))?; } edit::render_rename(&r) @@ -372,7 +400,7 @@ impl Server { files.dedup(); let file_tok: usize = files.iter().filter_map(|f| std::fs::metadata(self.ws.root.join(f)).ok()).map(|m| (m.len() as usize).div_ceil(4)).sum(); let out_tokens = text.len().div_ceil(4); - let edit = matches!(tool, "replace_symbol" | "insert_after" | "delete_symbol" | "rename_symbol" | "replace" | "add_after"); + let edit = matches!(tool, "replace_symbol" | "insert_after" | "delete_symbol" | "rename_symbol" | "replace" | "add_after" | "rename"); // naive agent: read the involved files (and rewrite them for edits) let naive = match tool { "read" | "outline" | "show" | "map" | "callers" | "callees" | "impact" | "hierarchy" | "tests_for" | "history" | "look" => file_tok, @@ -390,6 +418,7 @@ impl Server { out_tokens, naive_tokens: naive, error: res.is_err(), + op: if edit && res.is_ok() { gitnext_ops::oplog::take_last() } else { None }, }; gitnext_ops::journal::append(&self.ws.root, &e); (out_tokens, naive) @@ -471,7 +500,7 @@ fn handle(server: &mut Server, msg: &Value) -> Option { "capabilities": { "tools": { "listChanged": false } }, "serverInfo": { "name": "gitnext", "version": env!("CARGO_PKG_VERSION") }, "instructions": match server.profile { - Profile::Lite => "Code tools: look(what) for any file, function, error or words; replace / add_after to change code. Don't read whole files.", + Profile::Lite => "Code tools: look(what) for any file, function, error or words; replace / add_after / rename to change code; check to run the tests (check(test) when a test fails). Don't read whole files.", Profile::Full => "Code navigation and editing for this repository. Start with look: one call gives a symbol's code, callers, callees, tests and impact (pass several targets at once). New here? overview. \ Edit with replace_symbol / insert_after / rename_symbol instead of rewriting files. \ Use impact / tests_for before changing signatures; locate turns errors into code. \ @@ -558,7 +587,9 @@ mod tests { let tools = list["result"]["tools"].as_array().unwrap(); assert_eq!(tools.len(), agents::LITE_TOOLS.len()); let size = serde_json::to_string(tools).unwrap().len(); - assert!(size < 1400, "lite tool list is {size} bytes"); + assert!(size < 2000, "lite tool list is {size} bytes"); + let names: Vec<&str> = tools.iter().map(|t| t["name"].as_str().unwrap()).collect(); + assert_eq!(names, agents::LITE_TOOLS); let call = |s: &mut Server, what: &str| -> String { let r = handle(s, &json!({"jsonrpc":"2.0","id":9,"method":"tools/call","params":{"name":"look","arguments":{"what":what}}})).unwrap(); r["result"]["content"][0]["text"].as_str().unwrap().to_string() @@ -572,5 +603,8 @@ mod tests { assert!(r["result"]["_meta"]["gitnext/naive_tokens"].as_u64().unwrap() > 0); let r = handle(&mut s, &json!({"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"overview","arguments":{}}})).unwrap(); assert_eq!(r["result"]["isError"], true); + // `check` with a test name is `why`: it looks for the test (and here finds none) instead of checking the change + let r = handle(&mut s, &json!({"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"check","arguments":{"test":"no_such_test_zzz"}}})).unwrap(); + assert!(r["result"]["content"][0]["text"].as_str().unwrap().contains("no test named `no_such_test_zzz`"), "{r}"); } } diff --git a/crates/gitnext-docs/Cargo.toml b/crates/gitnext-docs/Cargo.toml index 0789981..845c607 100644 --- a/crates/gitnext-docs/Cargo.toml +++ b/crates/gitnext-docs/Cargo.toml @@ -6,5 +6,5 @@ license.workspace = true [dependencies] anyhow = "1.0.104" -gitnext-index = { version = "0.2.0", path = "../gitnext-index" } -gitnext-parse = { version = "0.2.0", path = "../gitnext-parse" } +gitnext-index = { version = "0.3.0", path = "../gitnext-index" } +gitnext-parse = { version = "0.3.0", path = "../gitnext-parse" } diff --git a/crates/gitnext-index/Cargo.toml b/crates/gitnext-index/Cargo.toml index e32de3b..29b1d9e 100644 --- a/crates/gitnext-index/Cargo.toml +++ b/crates/gitnext-index/Cargo.toml @@ -6,7 +6,7 @@ license.workspace = true [dependencies] anyhow = "1.0.104" -gitnext-parse = { version = "0.2.0", path = "../gitnext-parse" } +gitnext-parse = { version = "0.3.0", path = "../gitnext-parse" } ignore = "0.4.34" rayon = "1.12.0" rusqlite = { version = "0.41.1", features = ["bundled"] } diff --git a/crates/gitnext-index/src/graph.rs b/crates/gitnext-index/src/graph.rs index de26c89..a79b4f2 100644 --- a/crates/gitnext-index/src/graph.rs +++ b/crates/gitnext-index/src/graph.rs @@ -23,6 +23,9 @@ pub struct Graph { /// target symbol → (referring symbol, edge kind, line); built lazily from all edges. rev: OnceLock<(RevIndex, Guesses)>, short: OnceLock>, + /// Python module → name it imports → where from: packages re-export through `__init__` + /// (`from .termui import style`), and callers write `click.style(...)`. + reexports: OnceLock>>>, /// Inferred purposes of directories (`dir:` notes). pub dir_notes: HashMap, /// Language-server answers: (file, line, col) → (target file, target line); "" = external. @@ -182,7 +185,7 @@ impl Graph { break; } } - Graph { files, syms, edges, by_name, by_qual, crate_roots, visible, dir_graph: OnceLock::new(), rev: OnceLock::new(), short: OnceLock::new(), dir_notes: HashMap::new(), links: HashMap::new() } + Graph { files, syms, edges, by_name, by_qual, crate_roots, visible, dir_graph: OnceLock::new(), rev: OnceLock::new(), short: OnceLock::new(), reexports: OnceLock::new(), dir_notes: HashMap::new(), links: HashMap::new() } } pub fn sym_ref(&self, i: usize) -> SymRef { @@ -257,7 +260,28 @@ impl Graph { &all[i] } + /// A name for symbol `i` that no other symbol has: its qualified name, and with `#2`, `#3`… + /// for the later ones of several that share it (`impl Display for T` and `impl Debug for T` + /// both define `T::fmt`). Used where one symbol has to be found again by name: the learned test map. + pub fn unique_name(&self, i: usize) -> String { + let q = &self.syms[i].sym.qualified; + let mut same: Vec = self.by_qual.get(q).map(|v| v.iter().copied().filter(|&k| self.syms[k].sym.kind == self.syms[i].sym.kind).collect()).unwrap_or_default(); + if same.len() < 2 { + return q.clone(); + } + same.sort_by_key(|&k| (self.syms[k].file.as_str(), self.syms[k].sym.start_line)); + match same.iter().position(|&k| k == i) { + Some(0) | None => q.clone(), + Some(n) => format!("{q}#{}", n + 1), + } + } + /// Find symbols by exact qualified name, `::`-suffix, or bare name. + /// Every symbol with this bare name, whatever it belongs to (`main` of each program). + pub fn named(&self, name: &str) -> Vec { + self.by_name.get(name).cloned().unwrap_or_default() + } + pub fn find(&self, q: &str) -> Vec { let q = q.trim(); // `name@123` / `name:L123` pins an overload / duplicate by its start line. @@ -389,7 +413,8 @@ impl Graph { .filter(|&i| { // tests/, examples/, benches/ are separate targets: only visible to themselves. let f = &self.syms[i].file; - !is_aux_target(f) || f == from_file || dir_of(f) == dir_of(from_file) + // … and their `mod util;` folders (tests/util/mod.rs is part of tests/x.rs) + !is_aux_target(f) || f == from_file || dir_of(f) == dir_of(from_file) || dir_of(f).strip_prefix(dir_of(from_file)).is_some_and(|r| r.starts_with('/')) }) .collect() } @@ -445,7 +470,12 @@ impl Graph { EdgeKind::Imports => { let mut out = Vec::new(); let from_root = e.from.split("::").next().unwrap_or(""); + let krate = crate_prefix(file, &e.from); for path in flatten_use(&e.to) { + let path = match (path.strip_prefix("crate::"), &krate) { + (Some(rest), Some(k)) => format!("{k}::{rest}"), + _ => path, + }; out.extend(self.resolve_import(&path, from_root, file)); } out.sort_unstable(); @@ -485,7 +515,7 @@ impl Graph { if f != file || e.kind != EdgeKind::Imports { continue; } - let root = e.from.split("::").next().unwrap_or(""); + let root = crate_prefix(file, &e.from).unwrap_or_else(|| e.from.split("::").next().unwrap_or("").to_string()); for p in flatten_use(&e.to) { out.insert(match p.strip_prefix("crate::") { Some(rest) => format!("{root}::{rest}"), @@ -524,10 +554,25 @@ impl Graph { } fn resolve_call_raw(&self, file: &str, e: &Edge) -> Vec { + // `getPool()::release`: a method of whatever `getPool` returns + if let Some((callee, method)) = e.to.rsplit_once("()::") { + let mut out: Vec = Vec::new(); + for ty in self.returned_types(file, e, callee) { + out.extend(self.resolve_call_raw(file, &Edge { to: format!("{ty}::{method}"), ..e.clone() })); + } + if !out.is_empty() { + out.sort_unstable(); + out.dedup(); + return out; + } + // result type unknown (not declared, generic, from a library): an unknown receiver + return self.resolve_call_raw(file, &Edge { to: format!(".{method}"), ..e.clone() }); + } let name = last_segment(&e.to); let Some(all) = self.by_name.get(name) else { return vec![] }; let cands: Vec = all.iter().copied().filter(|&i| self.syms[i].sym.kind.is_callable()).collect(); let cands = self.visible_only(&e.from, file, cands); + let cands_all = cands.clone(); let caller = self.source_of(file, e).map(|i| &self.syms[i]); let caller_owner = caller.and_then(|c| c.sym.parent.clone()).unwrap_or_default(); let qual = qualifier(&e.to); @@ -615,7 +660,12 @@ impl Graph { .collect(); if own.is_empty() { // inherited: walk base classes / implemented traits of the owner - self.inherited(&caller_owner, name, file) + let inh = self.inherited(&caller_owner, name, file); + if inh.is_empty() && file.ends_with(".rs") { + self.same_type_other_module(&caller_owner, &cands) + } else { + inh + } } else { own } @@ -634,7 +684,50 @@ impl Graph { }) .collect() }; - if picked.is_empty() && gitnext_parse::lang_for(std::path::Path::new(file)).is_some_and(gitnext_parse::Lang::is_generic) && !qual.is_empty() && qual != "Self" { + if picked.is_empty() && file.ends_with(".py") && !qual.is_empty() && qual != "Self" { + // `click.style(...)`: `click` is a package of the repo and its `__init__` imports `style` + let via = self.py_reexported(e.to.rsplit_once("::").map_or("", |x| x.0), name, 0); + if !via.is_empty() { + return via; + } + } + let rust = file.ends_with(".rs"); + if picked.is_empty() && (rust || gitnext_parse::lang_for(std::path::Path::new(file)).is_some_and(gitnext_parse::Lang::is_generic)) && !qual.is_empty() && qual != "Self" { + // `Type::method` with Type a repo type but the method defined above it (base class, + // embedded struct, interface default): inherited first, else any method of that name + let types: Vec = self.by_name.get(qual).map(|v| v.iter().copied().filter(|&i| self.syms[i].sym.kind.is_type()).collect()).unwrap_or_default(); + if !types.is_empty() { + for &t in &types { + let inh = self.inherited(&self.syms[t].sym.qualified, name, file); + if !inh.is_empty() { + return inh; + } + } + // Rust: a std trait method on a repo type (`v.to_string()`) is not a repo method + if rust && COMMON_METHODS.contains(&name) { + return vec![]; + } + return cands_all.into_iter().filter(|&i| self.syms[i].sym.kind == Kind::Method).collect(); + } + if rust { + return vec![]; + } + // `Owner::field::method` (Java `import static Owner.field`): the field's declared type + let segs: Vec<&str> = e.to.split("::").collect(); + if segs.len() >= 3 { + let owner = segs[segs.len() - 3]; + let fty = self.by_name.get(owner).into_iter().flatten().filter(|&&i| self.syms[i].sym.kind.is_type()).find_map(|&i| { + let p = self.syms[i].sym.params.iter().find(|p| p.name == qual)?; + let t = p.ty.trim_start_matches(['*', '&', ' ', ':']).split(['<', '[', '(', ' ', '{', ',', '?']).next()?; + Some(t.rsplit(['.', ':']).next()?.to_string()).filter(|t| !t.is_empty()) + }); + if let Some(t) = fty { + let m: Vec = cands_all.iter().copied().filter(|&i| self.syms[i].sym.kind == Kind::Method && self.syms[i].sym.parent.as_deref().is_some_and(|p| last_segment(p) == t)).collect(); + if !m.is_empty() { + return m; + } + } + } // `pkg::index::create` where the index file only re-exports `create`: in-repo path → by name let first = e.to.split("::").next().unwrap_or(""); if self.is_repo_root(first) { @@ -649,6 +742,140 @@ impl Graph { prefer_same_file(&self.syms, picked, file) } + /// What a Python module hands on under `name`: the function or class its own imports bring in + /// (followed through a chain of re-exporting modules). + fn py_reexported(&self, module: &str, name: &str, depth: usize) -> Vec { + let table = self.reexports.get_or_init(|| { + let mut m: HashMap>> = HashMap::new(); + for (file, e) in &self.edges { + if e.kind != EdgeKind::Imports || !file.ends_with(".py") { + continue; + } + for path in flatten_use(&e.to) { + m.entry(e.from.clone()).or_default().entry(last_segment(&path).to_string()).or_default().push(path); + } + } + m + }); + let is_module = |i: &usize| self.syms[*i].sym.kind == Kind::Module && self.syms[*i].file.ends_with(".py"); + let mut modules: Vec = self.by_qual.get(module).into_iter().flatten().copied().filter(|i| is_module(i)).collect(); + if modules.is_empty() { + modules = self.by_name.get(last_segment(module)).into_iter().flatten().copied().filter(|i| is_module(i)).collect(); + } + let mut out = Vec::new(); + for m in modules { + for path in table.get(&self.syms[m].sym.qualified).and_then(|t| t.get(name)).into_iter().flatten() { + let direct: Vec = self.by_qual.get(path).into_iter().flatten().copied().filter(|&i| self.syms[i].sym.kind != Kind::Module).collect(); + if !direct.is_empty() { + out.extend(direct); + } else if depth < 3 { + if let Some((inner, _)) = path.rsplit_once("::") { + out.extend(self.py_reexported(inner, name, depth + 1)); + } + } + } + } + out.sort_unstable(); + out.dedup(); + out + } + + /// Rust `self.as_str()` in `impl Display for BuildMetadata` (display.rs): the owner is + /// `semver::display::BuildMetadata`, the method sits in the `impl` next to the struct, + /// `semver::BuildMetadata`. Methods of the same type name in the same crate — only when the + /// crate defines one type of that name; with two (`map::Slice`, `set::Slice`) it stays unknown. + fn same_type_other_module(&self, owner: &str, cands: &[usize]) -> Vec { + let ty = last_segment(owner); + let krate = owner.split("::").next().unwrap_or(""); + let in_crate = |q: &str| q.split("::").next() == Some(krate); + let defs: HashSet<&str> = self + .by_name + .get(ty) + .into_iter() + .flatten() + .map(|&i| &self.syms[i].sym) + .filter(|s| s.kind.is_type() && in_crate(&s.qualified)) + .map(|s| s.qualified.as_str()) + .collect(); + if defs.len() != 1 { + return vec![]; + } + cands + .iter() + .copied() + .filter(|&i| { + let s = &self.syms[i].sym; + s.kind == Kind::Method && s.parent.as_deref().is_some_and(|p| last_segment(p) == ty && in_crate(p)) + }) + .collect() + } + + /// `f()::m` where `f` surely returns something the repo does not define: `f` is not in the repo + /// (`r.Context()`), or every candidate declares a result that is no repo type + /// (`PersistentFlags() *flag.FlagSet`). Not when the candidates disagree or declare nothing + /// (`el.tag()` with several `tag`s): then `m` may well be the repo's. + fn result_from_outside(&self, file: &str, e: &Edge, callee: &str, known_only: bool) -> bool { + // Go's `make(T)` / `new(T)` return their argument's type, which may be the repo's + if matches!(last_segment(callee), "make" | "new") { + return false; + } + let targets = drop_decls(&self.syms, self.resolve_call_raw(file, &Edge { to: callee.to_string(), ..e.clone() })); + if targets.is_empty() && known_only { + // not a repo function: known only for `pkg.Func(…)` in Go, where a package function + // that returns the caller's own type is rare + return file.ends_with(".go") && !callee.contains("()::") && !callee.starts_with('.') && !matches!(qualifier(callee), "" | "Self"); + } + targets.iter().all(|&t| { + let s = &self.syms[t].sym; + !s.kind.is_type() + && s.returns.as_deref().and_then(result_type_name).is_some_and(|name| { + // `T`, `K2`: a type parameter stands for whatever the caller passes + let param = name.len() <= 2 && name.starts_with(|c: char| c.is_ascii_uppercase()); + !param && !self.by_name.get(name).is_some_and(|v| v.iter().any(|&i| self.syms[i].sym.kind.is_type())) + }) + }) + } + + /// A call written as `f().m()` whose receiver is hardly a repo type: whatever repo method is + /// called `m`, this call is not known to be it — `callers` says "maybe". + pub fn foreign_receiver(&self, file: &str, e: &Edge) -> bool { + e.to.rsplit_once("()::").is_some_and(|(c, _)| self.result_from_outside(file, e, c, false)) + } + + /// The same for `rename`, which breaks the build when it is wrong either way, so only what is + /// known: `f` is a repo function that declares a library result, or (Go) a function of an + /// imported package (`template.New(…).Execute`). A library call that hands a repo object on + /// (`assertInstanceOf(TextNode.class, n).getWholeText()`, `nodes.get(0).text()`) is not that. + pub fn foreign_receiver_for_rename(&self, file: &str, e: &Edge) -> bool { + e.to.rsplit_once("()::").is_some_and(|(c, _)| self.result_from_outside(file, e, c, true)) + } + + /// Names of the repo types a call returns, from the declared result type of what it + /// resolves to: `Self::pool` → `SoftPool` for `SoftPool pool()`. Empty when the + /// callee is ambiguous, declares no result, or returns a built-in / library / generic type. + fn returned_types(&self, file: &str, e: &Edge, callee: &str) -> Vec { + let targets = drop_decls(&self.syms, self.resolve_call_raw(file, &Edge { to: callee.to_string(), ..e.clone() })); + let mut out: Vec = Vec::new(); + for &t in &targets { + let s = &self.syms[t].sym; + // `Circle(…)`, `new Circle(…)`: the call made an instance of the type itself + let name = if s.kind.is_type() { Some(s.name.as_str()) } else { s.returns.as_deref().and_then(result_type_name) }; + let Some(name) = name else { return vec![] }; + if !self.by_name.get(name).is_some_and(|v| v.iter().any(|&i| self.syms[i].sym.kind.is_type())) { + return vec![]; + } + if !out.iter().any(|n| n == name) { + out.push(name.to_string()); + } + } + // overloads and implementations of one interface method agree on the type; if the + // candidates return different things, the callee itself was a guess + if out.len() > 1 { + return vec![]; + } + out + } + /// Whether the repo defines a method with this name (for LSP site selection). pub fn has_method_named(&self, name: &str) -> bool { self.by_name.get(name).is_some_and(|v| v.iter().any(|&i| self.syms[i].sym.kind == Kind::Method)) @@ -736,11 +963,24 @@ impl Graph { } let Some(src) = self.source_of(file, e) else { continue }; let targets = self.resolve(file, e); - let distinct: HashSet<&str> = targets.iter().map(|&t| self.syms[t].sym.qualified.as_str()).collect(); + // `Type::m` with the type named: same-named types in other modules (cfg variants, + // test doubles) all count as sure; only an unknown receiver (`.m`) is a guess + // (`f()::m` — the receiver is what `f` returns — may have ended as such a guess) + let typed = !e.to.starts_with('.') && e.to.contains("::") && !e.to.contains("()::"); + let distinct: HashSet<&str> = targets + .iter() + .map(|&t| { + let q = self.syms[t].sym.qualified.as_str(); + if typed { tail2(q) } else { q } + }) + .collect(); + // `r.Context()::Value`, `c.PersistentFlags()::HasFlags`: the receiver is a library + // type, so the one repo method of that name is only a guess + let foreign = self.foreign_receiver(file, e); for t in targets { if t != src { m.entry(t).or_default().push((src, e.kind, e.line)); - if distinct.len() > 1 { + if distinct.len() > 1 || foreign { guess.insert((src, t)); } else { sure.insert((src, t)); @@ -842,9 +1082,14 @@ impl Graph { if e.kind != EdgeKind::Calls || e.from != s.sym.qualified || *file != s.file { continue; } + // `f()::m` that stayed unresolved reads as a call on an unknown receiver + let written = match e.to.rsplit_once("()::") { + Some((_, m)) => format!(".{m}"), + None => e.to.clone(), + }; match self.resolve(file, e)[..] { [] => { - external.insert(e.to.clone()); + external.insert(written); } [i] => { if seen.insert(i) { @@ -852,8 +1097,8 @@ impl Graph { } } ref many => { - if !out.ambiguous.iter().any(|(n, _)| *n == e.to) { - out.ambiguous.push((e.to.clone(), many.to_vec())); + if !out.ambiguous.iter().any(|(n, _)| *n == written) { + out.ambiguous.push((written, many.to_vec())); } } } @@ -1033,6 +1278,29 @@ fn param_key(ps: &[gitnext_parse::Param]) -> String { .join(",") } +/// The named type of a declared result: `*Command` → `Command`, `(*Store, error)` → `Store`, +/// `[]*Command` → `Command` (what a loop over it yields), `Promise` → `Store`, +/// `pkg.Type` → `Type`. Type parameters and containers of other things give their own name +/// (`List` → `List`), which is then simply not a repo type. +fn result_type_name(ret: &str) -> Option<&str> { + let mut t = ret.trim().trim_start_matches('(').trim(); + t = t.split(',').next().unwrap_or(t).trim(); + loop { + let before = t; + t = t.trim_start_matches(['*', '&', ' ']); + t = t.strip_prefix("[]").unwrap_or(t); + for wrap in ["Promise<", "Awaited<", "Optional<", "readonly "] { + t = t.strip_prefix(wrap).unwrap_or(t); + } + if t == before { + break; + } + } + let t = t.split(['<', '[', ' ', '|', '?', ')', '>', '{']).next().unwrap_or(""); + let t = t.rsplit(['.', ':']).next().unwrap_or(t); + t.chars().next().is_some_and(|c| c.is_alphabetic() || c == '_').then_some(t) +} + /// If both a prototype and its definition matched, keep only the definition. fn drop_decls(syms: &[SymbolRow], c: Vec) -> Vec { if c.len() < 2 { @@ -1044,6 +1312,30 @@ fn drop_decls(syms: &[SymbolRow], c: Vec) -> Vec { /// What another file can import: exported, non-test definitions (a test file's /// helpers are its own). Keeps everything when nothing qualifies. +/// `crate::` inside a Cargo test / bench / example target (`tests/foo.rs` is its own crate +/// root, its `mod util;` is `tests/util/mod.rs`): the module of that directory, `semver::tests`. +fn crate_prefix(file: &str, from: &str) -> Option { + let (dir, name) = file.rsplit_once('/')?; + let d = dir.rsplit('/').next()?; + if !matches!(d, "tests" | "benches" | "examples") || !name.ends_with(".rs") { + return None; + } + let stem = name.strip_suffix(".rs")?; + let segs: Vec<&str> = from.split("::").collect(); + let i = segs.iter().position(|s| *s == stem)?; + (i > 0).then(|| segs[..i].join("::")) +} + +/// `a::b::Type::m` → `Type::m`. +fn tail2(q: &str) -> &str { + let mut it = q.rmatch_indices("::"); + it.next(); + match it.next() { + Some((i, _)) => &q[i + 2..], + None => q, + } +} + fn importable(syms: &[SymbolRow], c: Vec, file: &str) -> Vec { let ok: Vec = c.iter().copied().filter(|&i| syms[i].file == file || (syms[i].sym.visibility.is_some() && !syms[i].sym.test)).collect(); if ok.is_empty() { c } else { ok } diff --git a/crates/gitnext-index/src/lib.rs b/crates/gitnext-index/src/lib.rs index 8f31089..00dd71e 100644 --- a/crates/gitnext-index/src/lib.rs +++ b/crates/gitnext-index/src/lib.rs @@ -5,11 +5,13 @@ mod graph; pub mod libs; +mod testmap; pub mod notes; pub mod semdiff; pub use graph::{flatten_use, Callees, DirDeps, Graph, Hierarchy, ImpactNode, SymRef}; pub use libs::{Dep, LibUse}; +pub use testmap::{read_coverage, Covering, TestMap}; use anyhow::{Context, Result}; use gitnext_parse::{analyze_in, find_crate, file_type_label, hash_hex, lang_for, Edge, EdgeKind, FileAnalysis, Kind, Param, Symbol}; @@ -109,6 +111,23 @@ pub struct SymbolRow { pub sym: Symbol, } +/// How long one opener waits for another that holds the database. +const BUSY_WAIT: std::time::Duration = std::time::Duration::from_secs(30); + +/// Run `f` again while the database is locked by another connection (up to [`BUSY_WAIT`]): +/// for the few operations where SQLite reports "busy" at once instead of waiting. +fn wait_while_busy(mut f: impl FnMut() -> rusqlite::Result) -> rusqlite::Result { + let start = std::time::Instant::now(); + loop { + match f() { + Err(rusqlite::Error::SqliteFailure(e, _)) if matches!(e.code, rusqlite::ErrorCode::DatabaseBusy | rusqlite::ErrorCode::DatabaseLocked) && start.elapsed() < BUSY_WAIT => { + std::thread::sleep(std::time::Duration::from_millis(20)); + } + r => return r, + } + } +} + impl Index { /// Open (or create) the index for a repository root. pub fn open(root: &Path) -> Result { @@ -117,10 +136,12 @@ impl Index { ensure_gitignore(&dir)?; let conn = Connection::open(dir.join("index.db"))?; // several processes may open one repo at once (agent server, TUI, CLI): wait, don't fail - conn.busy_timeout(std::time::Duration::from_secs(30))?; - conn.execute_batch("PRAGMA journal_mode=WAL; PRAGMA synchronous=NORMAL; PRAGMA foreign_keys=ON;")?; + conn.busy_timeout(BUSY_WAIT)?; + // switching a new database to WAL takes an exclusive lock that SQLite does not wait + // for (the busy timeout is not consulted): two openers of a fresh repo collide here + wait_while_busy(|| conn.execute_batch("PRAGMA journal_mode=WAL; PRAGMA synchronous=NORMAL; PRAGMA foreign_keys=ON;"))?; let mut idx = Index { conn, root: root.to_path_buf(), skip: skipped_dirs(root) }; - idx.migrate()?; + wait_while_busy(|| idx.migrate())?; Ok(idx) } @@ -128,7 +149,7 @@ impl Index { &self.root } - fn migrate(&mut self) -> Result<()> { + fn migrate(&mut self) -> rusqlite::Result<()> { self.conn.execute_batch( "CREATE TABLE IF NOT EXISTS meta (key TEXT PRIMARY KEY, value TEXT); CREATE TABLE IF NOT EXISTS lsp_links ( @@ -136,7 +157,7 @@ impl Index { PRIMARY KEY (file, line, col));", )?; let want = format!("{SCHEMA_VERSION}.{}", gitnext_parse::PARSER_VERSION); - let current = |c: &Connection| -> Result> { Ok(c.query_row("SELECT value FROM meta WHERE key='schema'", [], |r| r.get(0)).optional()?) }; + let current = |c: &Connection| -> rusqlite::Result> { c.query_row("SELECT value FROM meta WHERE key='schema'", [], |r| r.get(0)).optional() }; if current(&self.conn)?.as_deref() == Some(want.as_str()) { return Ok(()); } @@ -253,7 +274,7 @@ impl Index { let removed: Vec<&String> = known.keys().filter(|k| !found_set.contains(k.as_str())).collect(); // 3. Write in one transaction. - let tx = self.conn.transaction()?; + let tx = self.conn.transaction_with_behavior(rusqlite::TransactionBehavior::Immediate)?; for r in &removed { tx.execute("DELETE FROM files WHERE path=?1", [r])?; } @@ -362,7 +383,7 @@ impl Index { /// Cache language-server answers: call site → definition (`""` target = outside the repo). pub fn store_links(&mut self, links: &[(String, u32, u32, String, u32)]) -> Result<()> { - let tx = self.conn.transaction()?; + let tx = self.conn.transaction_with_behavior(rusqlite::TransactionBehavior::Immediate)?; { let mut st = tx.prepare( "INSERT OR REPLACE INTO lsp_links(file, line, col, file_hash, target_file, target_line) @@ -419,7 +440,7 @@ fn ensure_gitignore(dir: &Path) -> Result<()> { let gi = dir.join(".gitignore"); let mut text = std::fs::read_to_string(&gi).unwrap_or_else(|_| "# local state — map/ and notes.tsv are meant to be committed\n".into()); let mut changed = !gi.exists(); - for line in ["index.db", "index.db-*", "journal.jsonl", "hook-seen.tsv", "tui-welcomed", ".fuse_hidden*"] { + for line in ["index.db", "index.db-*", "tests.db", "tests.db-*", "coverage.db*", "journal.jsonl", "ops.jsonl", "hook-seen.tsv", "tui-welcomed", ".fuse_hidden*"] { if !text.lines().any(|l| l.trim() == line) { text.push_str(line); text.push('\n'); diff --git a/crates/gitnext-index/src/libs.rs b/crates/gitnext-index/src/libs.rs index 069a5e0..08c2f01 100644 --- a/crates/gitnext-index/src/libs.rs +++ b/crates/gitnext-index/src/libs.rs @@ -58,7 +58,7 @@ impl Graph { let mut by: BTreeMap, usize)> = BTreeMap::new(); let mut resolved_cache: HashMap<(&str, &str), bool> = HashMap::new(); for (file, e) in &self.edges { - if e.kind != EdgeKind::Calls || e.to.starts_with('.') { + if e.kind != EdgeKind::Calls || e.to.starts_with('.') || e.to.contains("()::") { continue; } let imports = imports_by_file.entry(file.as_str()).or_insert_with(|| self.external_imports(file)); diff --git a/crates/gitnext-index/src/testmap.rs b/crates/gitnext-index/src/testmap.rs new file mode 100644 index 0000000..2014ea7 --- /dev/null +++ b/crates/gitnext-index/src/testmap.rs @@ -0,0 +1,165 @@ +//! Which tests really run which functions — learned from one test run with coverage +//! (`gitnext learn-tests`) and kept in `.gitnext/tests.db`. +//! +//! The call graph cannot see calls made through a CLI runner, a decorator, a template or +//! reflection; on click it finds 19% of the tests that fail when a function breaks. A +//! coverage run sees all of them. The map is separate from the index: the index is a cache +//! that is rebuilt freely, the map costs a test run. + +use std::collections::HashMap; +use std::path::Path; + +use anyhow::Result; +use rusqlite::{params, Connection}; + +/// A test that ran a function during the learning run. +#[derive(Debug, Clone)] +pub struct Covering { + /// repo-relative file of the test + pub file: String, + /// `test_name` or `TestClass::test_name` (parameters dropped) + pub name: String, + /// how many functions this test ran: a narrow test is the likeliest to notice a break + pub breadth: u32, + /// the function's code hash when the map was learned (differs now → the map is stale for it) + pub body_hash: String, +} + +pub struct TestMap { + conn: Connection, +} + +impl TestMap { + fn path(root: &Path) -> std::path::PathBuf { + root.join(".gitnext").join("tests.db") + } + + /// The map of this repository, if one was learned. + pub fn open_existing(root: &Path) -> Option { + let p = Self::path(root); + p.exists().then(|| Connection::open(p).ok()).flatten().map(|conn| TestMap { conn }) + } + + /// Replace the map: `pairs` = (function's qualified name, its code hash, test file, test name). + pub fn write(root: &Path, source: &str, pairs: &[(String, String, String, String)]) -> Result { + std::fs::create_dir_all(root.join(".gitnext"))?; + let mut conn = Connection::open(Self::path(root))?; + conn.busy_timeout(std::time::Duration::from_secs(30))?; + let tx = conn.transaction_with_behavior(rusqlite::TransactionBehavior::Immediate)?; + tx.execute_batch( + "DROP TABLE IF EXISTS covers; DROP TABLE IF EXISTS tests; DROP TABLE IF EXISTS meta; + CREATE TABLE meta(key TEXT PRIMARY KEY, value TEXT NOT NULL); + CREATE TABLE tests(id INTEGER PRIMARY KEY, file TEXT NOT NULL, name TEXT NOT NULL, breadth INTEGER NOT NULL); + CREATE TABLE covers(symbol TEXT NOT NULL, body_hash TEXT NOT NULL, test INTEGER NOT NULL, PRIMARY KEY(symbol, test)) WITHOUT ROWID;", + )?; + // breadth: how many different functions a test ran (a pair given twice counts once) + let mut ids: HashMap<(&str, &str), (i64, u32)> = HashMap::new(); + let mut seen: std::collections::HashSet<(&str, &str, &str)> = std::collections::HashSet::new(); + for (symbol, _, file, name) in pairs { + let n = ids.len() as i64; + let e = ids.entry((file, name)).or_insert((n, 0)); + if seen.insert((symbol, file, name)) { + e.1 += 1; + } + } + { + let mut t = tx.prepare("INSERT INTO tests(id, file, name, breadth) VALUES (?1, ?2, ?3, ?4)")?; + for ((file, name), (id, breadth)) in &ids { + t.execute(params![id, file, name, breadth])?; + } + let mut c = tx.prepare("INSERT OR IGNORE INTO covers(symbol, body_hash, test) VALUES (?1, ?2, ?3)")?; + for (symbol, hash, file, name) in pairs { + c.execute(params![symbol, hash, ids[&(file.as_str(), name.as_str())].0])?; + } + let now = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.as_secs()).unwrap_or(0); + tx.execute("INSERT INTO meta(key, value) VALUES ('learned_at', ?1), ('source', ?2)", params![now.to_string(), source])?; + } + tx.commit()?; + Ok(TestMap { conn }) + } + + /// The tests that ran this function, narrowest first. + pub fn tests_of(&self, qualified: &str) -> Vec { + let run = || -> rusqlite::Result> { + let mut st = self.conn.prepare("SELECT t.file, t.name, t.breadth, c.body_hash FROM covers c JOIN tests t ON t.id = c.test WHERE c.symbol = ?1 ORDER BY t.breadth, t.file, t.name")?; + let rows = st.query_map([qualified], |r| Ok(Covering { file: r.get(0)?, name: r.get(1)?, breadth: r.get(2)?, body_hash: r.get(3)? }))?; + rows.collect() + }; + run().unwrap_or_default() + } + + /// A fact about the learning run (`commit`: what was checked out then; `source`, `learned_at`). + pub fn meta(&self, key: &str) -> Option { + self.conn.query_row("SELECT value FROM meta WHERE key = ?1", [key], |r| r.get(0)).ok() + } + + pub fn set_meta(&self, key: &str, value: &str) -> Result<()> { + self.conn.execute("INSERT OR REPLACE INTO meta(key, value) VALUES (?1, ?2)", params![key, value])?; + Ok(()) + } + + /// What a test ran when the map was learned: (function, its code hash then, how many tests ran it). + /// `name` is `test_b` or `TestA::test_b`; a bare name matches the test of any class in the file. + pub fn ran_by(&self, file: &str, name: &str) -> Vec<(String, String, u32)> { + let run = || -> rusqlite::Result> { + let mut st = self.conn.prepare( + "SELECT c.symbol, c.body_hash, (SELECT count(*) FROM covers x WHERE x.symbol = c.symbol) + FROM covers c JOIN tests t ON t.id = c.test + WHERE t.file = ?1 AND (t.name = ?2 OR substr(t.name, -length(?3)) = ?3) GROUP BY c.symbol ORDER BY c.symbol", + )?; + let rows = st.query_map(params![file, name, format!("::{name}")], |r| Ok((r.get(0)?, r.get(1)?, r.get(2)?)))?; + rows.collect() + }; + run().unwrap_or_default() + } + + /// (functions with at least one test, tests, pairs) + pub fn size(&self) -> (usize, usize, usize) { + let n = |sql: &str| self.conn.query_row(sql, [], |r| r.get::<_, i64>(0)).unwrap_or(0) as usize; + (n("SELECT count(DISTINCT symbol) FROM covers"), n("SELECT count(*) FROM tests"), n("SELECT count(*) FROM covers")) + } +} + +/// Lines each test ran, read from a coverage.py data file (`.coverage` is SQLite): +/// (source file as recorded, context — pytest-cov writes `tests/test_x.py::test_a[p]|run` —, lines). +/// Code run outside any test (imports) has an empty context and is left out. A project that +/// measures branches (`branch = true`) has arcs instead of lines: both ends of an arc ran. +pub fn read_coverage(data: &Path) -> Result)>> { + let conn = Connection::open_with_flags(data, rusqlite::OpenFlags::SQLITE_OPEN_READ_ONLY)?; + let mut out = Vec::new(); + { + let mut st = conn.prepare("SELECT f.path, c.context, b.numbits FROM line_bits b JOIN file f ON f.id = b.file_id JOIN context c ON c.id = b.context_id WHERE c.context != ''")?; + let rows = st.query_map([], |r| Ok((r.get::<_, String>(0)?, r.get::<_, String>(1)?, r.get::<_, Vec>(2)?)))?; + for row in rows { + let (file, context, bits) = row?; + // coverage.py "numbits": bit i of byte b set = line b * 8 + i ran + let lines: Vec = bits.iter().enumerate().flat_map(|(b, byte)| (0..8u32).filter(move |i| byte & (1 << i) != 0).map(move |i| b as u32 * 8 + i)).collect(); + out.push((file, context, lines)); + } + } + let mut arcs: HashMap<(i64, i64), std::collections::BTreeSet> = HashMap::new(); + { + let mut st = conn.prepare("SELECT a.file_id, a.context_id, a.fromno, a.tono FROM arc a JOIN context c ON c.id = a.context_id WHERE c.context != ''")?; + let rows = st.query_map([], |r| Ok((r.get::<_, i64>(0)?, r.get::<_, i64>(1)?, r.get::<_, i64>(2)?, r.get::<_, i64>(3)?)))?; + for row in rows { + let (file, context, from, to) = row?; + let set = arcs.entry((file, context)).or_default(); + // a negative end is "entered / left the code object", not a line + set.extend([from, to].into_iter().filter(|l| *l > 0).map(|l| l as u32)); + } + } + if !arcs.is_empty() { + let names = |table: &str, col: &str| -> Result> { + let mut st = conn.prepare(&format!("SELECT id, {col} FROM {table}"))?; + let rows = st.query_map([], |r| Ok((r.get::<_, i64>(0)?, r.get::<_, String>(1)?)))?; + Ok(rows.collect::>()?) + }; + let (files, contexts) = (names("file", "path")?, names("context", "context")?); + for ((f, c), lines) in arcs { + if let (Some(file), Some(context)) = (files.get(&f), contexts.get(&c)) { + out.push((file.clone(), context.clone(), lines.into_iter().collect())); + } + } + } + Ok(out) +} diff --git a/crates/gitnext-index/tests/concurrent.rs b/crates/gitnext-index/tests/concurrent.rs new file mode 100644 index 0000000..80e1590 --- /dev/null +++ b/crates/gitnext-index/tests/concurrent.rs @@ -0,0 +1,34 @@ +//! Several processes / threads open the same fresh repository at once (two tests of one +//! binary, an agent's MCP server next to the CLI): each must wait for the others, not fail +//! with "database is locked". + +use gitnext_index::Index; + +#[test] +fn many_openers_of_a_fresh_repo() { + for round in 0..12 { + let dir = std::env::temp_dir().join(format!("gitnext-concurrent-{}-{round}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(dir.join("src")).unwrap(); + for i in 0..20 { + std::fs::write(dir.join(format!("src/m{i}.py")), format!("def f{i}():\n return g{i}()\n\ndef g{i}():\n pass\n")).unwrap(); + } + let start = std::sync::Arc::new(std::sync::Barrier::new(8)); + let handles: Vec<_> = (0..8) + .map(|_| { + let (dir, start) = (dir.clone(), start.clone()); + std::thread::spawn(move || { + start.wait(); + let mut idx = Index::open(&dir).map_err(|e| format!("open: {e:#}"))?; + idx.refresh().map_err(|e| format!("refresh: {e:#}"))?; + let g = idx.graph().map_err(|e| format!("graph: {e:#}"))?; + Ok::(g.find("f7").len()) + }) + }) + .collect(); + for h in handles { + assert_eq!(h.join().unwrap(), Ok(1), "round {round}"); + } + let _ = std::fs::remove_dir_all(&dir); + } +} diff --git a/crates/gitnext-index/tests/library_results.rs b/crates/gitnext-index/tests/library_results.rs new file mode 100644 index 0000000..b25f132 --- /dev/null +++ b/crates/gitnext-index/tests/library_results.rs @@ -0,0 +1,104 @@ +//! `f().m()` where `f` returns a library type: the one repo method named `m` is only a guess +//! (chi `r.Context().Value(…)` → `endpoints.Value`, cobra `c.PersistentFlags().HasFlags()` → +//! `Command.HasFlags`). A result of a repo type, or one the graph cannot tell, keeps the call sure. + +use gitnext_index::{Graph, Index}; + +fn graph(name: &str, files: &[(&str, &str)]) -> Graph { + let dir = std::env::temp_dir().join(format!("gitnext-libres-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + for (path, code) in files { + let p = dir.join(path); + std::fs::create_dir_all(p.parent().unwrap()).unwrap(); + std::fs::write(p, code).unwrap(); + } + let mut idx = Index::open(&dir).unwrap(); + idx.refresh().unwrap(); + let g = idx.graph().unwrap(); + let _ = std::fs::remove_dir_all(&dir); + g +} + +/// (sure callers, guessed callers) of `target`, by name. +fn callers(g: &Graph, target: &str) -> (Vec, Vec) { + let found = g.find(target); + assert_eq!(found.len(), 1, "{target}: {found:?}"); + let (mut sure, mut guess) = (Vec::new(), Vec::new()); + for (c, _) in g.callers(found[0]) { + let name = g.syms[c].sym.name.clone(); + if g.is_guess(c, found[0]) { guess.push(name) } else { sure.push(name) } + } + sure.sort(); + sure.dedup(); + guess.sort(); + guess.dedup(); + (sure, guess) +} + +const GO: &str = r#"package app + +import ( + "net/http" + + "github.com/spf13/pflag" +) + +type endpoints struct{} + +func (e endpoints) Value(k string) string { return k } + +type Options struct{} + +func (o *Options) Changed() bool { return true } + +type Command struct{ opts *Options } + +func (c *Command) Opts() *Options { return c.opts } +func (c *Command) PFlags() *pflag.FlagSet { return nil } + +func fromLibrary(r *http.Request) string { return r.Context().Value("k").(string) } +func fromRepoMethod(c *Command) bool { return c.PFlags().Changed() } +func fromRepoType(c *Command) bool { return c.Opts().Changed() } +func direct(e endpoints) string { return e.Value("k") } +"#; + +#[test] +fn library_result_is_a_guess() { + let g = graph("go-lib", &[("app/app.go", GO)]); + // `r.Context()`: not in the repo + assert_eq!(callers(&g, "endpoints::Value"), (vec!["direct".to_string()], vec!["fromLibrary".to_string()])); + // `c.PFlags()` is the repo's, but declares `*pflag.FlagSet`; `c.Opts()` returns the repo's `*Options` + assert_eq!(callers(&g, "Options::Changed"), (vec!["fromRepoType".to_string()], vec!["fromRepoMethod".to_string()])); +} + +#[test] +fn unknown_result_of_a_repo_function_stays_sure() { + // jsoup `el.tag().isFormSubmittable()`: several `tag`s in the repo, the graph cannot tell + // which one returns what — that is no evidence of a library type, the call stays sure + let g = graph( + "go-amb", + &[( + "app/app.go", + r#"package app + +type Tag struct{} + +func (t *Tag) Submittable() bool { return true } + +type Element struct{ t *Tag } + +func (e *Element) Tag() *Tag { return e.t } + +type Token struct{} + +func (k *Token) Tag() string { return "" } + +func formData(e *Element) bool { return e.Tag().Submittable() } +func made() bool { p := new(Tag); return p.Submittable() } +"#, + )], + ); + let (sure, _) = callers(&g, "Tag::Submittable"); + assert!(sure.contains(&"formData".to_string()), "{sure:?}"); + assert!(sure.contains(&"made".to_string()), "{sure:?}"); +} diff --git a/crates/gitnext-index/tests/returns.rs b/crates/gitnext-index/tests/returns.rs new file mode 100644 index 0000000..70bf436 --- /dev/null +++ b/crates/gitnext-index/tests/returns.rs @@ -0,0 +1,153 @@ +//! A receiver whose type is only known as "what that function returns" (`x := getPool()`, +//! `getPool().release()`): the declared result type picks the right `release` among several. + +use gitnext_index::{Graph, Index}; + +fn graph(name: &str, files: &[(&str, &str)]) -> Graph { + let dir = std::env::temp_dir().join(format!("gitnext-returns-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + for (path, code) in files { + let p = dir.join(path); + std::fs::create_dir_all(p.parent().unwrap()).unwrap(); + std::fs::write(p, code).unwrap(); + } + let mut idx = Index::open(&dir).unwrap(); + idx.refresh().unwrap(); + let g = idx.graph().unwrap(); + let _ = std::fs::remove_dir_all(&dir); + g +} + +/// Names of the functions that surely call `target` (guesses fail the test). +fn callers(g: &Graph, target: &str) -> Vec { + let found = g.find(target); + assert_eq!(found.len(), 1, "{target}: {found:?}"); + let mut v: Vec = g + .callers(found[0]) + .into_iter() + .map(|(c, _)| { + assert!(!g.is_guess(c, found[0]), "{} → {target} is only a guess", g.syms[c].sym.name); + g.syms[c].sym.name.clone() + }) + .collect(); + v.sort(); + v +} + +#[test] +fn go_result_types() { + let g = graph( + "go", + &[( + "pool/pool.go", + r#"package pool + +type Pool struct{} + +func (p *Pool) Release() {} +func (p *Pool) Child() *Conn { return &Conn{} } + +type Conn struct{} + +func (c *Conn) Release() {} + +func Get() *Pool { return &Pool{} } +func Open() (*Conn, error) { return &Conn{}, nil } +func All() []*Pool { return nil } + +func useVar() { p := Get(); p.Release() } +func useTuple() { c, err := Open(); _ = err; c.Release() } +func useChain() { Get().Child().Release() } +func useRange() { + for _, p := range All() { + p.Release() + } +} +func useCopy() { p := Get(); q := p; q.Release() } +"#, + )], + ); + assert_eq!(callers(&g, "Pool::Release"), ["useCopy", "useRange", "useVar"]); + assert_eq!(callers(&g, "Conn::Release"), ["useChain", "useTuple"]); +} + +#[test] +fn java_result_types() { + let g = graph( + "java", + &[( + "src/app/Repo.java", + r#"package app; + +class Pool { + void release() {} + Conn child() { return new Conn(); } +} + +class Conn { + void release() {} +} + +class Repo { + Pool pool() { return new Pool(); } + static Conn open() { return new Conn(); } + void viaCall() { pool().release(); } + void viaVar() { var c = Repo.open(); c.release(); } + void viaChain() { pool().child().release(); } + void viaNew() { new Pool().release(); } + void viaCast(Object o) { ((Conn) o).release(); } +} +"#, + )], + ); + assert_eq!(callers(&g, "Pool::release"), ["viaCall", "viaNew"]); + assert_eq!(callers(&g, "Conn::release"), ["viaCast", "viaChain", "viaVar"]); +} + +#[test] +fn ts_result_types() { + let g = graph( + "ts", + &[ + ( + "src/pool.ts", + r#"export class Pool { release(): void {} } +export class Conn { release(): void {} } +export function getPool(): Pool { return new Pool() } +export async function open(): Promise { return new Conn() } +"#, + ), + ( + "src/use.ts", + r#"import { getPool, open } from "./pool" + +export function viaVar() { const p = getPool(); p.release() } +export async function viaAwait() { const c = await open(); c.release() } +export function viaCall() { getPool().release() } +"#, + ), + ], + ); + assert_eq!(callers(&g, "Pool::release"), ["viaCall", "viaVar"]); + assert_eq!(callers(&g, "Conn::release"), ["viaAwait"]); +} + +#[test] +fn unknown_result_stays_a_guess() { + // `make()` declares no result type: both `release` methods remain candidates, as before + let g = graph( + "unknown", + &[( + "src/x.ts", + r#"export class Pool { release(): void {} } +export class Conn { release(): void {} } +export function make() { return new Pool() } +export function use() { make().release() } +"#, + )], + ); + let pool = g.find("Pool::release")[0]; + let user = g.find("use")[0]; + assert!(g.callers(pool).iter().any(|(c, _)| *c == user)); + assert!(g.is_guess(user, pool)); +} diff --git a/crates/gitnext-index/tests/rust_receivers.rs b/crates/gitnext-index/tests/rust_receivers.rs new file mode 100644 index 0000000..d66c127 --- /dev/null +++ b/crates/gitnext-index/tests/rust_receivers.rs @@ -0,0 +1,165 @@ +//! Rust methods whose name several types share: the receiver's type picks the right one — +//! a field of a struct in the same file (`self.core.drain()`), `Self` in an `impl` that sits in +//! another module than the struct, a `&Self` parameter, and what a `macro_rules!` expands to. + +use gitnext_index::{Graph, Index}; + +fn graph(name: &str, files: &[(&str, &str)]) -> Graph { + let dir = std::env::temp_dir().join(format!("gitnext-rust-recv-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + for (path, code) in files { + let p = dir.join(path); + std::fs::create_dir_all(p.parent().unwrap()).unwrap(); + std::fs::write(p, code).unwrap(); + } + let mut idx = Index::open(&dir).unwrap(); + idx.refresh().unwrap(); + let g = idx.graph().unwrap(); + let _ = std::fs::remove_dir_all(&dir); + g +} + +/// (sure callers, guessed callers) of `target`, by name. +fn callers(g: &Graph, target: &str) -> (Vec, Vec) { + let found = g.find(target); + assert_eq!(found.len(), 1, "{target}: {found:?}"); + let (mut sure, mut guess) = (Vec::new(), Vec::new()); + for (c, _) in g.callers(found[0]) { + let name = g.syms[c].sym.name.clone(); + if g.is_guess(c, found[0]) { guess.push(name) } else { sure.push(name) } + } + sure.sort(); + sure.dedup(); + guess.sort(); + guess.dedup(); + (sure, guess) +} + +const CARGO: &str = "[package]\nname = \"demo\"\nversion = \"0.1.0\"\n"; + +#[test] +fn fields_self_and_macros() { + let g = graph( + "fields", + &[ + ("Cargo.toml", CARGO), + ( + "src/lib.rs", + r#"pub mod core; +pub mod display; +pub mod other; + +use crate::core::Core; + +pub struct Map { + core: Core, +} + +impl Map { + pub fn drain_all(&mut self) { + self.core.drain_items(); + } + pub fn label(&self) -> &str { + "map" + } + pub fn same(&self, rhs: &Self) -> bool { + rhs.label() == "map" + } +} + +pub struct View<'a> { + map: &'a Map, +} + +impl<'a> View<'a> { + pub fn peek(&self) { + self.map.core.drain_items(); + } +} + +#[macro_export] +macro_rules! make_map { + () => { + $crate::Map::build() + }; +} + +impl Map { + pub fn build() -> Map { + Map { core: Core {} } + } +} +"#, + ), + ( + "src/core.rs", + r#"pub struct Core {} + +impl Core { + pub fn drain_items(&mut self) {} +} +"#, + ), + ( + "src/other.rs", + r#"pub struct Other {} + +impl Other { + pub fn drain_items(&mut self) {} + pub fn label(&self) -> &str { + "other" + } +} +"#, + ), + ( + "src/display.rs", + r#"use crate::Map; +use std::fmt; + +impl fmt::Display for Map { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(self.label()) + } +} +"#, + ), + ], + ); + // a field of a struct in the same file: `self.core.drain_items()` is `Core::drain_items` + let (sure, _) = callers(&g, "Core::drain_items"); + assert!(sure.contains(&"drain_all".to_string()), "{sure:?}"); + let (sure, guess) = callers(&g, "Other::drain_items"); + assert!(!sure.contains(&"drain_all".to_string()), "{sure:?}"); + // a field chain leaving the file (`map: &'a Map`, but `Map.core` is known here too — same file) + let (sure, _) = callers(&g, "Core::drain_items"); + assert!(sure.contains(&"peek".to_string()), "{sure:?} / {guess:?}"); + // `Self` in an `impl` of another module, and a `&Self` parameter + let (sure, _) = callers(&g, "Map::label"); + assert_eq!(sure, ["fmt", "same"]); + let (sure, _) = callers(&g, "Other::label"); + assert!(sure.is_empty(), "{sure:?}"); + // what a macro expands to + let (sure, _) = callers(&g, "Map::build"); + assert_eq!(sure, ["make_map"]); +} + +#[test] +fn two_types_of_one_name_stay_unknown() { + // `impl a::Slice` written in module `c`: the owner reads `c::Slice`; with `a::Slice` and + // `b::Slice` both in the crate, `self.span()` must not become a sure call of either + let g = graph( + "slices", + &[ + ("Cargo.toml", CARGO), + ("src/lib.rs", "pub mod a;\npub mod b;\npub mod c;\n"), + ("src/a.rs", "pub struct Slice {}\n\nimpl Slice {\n pub fn span(&self) -> usize {\n 1\n }\n}\n"), + ("src/b.rs", "pub struct Slice {}\n\nimpl Slice {\n pub fn span(&self) -> usize {\n 2\n }\n}\n"), + ("src/c.rs", "use crate::a::Slice;\n\nimpl Slice {\n pub fn twice(&self) -> usize {\n self.span() * 2\n }\n}\n"), + ], + ); + for t in ["a::Slice::span", "b::Slice::span"] { + let (sure, _) = callers(&g, t); + assert!(!sure.contains(&"twice".to_string()), "{t}: {sure:?}"); + } +} diff --git a/crates/gitnext-index/tests/testmap.rs b/crates/gitnext-index/tests/testmap.rs new file mode 100644 index 0000000..589b7e2 --- /dev/null +++ b/crates/gitnext-index/tests/testmap.rs @@ -0,0 +1,60 @@ +//! The learned test map and the coverage.py data it is built from. + +use gitnext_index::{read_coverage, TestMap}; +use rusqlite::Connection; + +fn dir(name: &str) -> std::path::PathBuf { + let d = std::env::temp_dir().join(format!("gitnext-testmap-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&d); + std::fs::create_dir_all(&d).unwrap(); + d +} + +#[test] +fn coverage_lines_and_arcs_are_read_per_test() { + let d = dir("cov"); + let data = d.join("cov.db"); + let c = Connection::open(&data).unwrap(); + c.execute_batch( + "CREATE TABLE file(id INTEGER PRIMARY KEY, path TEXT); + CREATE TABLE context(id INTEGER PRIMARY KEY, context TEXT); + CREATE TABLE line_bits(file_id INTEGER, context_id INTEGER, numbits BLOB); + CREATE TABLE arc(file_id INTEGER, context_id INTEGER, fromno INTEGER, tono INTEGER); + INSERT INTO file VALUES (1, '/repo/src/a.py'), (2, '/repo/src/b.py'); + INSERT INTO context VALUES (1, ''), (2, 'tests/test_a.py::test_one[p1]|run'), (3, 'tests/test_a.py::TestB::test_two|run'); + INSERT INTO line_bits VALUES (1, 1, x'ff'), (1, 2, x'0601'); + INSERT INTO arc VALUES (2, 3, -4, 5), (2, 3, 5, 7), (2, 3, 7, -4), (2, 1, 1, 2);", + ) + .unwrap(); + drop(c); + let mut got = read_coverage(&data).unwrap(); + got.sort(); + assert_eq!( + got, + [ + ("/repo/src/a.py".to_string(), "tests/test_a.py::test_one[p1]|run".to_string(), vec![1, 2, 8]), // bits 1,2 of byte 0; bit 0 of byte 1 + ("/repo/src/b.py".to_string(), "tests/test_a.py::TestB::test_two|run".to_string(), vec![5, 7]), + ], + "code run outside tests (empty context) and entry / exit markers are left out" + ); + let _ = std::fs::remove_dir_all(&d); +} + +#[test] +fn map_answers_narrowest_tests_first() { + let d = dir("map"); + assert!(TestMap::open_existing(&d).is_none()); + let row = |sym: &str, test: &str| (sym.to_string(), "h1".to_string(), "tests/test_a.py".to_string(), test.to_string()); + // test_wide runs three functions, test_narrow one + let pairs = vec![row("m::f", "test_wide"), row("m::g", "test_wide"), row("m::h", "test_wide"), row("m::f", "test_narrow"), row("m::f", "test_narrow")]; + let map = TestMap::write(&d, "pytest-cov", &pairs).unwrap(); + assert_eq!(map.size(), (3, 2, 4)); + let map = TestMap::open_existing(&d).unwrap(); + let names: Vec = map.tests_of("m::f").into_iter().map(|c| format!("{} {}", c.name, c.breadth)).collect(); + assert_eq!(names, ["test_narrow 1", "test_wide 3"]); + assert!(map.tests_of("m::unknown").is_empty()); + // learning again replaces the map + TestMap::write(&d, "pytest-cov", &[row("m::g", "test_only")]).unwrap(); + assert!(TestMap::open_existing(&d).unwrap().tests_of("m::f").is_empty()); + let _ = std::fs::remove_dir_all(&d); +} diff --git a/crates/gitnext-ops/Cargo.toml b/crates/gitnext-ops/Cargo.toml index df8d441..c8ee6d9 100644 --- a/crates/gitnext-ops/Cargo.toml +++ b/crates/gitnext-ops/Cargo.toml @@ -7,9 +7,9 @@ license.workspace = true [dependencies] anyhow = "1.0.104" git2 = { version = "0.21.0", default-features = false } -gitnext-core = { version = "0.2.0", path = "../gitnext-core" } -gitnext-docs = { version = "0.2.0", path = "../gitnext-docs" } -gitnext-index = { version = "0.2.0", path = "../gitnext-index" } -gitnext-parse = { version = "0.2.0", path = "../gitnext-parse" } +gitnext-core = { version = "0.3.0", path = "../gitnext-core" } +gitnext-docs = { version = "0.3.0", path = "../gitnext-docs" } +gitnext-index = { version = "0.3.0", path = "../gitnext-index" } +gitnext-parse = { version = "0.3.0", path = "../gitnext-parse" } serde = { version = "1.0.229", features = ["derive"] } serde_json = "1.0.154" diff --git a/crates/gitnext-ops/src/agents.rs b/crates/gitnext-ops/src/agents.rs index c4e7330..8727300 100644 --- a/crates/gitnext-ops/src/agents.rs +++ b/crates/gitnext-ops/src/agents.rs @@ -49,7 +49,7 @@ impl Profile { } /// Tools of the lite profile: one way to look at anything, two ways to change code. -pub const LITE_TOOLS: &[&str] = &["look", "replace", "add_after"]; +pub const LITE_TOOLS: &[&str] = &["look", "replace", "add_after", "rename", "check"]; /// Instruction block for capable agents (CLAUDE.md, Cursor rules). pub fn instructions_full() -> String { @@ -64,8 +64,11 @@ pub fn instructions_full() -> String { 3. Edit by symbol: `replace_symbol` / `insert_after` / `rename_symbol` (rename also fixes imports, `__all__`, tests and \ `module.func` uses, and lists any text it did not change) — no need to read the file first.\n\ 4. New repo: `overview` once. Resuming: `brief`, then `changes`.\n\ - 5. Worked out what undocumented code does? `annotate` it in one line; later sessions get it for free.\n\n\ - Plain reads are fine for non-code files and small files. Run the tests yourself — gitnext does not run them.\n" + 5. Worked out what undocumented code does? `annotate` it in one line; later sessions get it for free.\n\ + 6. A test fails: `why ` runs it and returns the failure in a few lines and the code to look at, the most likely \ + culprit first. After a change: `gitnext check` builds and runs the tests of what changed. A long build or test log: \ + `… 2>&1 | gitnext digest` gives what failed, where and the message.\n\n\ + Plain reads are fine for non-code files and small files.\n" .into() } @@ -78,7 +81,10 @@ pub fn instructions_lite() -> String { - an error or traceback → the code where it happened\n\ - words → where they appear: {\"what\": \"retry delay\"}\n\ To change one function: `mcp__gitnext__replace` {\"symbol\": \"parse_date\", \"code\": \"\"}.\n\ - To add a new function after another: `mcp__gitnext__add_after` with the same fields.\n" + To add a new function after another: `mcp__gitnext__add_after` with the same fields.\n\ + To rename everywhere: `mcp__gitnext__rename` {\"symbol\": \"parse_date\", \"new_name\": \"parse_day\"}.\n\ + After a change run `mcp__gitnext__check` {} — it builds and runs the tests of what you changed.\n\ + A test fails? `mcp__gitnext__check` {\"test\": \"test_parse_date\"} gives the failure and the code to fix.\n" .into() } diff --git a/crates/gitnext-ops/src/check.rs b/crates/gitnext-ops/src/check.rs new file mode 100644 index 0000000..edf0f2a --- /dev/null +++ b/crates/gitnext-ops/src/check.rs @@ -0,0 +1,229 @@ +//! `gitnext check`: after a change — build the project and run the tests of what changed, +//! and answer with a verdict. One step for the agent instead of three (edit → build → tests), +//! and the judgement comes from the compiler and the tests, not from the model. + +use std::fmt::Write as _; +use std::path::Path; +use std::process::{Command, Stdio}; +use std::time::{Duration, Instant}; + +use gitnext_index::Graph; + +use crate::locate::{self, TestRef}; + +/// At most this many tests are run for one check (the most likely to fail of each changed symbol). +const MAX_TESTS: usize = 30; + +pub struct Step { + /// `build` or `tests` + pub what: &'static str, + pub command: String, + pub ok: bool, + pub timed_out: bool, + pub seconds: f32, + /// the end of the command's output (stdout and stderr together) + pub output: String, + /// what failed, where and with what message — from the whole output, not its end + pub digest: crate::digest::Digest, + /// repo locations named anywhere in the output (`path:line`), in the order they came + pub frames: Vec, +} + +pub struct Check { + /// symbols whose code differs from the last commit + pub changed: Vec, + pub tests: usize, + pub steps: Vec, +} + +impl Check { + pub fn ok(&self) -> bool { + self.steps.iter().all(|s| s.ok) + } +} + +/// Symbols touched by the uncommitted changes: the innermost function / method / type around +/// every changed line (`git diff HEAD`), and everything in files git does not know yet. +pub fn changed_symbols(root: &Path, g: &Graph) -> Vec { + let git = |args: &[&str]| Command::new("git").args(args).current_dir(root).output().map(|o| String::from_utf8_lossy(&o.stdout).into_owned()).unwrap_or_default(); + let mut ranges: Vec<(String, u32, u32)> = Vec::new(); + let mut file = String::new(); + for line in git(&["diff", "HEAD", "--unified=0", "--no-color"]).lines() { + if let Some(p) = line.strip_prefix("+++ b/") { + file = p.to_string(); + } else if line.starts_with("+++ ") { + file.clear(); // deleted file + } else if let Some(rest) = line.strip_prefix("@@ ") { + // @@ -a,b +c,d @@ + let Some(new) = rest.split(' ').find(|x| x.starts_with('+')) else { continue }; + let mut it = new[1..].split(','); + let start: u32 = it.next().and_then(|x| x.parse().ok()).unwrap_or(0); + let len: u32 = it.next().and_then(|x| x.parse().ok()).unwrap_or(1); + if !file.is_empty() && start > 0 { + ranges.push((file.clone(), start, start + len.max(1) - 1)); // a pure deletion still marks its line + } + } + } + for f in git(&["ls-files", "--others", "--exclude-standard"]).lines() { + ranges.push((f.to_string(), 1, u32::MAX)); + } + let mut out: Vec = Vec::new(); + for (f, a, b) in &ranges { + // innermost symbol that contains the start of the range, plus every symbol inside it + let inside = |s: &gitnext_index::SymbolRow| s.sym.start_line <= *b && s.sym.end_line >= *a; + let mut hit: Vec = (0..g.syms.len()) + .filter(|&i| g.syms[i].file == *f && inside(&g.syms[i]) && (g.syms[i].sym.kind.is_callable() || g.syms[i].sym.kind.is_type())) + .collect(); + // a method and its class both contain the line: the method is what changed + let all = hit.clone(); + hit.retain(|&i| !all.iter().any(|&j| j != i && g.syms[j].sym.start_line >= g.syms[i].sym.start_line && g.syms[j].sym.end_line <= g.syms[i].sym.end_line && g.syms[j].sym.end_line - g.syms[j].sym.start_line < g.syms[i].sym.end_line - g.syms[i].sym.start_line)); + for i in hit { + if !out.contains(&i) { + out.push(i); + } + } + } + out +} + +/// How to check that the changed files still compile, per language present among them. +pub fn build_commands(root: &Path, files: &[&str]) -> Vec { + let has = |fam: &str| files.iter().any(|f| gitnext_parse::family_of(f) == Some(fam)); + let exists = |p: &str| root.join(p).exists(); + let mut v = Vec::new(); + if has("rust") && exists("Cargo.toml") { + v.push("cargo check --quiet --tests".to_string()); + } + if has("go") && exists("go.mod") { + v.push("go build ./... && go test -count=1 -run '^$' ./... >/dev/null".to_string()); + } + if has("python") { + let py = if exists(".venv/bin/python") { ".venv/bin/python" } else { "python3" }; + let list: Vec<&str> = files.iter().copied().filter(|f| f.ends_with(".py")).collect(); + // -f: compileall trusts a .pyc written in the same second as the edit + v.push(format!("{py} -m compileall -q -f {}", list.join(" "))); + } + if has("js") && exists("tsconfig.json") { + v.push("npx tsc --noEmit -p .".to_string()); + } + if has("java") { + if exists("pom.xml") { + v.push("mvn -q -B compile".to_string()); + } else if exists("gradlew") { + v.push("./gradlew -q compileJava".to_string()); + } + } + v +} + +/// The commands that run exactly these tests, as the project's own environment runs them. +pub fn test_commands(g: &Graph, root: &Path, tests: &[TestRef]) -> Vec { + locate::run_commands(g, root, tests) + .into_iter() + .filter(|c| !c.starts_with('#')) // C/C++: no single way to run tests + .map(|c| if c.starts_with("pytest ") && root.join(".venv/bin/pytest").exists() { format!(".venv/bin/{c}") } else { c }) + .collect() +} + +pub fn run(root: &Path, g: &Graph, what: &'static str, command: &str, timeout: Duration) -> Step { + let log = std::env::temp_dir().join(format!("gitnext-check-{}-{}.log", std::process::id(), what)); + let started = Instant::now(); + let (mut ok, mut timed_out) = (false, false); + if let Ok(out) = std::fs::File::create(&log) { + let err = out.try_clone().ok(); + let mut cmd = Command::new("sh"); + cmd.arg("-c").arg(command).current_dir(root).stdin(Stdio::null()).stdout(out); + if let Some(e) = err { + cmd.stderr(e); + } + if let Ok(mut child) = cmd.spawn() { + loop { + match child.try_wait() { + Ok(Some(status)) => { + ok = status.success(); + break; + } + Ok(None) if started.elapsed() < timeout => std::thread::sleep(Duration::from_millis(40)), + _ => { + let _ = child.kill(); + let _ = child.wait(); + timed_out = true; + break; + } + } + } + } + } + // a runaway log is cut to its first megabytes: the first failures are what matters + let text = std::fs::read(&log).map(|b| String::from_utf8_lossy(&b[..b.len().min(8 << 20)]).into_owned()).unwrap_or_default(); + let _ = std::fs::remove_file(&log); + let lines: Vec<&str> = text.lines().collect(); + let output = lines[lines.len().saturating_sub(25)..].join("\n"); + let (mut digest, frames) = if ok { Default::default() } else { (crate::digest::digest(&text), locate::frames(g, root, &text)) }; + // paths as the project has them, not as the tool printed them (`/abs/repo/command.go`, `./command.go`) + for f in &mut digest.failures { + if let Some(rel) = f.file.as_deref().and_then(|p| locate::match_file(g, root, p)) { + f.file = Some(rel); + } + } + Step { what, command: command.to_string(), ok, timed_out, seconds: started.elapsed().as_secs_f32(), output, digest, frames } +} + +/// Build, then the tests most likely to fail for every changed symbol. Stops at a failed build. +pub fn check(root: &Path, g: &Graph, timeout: Duration) -> Check { + let changed = changed_symbols(root, g); + let mut files: Vec<&str> = changed.iter().map(|&i| g.syms[i].file.as_str()).collect(); + files.sort_unstable(); + files.dedup(); + let mut steps = Vec::new(); + for c in build_commands(root, &files) { + steps.push(run(root, g, "build", &c, timeout)); + if !steps.last().is_some_and(|s| s.ok) { + return Check { changed, tests: 0, steps }; + } + } + let mut tests: Vec = Vec::new(); + for &i in &changed { + // a changed test is run itself; other code brings the tests most likely to fail for it + let mine = if g.syms[i].sym.test { vec![TestRef { symbol: i, how: "changed".into() }] } else { locate::tests_for_at(g, root, i, 4).0.into_iter().take(locate::TOP_TESTS).collect() }; + for t in mine { + if tests.len() < MAX_TESTS && !tests.iter().any(|x| x.symbol == t.symbol) && locate::is_runnable(g, t.symbol) { + tests.push(t); + } + } + } + for c in test_commands(g, root, &tests) { + steps.push(run(root, g, "tests", &c, timeout)); + } + Check { changed, tests: tests.len(), steps } +} + +pub fn render(g: &Graph, c: &Check) -> String { + if c.changed.is_empty() { + return "nothing to check: no code differs from the last commit\n".to_string(); + } + let names: Vec<&str> = c.changed.iter().take(8).map(|&i| g.short_name(i)).collect(); + let mut s = format!("check: {} changed ({}{})\n", crate::changes::plural(c.changed.len(), "symbol"), names.join(", "), if c.changed.len() > 8 { " …" } else { "" }); + for st in &c.steps { + let state = if st.ok { "ok" } else if st.timed_out { "TIMED OUT" } else { "FAILED" }; + let _ = writeln!(s, "{:<5} {:<9} {:>5.1}s {}", st.what, state, st.seconds, st.command); + if !st.ok { + // what failed, where, the message — not the tool's whole output + let text = if st.digest.failures.is_empty() { st.output.clone() } else { crate::digest::render(&st.digest, 5) }; + + for l in text.lines() { + let _ = writeln!(s, " {l}"); + } + } + } + let file = &g.syms[c.changed[0]].file; + if let Some(bad) = c.steps.iter().find(|x| !x.ok) { + let _ = writeln!(s, "verdict: FAILED — {} ({})", bad.what, if bad.what == "build" { "the tests were not run" } else { "see the output above" }); + } else if c.steps.iter().all(|x| x.what != "tests") { + let _ = writeln!(s, "verdict: builds, but no test reaches the changed code through the call graph — run the project's test suite"); + } else { + let _ = writeln!(s, "verdict: ok — builds, {} pass", crate::changes::plural(c.tests, "test")); + let _ = writeln!(s, "note: {}.", crate::trust::tests_note(file)); + } + s +} diff --git a/crates/gitnext-ops/src/context.rs b/crates/gitnext-ops/src/context.rs index 736ef0b..618f4e1 100644 --- a/crates/gitnext-ops/src/context.rs +++ b/crates/gitnext-ops/src/context.rs @@ -206,11 +206,11 @@ pub fn context(ws: &Workspace, g: &Graph, task: &str, budget: usize) -> String { block.push_str(&text_mentions(g, root, *i)); } if !r.sym.test { - let t = locate::tests_for(g, *i, 3); + let t = locate::tests_for_at(g, root, *i, 3).0; if !t.is_empty() { let names: Vec<&str> = t.iter().take(5).map(|x| g.short_name(x.symbol)).collect(); let _ = writeln!(block, "tests: {}{}", names.join(", "), if t.len() > 5 { format!(" +{}", t.len() - 5) } else { String::new() }); - if let Some(cmd) = locate::run_commands(g, root, &t).into_iter().next() { + if let Some(cmd) = locate::run_commands(g, root, &t[..t.len().min(locate::TOP_TESTS)]).into_iter().next() { let _ = writeln!(block, " run: {}", cmd.chars().take(200).collect::()); } } diff --git a/crates/gitnext-ops/src/digest.rs b/crates/gitnext-ops/src/digest.rs new file mode 100644 index 0000000..c1f9fc4 --- /dev/null +++ b/crates/gitnext-ops/src/digest.rs @@ -0,0 +1,607 @@ +//! What a build or a test run said, in a few lines: what failed, where, and the message — +//! instead of the tool's whole output. A failing test suite prints hundreds of lines (one +//! vitest run with 35 failures: 843); an agent needs the first few failures, each with its +//! location and one or two lines of message, and how many more there are. +//! +//! Understood: rustc / cargo test, pytest, Python tracebacks, go build / go test (with panics), +//! tsc, vitest, jest, javac / maven (surefire), and `file:line: message` of gcc / clang and others. +//! Anything else falls back to the last lines of the output. + +use std::fmt::Write as _; + +/// Lines of message kept per failure, and characters per line. +const MESSAGE_LINES: usize = 4; +const LINE_CHARS: usize = 200; + +#[derive(Debug, Clone, PartialEq, Default)] +pub struct Failure { + /// The test's name, or the compiler's error code (`E0609`, `TS2551`), or `error`. + pub what: String, + /// Where it failed, as the tool printed the path. + pub file: Option, + pub line: Option, + pub message: Vec, + /// How many times this same failure came (the same compile error in many places). + pub count: usize, +} + +#[derive(Debug, Clone, Default)] +pub struct Digest { + /// `tests`, `build`, or empty when the output was not recognised. + pub kind: &'static str, + pub failures: Vec, + /// The tool's own totals (`1 failed, 68 passed in 0.16s`). + pub summary: Option, + /// Lines of the original output. + pub lines: usize, + /// The end of the output, kept when nothing was recognised. + pub tail: Vec, +} + +fn clip(s: &str) -> String { + let s = s.trim_end(); + if s.chars().count() > LINE_CHARS { + format!("{}…", s.chars().take(LINE_CHARS).collect::()) + } else { + s.to_string() + } +} + +/// Terminal colours and cursor moves out of a line. +fn plain(s: &str) -> String { + let mut out = String::with_capacity(s.len()); + let mut it = s.chars().peekable(); + while let Some(c) = it.next() { + if c == '\u{1b}' && it.peek() == Some(&'[') { + it.next(); + for d in it.by_ref() { + if d.is_ascii_alphabetic() { + break; + } + } + } else if c != '\r' { + out.push(c); + } + } + out +} + +fn is_code_path(p: &str) -> bool { + let Some((stem, ext)) = p.rsplit_once('.') else { return false }; + !stem.is_empty() + && (1..=5).contains(&ext.len()) + && ext.chars().all(|c| c.is_ascii_alphanumeric()) + && ext.chars().any(|c| c.is_ascii_alphabetic()) + && p.chars().all(|c| c.is_alphanumeric() || "/._-+@$[]~ \\".contains(c)) + && !p.contains("://") +} + +/// `path.ext:12`, `path.ext:12:5`, `path.ext(12,5)`, `path.ext:[12,5]` at the start of `s`: +/// the path, the line, and the rest of the text. +pub(crate) fn location(s: &str) -> Option<(String, u32, &str)> { + let digits = |t: &str| -> Option<(u32, usize)> { + let n: String = t.chars().take_while(|c| c.is_ascii_digit()).collect(); + (!n.is_empty()).then(|| n.parse().ok().map(|v| (v, n.len()))).flatten() + }; + // the path ends where `:`, `(` or `:[` begins + for (i, c) in s.char_indices() { + if c != ':' && c != '(' { + continue; + } + let path = &s[..i]; + if !is_code_path(path.trim()) { + continue; + } + let mut rest = &s[i + 1..]; + let bracket = c == ':' && rest.starts_with('['); + if bracket { + rest = &rest[1..]; + } + let Some((line, used)) = digits(rest) else { continue }; + let mut rest = &rest[used..]; + // column + if let Some(r) = rest.strip_prefix([':', ',']) { + if let Some((_, u)) = digits(r) { + rest = &r[u..]; + } + } + if (c == '(' || bracket) && !rest.starts_with([')', ']']) { + continue; + } + let rest = rest.trim_start_matches([')', ']']); + return Some((path.trim().to_string(), line, rest)); + } + None +} + +fn push(out: &mut Vec, what: &str, loc: Option<(String, u32)>, message: Vec) { + let message: Vec = message.iter().map(|m| clip(m.trim_end())).filter(|m| !m.trim().is_empty()).take(MESSAGE_LINES).collect(); + let (file, line) = match loc { + Some((f, l)) => (Some(f), Some(l)), + None => (None, None), + }; + out.push(Failure { what: what.trim().to_string(), file, line, message, count: 1 }); +} + +// ───────────────────────────── per tool ───────────────────────────── + +fn rustc(lines: &[String], out: &mut Vec) { + for (i, l) in lines.iter().enumerate() { + let Some(rest) = l.strip_prefix("error") else { continue }; + let (code, msg) = match rest.strip_prefix('[') { + Some(r) => match r.split_once("]: ") { + Some((c, m)) => (c, m), + None => continue, + }, + None => match rest.strip_prefix(": ") { + Some(m) => ("error", m), + None => continue, + }, + }; + if ["could not compile", "aborting due to", "test failed", "process didn't exit", "failed to run custom build"].iter().any(|p| msg.starts_with(p)) { + continue; + } + let loc = lines[i + 1..].iter().take(6).find_map(|n| n.trim_start().strip_prefix("--> ")).and_then(|t| location(t.trim())).map(|(f, n, _)| (f, n)); + if loc.is_none() && code == "error" { + continue; // not rustc's: some other tool's line that starts with `error:` + } + // the line of code and what the compiler wrote under it: `^^^^ expected `u64`, found `Option`` + let mut msg = vec![msg.to_string()]; + let shown: Vec<&String> = lines[i + 1..].iter().take(12).take_while(|n| !n.starts_with("error") && !n.starts_with("warning")).collect(); + if let Some(src) = shown.iter().find_map(|n| n.split_once(" | ").filter(|(num, _)| !num.trim().is_empty() && num.trim().chars().all(|c| c.is_ascii_digit())).map(|x| x.1.trim())) { + msg.push(format!("> {src}")); + } + if let Some(label) = shown.iter().find_map(|n| n.split_once('^').map(|x| x.1.trim_start_matches(['^', '-']).trim()).filter(|t| !t.is_empty())) { + msg.push(label.to_string()); + } + push(out, code, loc, msg); + } +} + +fn cargo_test(lines: &[String], out: &mut Vec, summary: &mut Option) { + let mut i = 0; + while i < lines.len() { + let l = &lines[i]; + if l.starts_with("test result:") && (summary.is_none() || l.contains("FAILED")) { + *summary = Some(l.trim_start_matches("test result:").trim().to_string()); + } + let name = l.strip_prefix("---- ").and_then(|r| r.strip_suffix(" stdout ----").or_else(|| r.strip_suffix(" stderr ----"))); + let Some(name) = name else { + i += 1; + continue; + }; + let end = lines[i + 1..].iter().position(|n| n.starts_with("---- ") || n.trim() == "failures:").map_or(lines.len(), |p| i + 1 + p); + let block = &lines[i + 1..end]; + let mut loc = None; + let mut msg: Vec = Vec::new(); + if let Some(p) = block.iter().position(|b| b.contains("panicked at ")) { + let after = block[p].split_once("panicked at ").map_or("", |x| x.1); + if let Some(q) = after.strip_prefix('\'') { + // before 1.73: panicked at 'message', src/x.rs:1:2 + if let Some((m, at)) = q.rsplit_once("', ") { + msg.push(m.to_string()); + loc = location(at.trim()).map(|(f, n, _)| (f, n)); + } + } else { + loc = location(after.trim().trim_end_matches(':')).map(|(f, n, _)| (f, n)); + msg.extend(block[p + 1..].iter().take_while(|b| !b.trim().is_empty() && !b.starts_with("stack backtrace") && !b.starts_with("note:")).cloned()); + } + } else { + msg.extend(block.iter().filter(|b| !b.trim().is_empty()).take(3).cloned()); + } + push(out, name, loc, msg); + i = end; + } +} + +fn pytest(lines: &[String], out: &mut Vec, summary: &mut Option) { + let header = |l: &str| -> Option { + // `____ test_x ____`; a long name leaves one underscore on each side: `_ test_x[a long id] _` + let t = l.trim(); + let inner = t.trim_matches('_'); + (t.starts_with('_') && t.ends_with('_') && inner.len() > 2 && inner.starts_with(' ') && inner.ends_with(' ')).then(|| inner.trim().to_string()) + }; + let e_line = |l: &str| l.strip_prefix('E').filter(|r| r.is_empty() || r.starts_with(' ')).map(|r| r.trim().to_string()); + let py_loc = |l: &str| location(l).filter(|(f, _, rest)| f.ends_with(".py") && rest.starts_with(": ")).map(|(f, n, _)| (f, n)); + let mut i = 0; + let mut sections = 0; + while i < lines.len() { + let l = &lines[i]; + let t = l.trim().trim_matches('=').trim(); + if (t.contains(" passed") || t.contains(" failed") || t.contains(" error")) && t.contains(" in ") && t.chars().next().is_some_and(|c| c.is_ascii_digit()) { + *summary = Some(t.to_string()); + } + let Some(name) = header(l) else { + i += 1; + continue; + }; + let end = lines[i + 1..].iter().position(|n| header(n).is_some() || n.starts_with("====")).map_or(lines.len(), |p| i + 1 + p); + let block = &lines[i + 1..end]; + let mut msg: Vec = block.iter().filter_map(|b| e_line(b)).filter(|m| !m.is_empty()).collect(); + // the source line that failed, marked `>` + if let Some(src) = block.iter().rev().find_map(|b| b.strip_prefix('>').map(|r| r.trim().to_string())) { + msg.insert(0, format!("> {src}")); + } + let loc = block.iter().rev().find_map(|b| py_loc(b)); + push(out, &name, loc, msg); + sections += 1; + i = end; + } + if sections > 0 { + return; + } + // no sections: `--tb=no`, or the collection itself failed (a conftest that does not import) + for l in lines { + if let Some(r) = l.strip_prefix("FAILED ").or_else(|| l.strip_prefix("ERROR ")) { + let (id, msg) = r.split_once(" - ").unwrap_or((r, "")); + if id.contains(".py") { + let name = id.rsplit("::").next().unwrap_or(id); + push(out, name, id.split("::").next().filter(|f| f.ends_with(".py")).map(|f| (f.to_string(), 0)), vec![msg.to_string()]); + } + } + } + if out.is_empty() { + let es: Vec = lines.iter().filter_map(|l| e_line(l)).filter(|m| !m.is_empty()).collect(); + if let Some(first) = lines.iter().find(|l| l.contains("Error while loading") || l.contains("error while loading") || l.starts_with("ERROR collecting")) { + // `File "/abs/x.py", line 457` inside the E lines is where the import broke + let loc = es.iter().rev().find_map(|e| { + let r = e.strip_prefix("File \"")?; + let (p, tail) = r.split_once('"')?; + let n: String = tail.trim_start_matches(", line ").chars().take_while(|c| c.is_ascii_digit()).collect(); + Some((p.to_string(), n.parse().ok()?)) + }); + let loc = loc.or_else(|| lines.iter().rev().find_map(|l| py_loc(l))); + let keep = es.len().saturating_sub(3); + push(out, first.trim().trim_end_matches('.'), loc, es[keep..].to_vec()); + } + } + for f in out.iter_mut() { + if f.line == Some(0) { + f.line = None; + } + } +} + +fn python_traceback(lines: &[String], out: &mut Vec) { + let mut i = 0; + while i < lines.len() { + if !lines[i].trim_start().starts_with("Traceback (most recent call last)") { + i += 1; + continue; + } + let mut loc = None; + let mut j = i + 1; + while j < lines.len() && (lines[j].starts_with(' ') || lines[j].starts_with('\t')) { + if let Some(r) = lines[j].trim_start().strip_prefix("File \"") { + if let Some((p, tail)) = r.split_once('"') { + let n: String = tail.trim_start_matches(", line ").chars().take_while(|c| c.is_ascii_digit()).collect(); + if let Ok(n) = n.parse() { + loc = Some((p.to_string(), n)); + } + } + } + j += 1; + } + if let Some(last) = lines.get(j) { + let (kind, msg) = last.split_once(": ").unwrap_or((last.as_str(), "")); + push(out, kind, loc, vec![msg.to_string()]); + } + i = j + 1; + } +} + +fn go_test(lines: &[String], out: &mut Vec, summary: &mut Option) { + let goroot = |p: &str| p.contains("/src/runtime/") || p.contains("/src/testing/") || p.contains("/pkg/mod/") || p.contains("/src/reflect/"); + let failed: Vec<&str> = lines.iter().filter_map(|l| l.strip_prefix("FAIL\t")).filter_map(|r| r.split('\t').next()).collect(); + if !failed.is_empty() { + *summary = Some(format!("FAIL {}", failed.join(", "))); + } + let mut i = 0; + while i < lines.len() { + let Some(name) = lines[i].trim_start().strip_prefix("--- FAIL: ") else { + i += 1; + continue; + }; + let name = name.split(" (").next().unwrap_or(name); + let mut loc = None; + let mut msg: Vec = Vec::new(); + let mut j = i + 1; + // ` x_test.go:15: got 1, want 2`, possibly several, and their continuation lines + while j < lines.len() && lines[j].starts_with([' ', '\t']) && !lines[j].trim_start().starts_with("--- ") { + let t = lines[j].trim_start(); + match location(t).filter(|(f, _, rest)| f.ends_with(".go") && rest.starts_with(": ")) { + Some((f, n, rest)) => { + if loc.is_none() { + loc = Some((f, n)); + } + msg.push(rest[2..].to_string()); + } + None => msg.push(t.to_string()), + } + j += 1; + } + if msg.is_empty() && lines.get(j).is_some_and(|l| l.starts_with("panic:")) { + // a panic: the message, and the first frame that is not Go's own + msg.push(lines[j].trim_start_matches("panic:").trim().trim_end_matches("[recovered]").trim().to_string()); + let mut k = j + 1; + while k < lines.len() && !lines[k].starts_with("FAIL") && !lines[k].starts_with("--- ") { + if lines[k].starts_with('\t') && lines[k].contains(".go:") && !goroot(&lines[k]) { + let t = lines[k].trim().split(" +0x").next().unwrap_or(""); + if let Some((f, n, _)) = location(t) { + loc = Some((f, n)); + break; + } + } + k += 1; + } + j = k; + } + push(out, name, loc, msg); + i = j.max(i + 1); + } +} + +fn tsc(lines: &[String], out: &mut Vec) { + for l in lines { + let Some((f, n, rest)) = location(l.trim_start()) else { continue }; + let Some(r) = rest.strip_prefix(": error ") else { continue }; + let (code, msg) = r.split_once(": ").unwrap_or(("error", r)); + push(out, code, Some((f, n)), vec![msg.to_string()]); + } +} + +fn vitest(lines: &[String], out: &mut Vec, summary: &mut Option) { + let mut found: Vec = Vec::new(); + let mut i = 0; + while i < lines.len() { + let t = lines[i].trim(); + if let Some(r) = t.strip_prefix("Tests ") { + if r.contains("failed") || r.contains("passed") { + *summary = Some(r.trim().to_string()); + } + } + let Some(r) = t.strip_prefix("FAIL ").map(str::trim).filter(|r| r.contains(" > ")) else { + i += 1; + continue; + }; + let (file, name) = r.split_once(" > ").unwrap_or((r, r)); + let end = lines[i + 1..].iter().position(|n| n.trim().starts_with("FAIL ") || n.contains("⎯⎯⎯⎯")).map_or(lines.len(), |p| i + 1 + p); + let block = &lines[i + 1..end]; + let msg: Vec = block.iter().map(|b| b.trim().to_string()).filter(|b| !b.is_empty()).take(1).collect(); + let loc = block.iter().find_map(|b| b.trim().strip_prefix("❯ ").and_then(|t| location(t.trim()))).map(|(f, n, _)| (f, n)); + let had_loc = loc.is_some(); + push(&mut found, name, loc.or_else(|| is_code_path(file).then(|| (file.to_string(), 0))), msg); + if !had_loc { + if let Some(f) = found.last_mut() { + f.line = None; + } + } + i = end; + } + // tests that fail with the same error are printed as several `FAIL` lines over one message + for k in (0..found.len().saturating_sub(1)).rev() { + if found[k].message.is_empty() { + found[k].message = found[k + 1].message.clone(); + if found[k].line.is_none() && found[k].file == found[k + 1].file { + found[k].line = found[k + 1].line; + } + } + } + out.extend(found); +} + +fn jest(lines: &[String], out: &mut Vec, summary: &mut Option) { + if let Some(r) = lines.iter().find_map(|l| l.trim().strip_prefix("Tests:")) { + *summary = Some(r.trim().to_string()); + } + let mut i = 0; + while i < lines.len() { + let t = lines[i].trim(); + let Some(name) = t.strip_prefix("● ").filter(|n| n.contains(" › ")) else { + i += 1; + continue; + }; + let end = lines[i + 1..].iter().position(|n| n.trim().starts_with("● ")).map_or(lines.len(), |p| i + 1 + p); + let block = &lines[i + 1..end]; + let msg: Vec = block.iter().map(|b| b.trim().to_string()).filter(|b| !b.is_empty()).take(2).collect(); + let loc = block + .iter() + .filter(|b| b.trim_start().starts_with("at ") && !b.contains("node_modules")) + .find_map(|b| b.rsplit_once('(').and_then(|(_, p)| location(p)).or_else(|| location(b.trim_start().trim_start_matches("at ").trim()))) + .map(|(f, n, _)| (f, n)); + push(out, name, loc, msg); + i = end; + } +} + +fn maven(lines: &[String], out: &mut Vec, summary: &mut Option) { + let body = |l: &str| l.strip_prefix("[ERROR]").map(|r| r.strip_prefix(' ').unwrap_or(r).to_string()); + let mut i = 0; + while i < lines.len() { + let l = &lines[i]; + if l.contains("Tests run:") && l.contains("Failures:") && !l.contains(" -- in ") && !l.contains("Time elapsed") { + *summary = Some(l.trim_start_matches("[ERROR]").trim_start_matches("[INFO]").trim_start_matches("[WARNING]").trim().to_string()); + } + let Some(b) = body(l) else { + i += 1; + continue; + }; + // a compile error: /abs/X.java:[12,5] message + if let Some((f, n, rest)) = location(b.trim()).filter(|(f, _, _)| f.ends_with(".java") || f.ends_with(".kt")) { + let mut msg = vec![rest.trim().to_string()]; + let mut j = i + 1; + while let Some(more) = lines.get(j).and_then(|x| body(x)).filter(|m| m.starts_with(" ") && (m.contains("symbol:") || m.contains("location:"))) { + msg.push(more.trim().to_string()); + j += 1; + } + push(out, "error", Some((f, n)), msg); + i = j; + continue; + } + // a failed test: `pkg.Class.method -- Time elapsed: 0.01 s <<< FAILURE!` (or `method(pkg.Class) Time elapsed…`) + if b.contains("<<< FAILURE!") || b.contains("<<< ERROR!") { + if b.trim_start().starts_with("Tests run:") { + i += 1; + continue; + } + let head = b.split(" -- ").next().unwrap_or(&b).split(" Time elapsed").next().unwrap_or(&b).trim(); + let (class, name) = match head.split_once('(') { + Some((m, c)) => (c.trim_end_matches(')').rsplit('.').next().unwrap_or("").to_string(), m.to_string()), + None => { + let mut it = head.rsplitn(3, '.'); + let m = it.next().unwrap_or(head).to_string(); + (it.next().unwrap_or("").to_string(), m) + } + }; + let msg: Vec = lines.get(i + 1).filter(|m| !m.starts_with('\t') && !m.trim().is_empty()).map(|m| vec![m.trim().to_string()]).unwrap_or_default(); + let frame = lines[i + 1..] + .iter() + .take_while(|x| !x.starts_with("[ERROR]") && !x.starts_with("[INFO]")) + .filter(|x| x.trim_start().starts_with("at ")) + .filter_map(|x| x.rsplit_once('(').and_then(|(_, p)| location(p.trim_end_matches(')')))) + .map(|(f, n, _)| (f, n)) + .collect::>(); + // the frame in the test's own class, else the first one + let loc = frame.iter().find(|(f, _)| !class.is_empty() && f.trim_end_matches(".java") == class).or(frame.first()).cloned(); + push(out, &if class.is_empty() { name } else { format!("{class}.{name}") }, loc, msg); + } + i += 1; + } +} + +/// `path:line[:col]: [error: ]message` — gcc, clang, go build, javac and many others. +fn generic(lines: &[String], out: &mut Vec) { + for l in lines { + let t = l.trim_start(); + let Some((f, n, rest)) = location(t) else { continue }; + let Some(msg) = rest.strip_prefix(": ").or_else(|| rest.strip_prefix(' ')) else { continue }; + let lower = msg.to_ascii_lowercase(); + if lower.starts_with("warning") || lower.starts_with("note") || lower.starts_with("in ") || msg.trim().is_empty() { + continue; + } + let msg = msg.trim_start_matches("fatal ").trim_start_matches("error: ").trim_start_matches("error "); + push(out, "error", Some((f, n)), vec![msg.to_string()]); + } +} + +// ───────────────────────────── the digest ───────────────────────────── + +pub fn digest(text: &str) -> Digest { + let lines: Vec = text.lines().map(plain).collect(); + let mut d = Digest { lines: lines.len(), ..Default::default() }; + let mut tests: Vec = Vec::new(); + let mut build: Vec = Vec::new(); + cargo_test(&lines, &mut tests, &mut d.summary); + pytest(&lines, &mut tests, &mut d.summary); + go_test(&lines, &mut tests, &mut d.summary); + vitest(&lines, &mut tests, &mut d.summary); + jest(&lines, &mut tests, &mut d.summary); + maven(&lines, &mut tests, &mut d.summary); + // maven's compile errors came through the test pass: they are the build's + let (mvn_build, rest): (Vec, Vec) = tests.into_iter().partition(|f| f.what == "error"); + tests = rest; + build.extend(mvn_build); + rustc(&lines, &mut build); + tsc(&lines, &mut build); + if tests.is_empty() && build.is_empty() { + python_traceback(&lines, &mut tests); + } + if tests.is_empty() && build.is_empty() { + generic(&lines, &mut build); + } + // the same compile error in many places is one line with a count + let mut merged: Vec = Vec::new(); + for f in build { + let key = |x: &Failure| (x.what.clone(), x.message.first().map(|m| m.chars().filter(|c| !c.is_ascii_digit()).collect::())); + match merged.iter_mut().find(|m| key(m) == key(&f)) { + Some(m) => m.count += 1, + None => merged.push(f), + } + } + // one test reported twice (a summary line and its section) is one failure, and the cases of + // one parametrized test (`test_x[1-2]`, `test_x[2-3]`) are one failure with a count + let mut seen: Vec = Vec::new(); + let mut ids: Vec> = Vec::new(); + for mut f in tests { + let id = f.what.clone(); + if let Some((base, _)) = f.what.split_once('[').filter(|(b, _)| !b.is_empty() && f.what.ends_with(']')) { + f.what = base.to_string(); + } + match seen.iter().position(|s| s.what == f.what && s.file == f.file) { + Some(k) => { + if !ids[k].contains(&id) { + ids[k].push(id); + seen[k].count += 1; + } + } + None => { + seen.push(f); + ids.push(vec![id]); + } + } + } + if !seen.is_empty() { + d.kind = "tests"; + d.failures = seen; + d.failures.extend(merged); + } else if !merged.is_empty() { + d.kind = "build"; + d.failures = merged; + } else { + let kept: Vec<&String> = lines.iter().filter(|l| !l.trim().is_empty()).collect(); + d.tail = kept[kept.len().saturating_sub(12)..].iter().map(|l| clip(l)).collect(); + } + d +} + +/// The digest as text: the totals, the first `max` failures (name, place, message), and how +/// many more there are — by name for tests. +pub fn render(d: &Digest, max: usize) -> String { + let mut s = String::new(); + if d.failures.is_empty() { + if d.tail.is_empty() { + return "no output\n".into(); + } + let _ = writeln!(s, "not recognised as build or test output; its last lines ({} of {}):", d.tail.len(), d.lines); + for l in &d.tail { + let _ = writeln!(s, " {l}"); + } + return s; + } + let total: usize = d.failures.iter().map(|f| f.count).sum(); + let head = match d.kind { + "tests" => format!("tests: {total} failed"), + _ => format!("build: {}", crate::changes::plural(total, "error")), + }; + match &d.summary { + Some(sum) => { + let _ = writeln!(s, "{head} — {sum}"); + } + None => { + let _ = writeln!(s, "{head}"); + } + } + for f in d.failures.iter().take(max) { + let at = match (&f.file, f.line) { + (Some(p), Some(n)) => format!(" {p}:{n}"), + (Some(p), None) => format!(" {p}"), + _ => String::new(), + }; + let times = match (f.count, d.kind) { + (0 | 1, _) => String::new(), + (n, "tests") => format!(" ({n} cases)"), + (n, _) => format!(" (×{n})"), + }; + let _ = writeln!(s, "✗ {}{at}{times}", f.what); + for m in &f.message { + let _ = writeln!(s, " {m}"); + } + } + let rest = &d.failures[d.failures.len().min(max)..]; + if !rest.is_empty() { + let names: Vec = rest.iter().take(6).map(|f| if f.what.chars().count() > 48 { format!("{}…", f.what.chars().take(48).collect::()) } else { f.what.clone() }).collect(); + let more = if rest.len() > names.len() { format!(" (+{})", rest.len() - names.len()) } else { String::new() }; + let _ = writeln!(s, "… and {} more: {}{more}", rest.len(), names.join(", ")); + } + s +} diff --git a/crates/gitnext-ops/src/edit.rs b/crates/gitnext-ops/src/edit.rs index b1abac2..1c3d10b 100644 --- a/crates/gitnext-ops/src/edit.rs +++ b/crates/gitnext-ops/src/edit.rs @@ -132,6 +132,8 @@ pub fn edit_symbol(root: &Path, g: &Graph, i: usize, kind: EditKind, code: &str, }; let new_text = join(&lines, nl); let changes = write_checked(root, &r.file, &old_text, &new_text, force)?; + let tool = match kind { EditKind::Replace => "replace", EditKind::InsertAfter => "insert_after", EditKind::Delete => "delete" }; + crate::oplog::record(root, tool, &r.sym.qualified, &[(r.file.clone(), old_text, new_text)]); Ok(EditResult { file: r.file.clone(), lines: new_range, changes }) } @@ -146,6 +148,9 @@ pub struct RenameReport { /// Lines that still contain the old name as a word after the rename (strings, /// comments, dynamic access): to check by hand. pub leftover: Vec, + /// Overriding methods in subclasses, renamed with it. + #[serde(skip_serializing_if = "Vec::is_empty", default)] + pub overrides: Vec, /// `--text`: leftover lines that were rewritten too. #[serde(skip_serializing_if = "Vec::is_empty")] pub text_changed: Vec, @@ -166,21 +171,44 @@ pub fn rename_leftover_text(root: &Path, r: &mut RenameReport) -> Result<()> { } } let word = |c: Option| c.is_some_and(|c| c.is_alphanumeric() || c == '_'); + // `empty`, `release`, `close` are also English: in prose only where written as code + // (`empty()`, `Type::empty`, `#empty`, `` `empty` ``); `coerce_path_result` / `isAsciiLetter` anywhere + let distinctive = old.contains('_') || old.chars().skip(1).any(|c| c.is_uppercase() || c.is_ascii_digit()); let mut done = Vec::new(); for (f, lines) in by_file { let path = root.join(&f); let text = std::fs::read_to_string(&path)?; + // only inside comments and string literals: a word in code is some other symbol + // (`fmt.Print` is not `Command.Print`), and that is not ours to change + let spans = gitnext_parse::text_spans(Path::new(&f), &text); + let dynamic = f.ends_with(".py") || gitnext_parse::family_of(&f) == gitnext_parse::family_of("x.js"); + let starts: Vec = std::iter::once(0).chain(text.match_indices('\n').map(|(i, _)| i + 1)).collect(); let mut out: Vec = text.split('\n').map(str::to_string).collect(); for l in lines { + let line_start = starts.get(l - 1).copied().unwrap_or(0); let Some(line) = out.get_mut(l - 1) else { continue }; let mut res = String::with_capacity(line.len()); let mut rest = line.as_str(); let mut changed = false; + let mut consumed = 0usize; while let Some(k) = rest.find(&old) { let before = if k > 0 { rest[..k].chars().next_back() } else { res.chars().next_back() }; let after = rest[k + old.len()..].chars().next(); + let at = line_start + consumed + k; + let in_text = spans.as_ref().is_none_or(|v| v.iter().any(|&(a, b)| a <= at && at + old.len() <= b)); + let pre = &rest[..k]; + let code_shaped = distinctive + || matches!(after, Some('(' | '`')) + || matches!(before, Some('`' | '#' | '.')) + // the whole literal is the name: `getattr(x, 'detect')`, `obj["detect"]` — in Python / JS; + // in Go / Java / Rust that is data (`cmd.Print("Print")` prints a word) + || (dynamic && matches!(before, Some('"' | '\'')) && before == after) + || pre.ends_with("::") + || pre.ends_with("->"); + let in_text = in_text && code_shaped; res.push_str(&rest[..k]); - if !word(before) && !word(after) { + consumed += k + old.len(); + if !word(before) && !word(after) && in_text { res.push_str(&new); changed = true; } else { @@ -195,7 +223,9 @@ pub fn rename_leftover_text(root: &Path, r: &mut RenameReport) -> Result<()> { } } if !r.dry_run { - std::fs::write(&path, out.join("\n"))?; + let new_text = out.join("\n"); + std::fs::write(&path, &new_text)?; + crate::oplog::record(root, "rename --text", &format!("{} → {}", r.old, r.new), &[(f.clone(), text, new_text)]); } } r.leftover.retain(|x| !done.iter().any(|d| x.starts_with(&format!("{d}:")))); @@ -243,11 +273,23 @@ fn dunder_all_lines(lines: &[String]) -> std::collections::HashSet { pub fn rename(root: &Path, g: &Graph, i: usize, new_name: &str, dry_run: bool) -> Result { let target = &g.syms[i]; let old = target.sym.name.clone(); - if new_name.is_empty() || !new_name.bytes().all(is_ident) || new_name.as_bytes()[0].is_ascii_digit() { + // a JS / TS private member (`#count`) stays private: the `#` is part of the name on both sides + let private = old.starts_with('#'); + let bare = if private { new_name.strip_prefix('#').unwrap_or(new_name) } else { new_name }; + if bare.is_empty() || !bare.bytes().all(is_ident) || bare.as_bytes()[0].is_ascii_digit() { bail!("`{new_name}` is not a valid identifier"); } - // the symbol and its prototype / definition twins (C/C++ header + source) - let twins: Vec = (0..g.syms.len()).filter(|&j| g.syms[j].sym.qualified == target.sym.qualified).collect(); + let new_name = &if private { format!("#{bare}") } else { bare.to_string() }; + // the symbol and its prototype / definition twins (C/C++ header + source); a method's + // overrides in subclasses / implementations are renamed with it (dispatch must keep working) + let mut twins: Vec = (0..g.syms.len()).filter(|&j| g.syms[j].sym.qualified == target.sym.qualified).collect(); + if target.sym.kind == gitnext_parse::Kind::Method { + for o in g.overrides(i) { + if !twins.contains(&o) { + twins.push(o); + } + } + } // file → line → set of byte columns to replace let mut edits: BTreeMap>> = BTreeMap::new(); let mut report = RenameReport { old: old.clone(), new: new_name.into(), dry_run, ..Default::default() }; @@ -278,6 +320,11 @@ pub fn rename(root: &Path, g: &Graph, i: usize, new_name: &str, dry_run: bool) - } let only_target = res.iter().all(|x| twins.contains(x)); let loc = format!("{file}:{}", e.line); + if g.foreign_receiver_for_rename(file, e) { + // `c.Flags().HasFlags()` with `Flags() *pflag.FlagSet`: the library's method of the same name + report.skipped.push(format!("{loc} `{}` (the receiver is a library type)", e.to)); + continue; + } if !only_target { report.skipped.push(format!("{loc} `{}` (ambiguous: {} candidates)", e.to, res.len())); continue; @@ -299,9 +346,30 @@ pub fn rename(root: &Path, g: &Graph, i: usize, new_name: &str, dry_run: bool) - // whatever the graph did not reach: `__all__` entries are renamed, everything // else that still spells the old name (strings, comments, dynamic access) is reported + // an import / export of this name: followed when the name is ours alone (no other + // exported definition in the same language family spells it) + let family = gitnext_parse::family_of(&target.file); + let ours_alone = g.find(&old).iter().all(|j| twins.contains(j) || g.syms[*j].sym.test || gitnext_parse::family_of(&g.syms[*j].file) != family || g.syms[*j].sym.visibility.is_none()); for f in g.files.iter().filter(|f| f.parsed) { let lines = lines_of(&f.path); let all_lines: std::collections::HashSet = if f.path.ends_with(".py") { dunder_all_lines(&lines) } else { Default::default() }; + let import_spans = if ours_alone && gitnext_parse::family_of(&f.path) == family && lines.iter().any(|t| !word_hits(t, &old).is_empty()) { + let text = lines.join("\n"); + let starts: Vec = std::iter::once(0).chain(text.match_indices('\n').map(|(i, _)| i + 1)).collect(); + let mut spans = gitnext_parse::import_name_spans(Path::new(&f.path), &text); + if f.path.ends_with(".rs") { + // `use crate::util::{third, slice_eq};` — a name inside a group, from this repository + spans.extend( + gitnext_parse::rust_use_names(&text) + .into_iter() + .filter(|(_, _, first)| matches!(first.as_str(), "crate" | "self" | "super") || g.is_repo_root(first)) + .map(|(a, b, _)| (a, b)), + ); + } + Some((starts, spans)) + } else { + None + }; for (n, text) in lines.iter().enumerate() { let l = n + 1; for c in word_hits(text, &old) { @@ -310,7 +378,11 @@ pub fn rename(root: &Path, g: &Graph, i: usize, new_name: &str, dry_run: bool) - continue; } let quoted = c > 0 && matches!(text.as_bytes()[c - 1], b'"' | b'\'') && text.as_bytes().get(c + old.len()).is_some_and(|b| matches!(b, b'"' | b'\'')); - if all_lines.contains(&l) && quoted { + let in_import = import_spans.as_ref().is_some_and(|(starts, spans)| { + let at = starts[n] + c; + spans.iter().any(|&(a, b)| a == at && b == at + old.len()) + }); + if in_import || (all_lines.contains(&l) && quoted) { edits.entry(f.path.clone()).or_default().entry(l).or_default().push(c); } else if !twins.iter().any(|&t| g.syms[t].file == f.path && l >= g.syms[t].sym.start_line as usize && l <= g.syms[t].sym.start_line as usize + 1) { report.leftover.push(format!("{}:{l}: {}", f.path, text.trim().chars().take(100).collect::())); @@ -321,12 +393,10 @@ pub fn rename(root: &Path, g: &Graph, i: usize, new_name: &str, dry_run: bool) - report.leftover.sort(); report.leftover.dedup(); - // overriding methods in subclasses / trait impls keep the old name: warn - if target.sym.kind == gitnext_parse::Kind::Method { - for o in g.overrides(i) { - let s = &g.syms[o]; - report.skipped.push(format!("{}:{} override {} (rename it too to keep dispatch)", s.file, s.sym.start_line, g.short_name(o))); - } + // overrides are renamed with the method (see `twins`); say so + for &o in twins.iter().filter(|&&o| g.syms[o].sym.qualified != target.sym.qualified) { + let s = &g.syms[o]; + report.overrides.push(format!("{} {}:{}", g.short_name(o), s.file, s.sym.start_line)); } // 3. apply (all files validated before anything is written) let mut outputs: Vec<(String, String, String)> = Vec::new(); @@ -356,6 +426,7 @@ pub fn rename(root: &Path, g: &Graph, i: usize, new_name: &str, dry_run: bool) - for (file, _, new_text) in &outputs { std::fs::write(root.join(file), new_text)?; } + crate::oplog::record(root, "rename", &format!("{} → {}", report.old, report.new), &outputs); } Ok(report) } @@ -382,6 +453,9 @@ pub fn render_rename(r: &RenameReport) -> String { s.push_str(&r.changed.join(", ")); s.push('\n'); } + if !r.overrides.is_empty() { + s.push_str(&format!("overrides renamed too ({}): {}\n", r.overrides.len(), r.overrides.join(", "))); + } if !r.text_changed.is_empty() { s.push_str(&format!("also as text ({}): {}\n", r.text_changed.len(), r.text_changed.join(", "))); } diff --git a/crates/gitnext-ops/src/journal.rs b/crates/gitnext-ops/src/journal.rs index c394e64..0be94ca 100644 --- a/crates/gitnext-ops/src/journal.rs +++ b/crates/gitnext-ops/src/journal.rs @@ -30,6 +30,9 @@ pub struct Entry { pub naive_tokens: usize, #[serde(default)] pub error: bool, + /// operation recorded by this call (`gitnext ops`, `gitnext undo --op N`) + #[serde(default, skip_serializing_if = "Option::is_none")] + pub op: Option, } pub fn path(root: &Path) -> PathBuf { @@ -63,7 +66,7 @@ pub fn sessions(entries: &[Entry]) -> Vec<(String, Vec<&Entry>)> { by.into_iter().rev().map(|((_, s), v)| (s, v)).collect() } -fn hm(ts: i64) -> String { +pub(crate) fn hm(ts: i64) -> String { let d = crate::history_date(ts); let secs = ts.rem_euclid(86_400); format!("{d} {:02}:{:02} UTC", secs / 3600, (secs % 3600) / 60) diff --git a/crates/gitnext-ops/src/learn.rs b/crates/gitnext-ops/src/learn.rs new file mode 100644 index 0000000..ce8eb3e --- /dev/null +++ b/crates/gitnext-ops/src/learn.rs @@ -0,0 +1,144 @@ +//! `gitnext learn-tests`: run the project's tests once with coverage and remember which +//! test runs which function. `tests-for`, `look` and `check` then name the tests that +//! really execute a function instead of the ones the call graph can reach. +//! +//! Each language has its own way to get "this test ran these lines" (`learn/.rs`); +//! what they return is the same — pairs "function, test" — and the rest is shared. + +use std::collections::{BTreeSet, HashMap}; +use std::path::Path; + +use anyhow::{bail, Result}; +use gitnext_index::{Graph, TestMap}; + +mod go; +mod python; +mod rust; + +/// What the test run of one language gave. +pub(crate) struct Run { + /// what measured it (`pytest-cov`), kept in the map + pub source: &'static str, + pub command: String, + pub seconds: f32, + /// the test run itself failed (the pairs are still what ran) + pub tests_failed: bool, + /// (function: its index in the graph, the test's file relative to the repository, the test's + /// name: `test_b` or `TestA::test_b`, parameters and subtests dropped). The file and the last + /// part of the name must be those of the test's symbol in the graph: that is how `tests-for` + /// and `why` find it again. + pub pairs: BTreeSet<(usize, String, String)>, + /// what the user should know about this run, one line each: where an instrumented build was + /// left and how large it is, how many tests could not be run alone or were not found in the graph + pub notes: Vec, +} + +/// The language is in the repository when a file ends so; its tests are run by the function. +type Learner = fn(&Path, &Graph) -> Result; +const LANGUAGES: &[(&str, &str, Learner)] = &[("Python", ".py", python::run), ("Go", ".go", go::run), ("Rust", ".rs", rust::run)]; + +pub struct Learned { + pub command: String, + pub seconds: f32, + /// the test run itself failed (the map is still built from what ran) + pub tests_failed: bool, + pub functions: usize, + pub tests: usize, + pub pairs: usize, + /// functions with a body that no test ran + pub never_run: usize, + /// from the languages' runs, and why a language of the repository gave no map + pub notes: Vec, +} + +/// file → for each line, the innermost function with a body around it (tests are not counted). +/// In Python the first line (`def …:`) runs when the module is loaded, not when the function is +/// called, so a body starts on the line after it. +pub(crate) fn owners(g: &Graph) -> HashMap<&str, Vec>> { + owners_at(g, false) +} + +/// The same with the first line counted when `header`: in a compiled language (Go, Rust) coverage +/// books the first block of a function to the line of its signature, and that line runs only when +/// the function is called. One-line functions are then counted too. +pub(crate) fn owners_at(g: &Graph, header: bool) -> HashMap<&str, Vec>> { + let mut by_file: HashMap<&str, Vec> = HashMap::new(); + for (i, s) in g.syms.iter().enumerate() { + if s.sym.kind.is_callable() && !s.sym.test && (header || s.sym.end_line > s.sym.start_line) { + by_file.entry(s.file.as_str()).or_default().push(i); + } + } + let mut owner_of: HashMap<&str, Vec>> = HashMap::new(); + for (file, syms) in &mut by_file { + syms.sort_by_key(|&i| std::cmp::Reverse(g.syms[i].sym.end_line - g.syms[i].sym.start_line)); // outer first, inner overwrite + let last = syms.iter().map(|&i| g.syms[i].sym.end_line).max().unwrap_or(0) as usize; + let mut lines = vec![None; last + 1]; + for &i in syms.iter() { + for l in g.syms[i].sym.start_line + u32::from(!header)..=g.syms[i].sym.end_line { + lines[l as usize] = Some(i); + } + } + owner_of.insert(file, lines); + } + owner_of +} + +pub fn learn(root: &Path, g: &Graph) -> Result { + let here: Vec<&(&str, &str, Learner)> = LANGUAGES.iter().filter(|(_, ext, _)| g.files.iter().any(|f| f.path.ends_with(ext))).collect(); + if here.is_empty() { + bail!("learn-tests has no way to run the tests of this repository with coverage (it knows: {})", LANGUAGES.iter().map(|l| l.0).collect::>().join(", ")); + } + let (mut runs, mut errors) = (Vec::new(), Vec::new()); + for (name, _, run) in here { + match run(root, g) { + Ok(r) if r.pairs.is_empty() => errors.push(format!("{name}: the coverage run recorded no test that ran a function of this repository (`{}`, {:.0}s)", r.command, r.seconds)), + Ok(r) => runs.push(r), + Err(e) => errors.push(format!("{name}: {e:#}")), + } + } + if runs.is_empty() { + bail!("{}", errors.join("\n")); + } + let rows: Vec<(String, String, String, String)> = + runs.iter().flat_map(|r| r.pairs.iter()).map(|(i, f, n)| (g.unique_name(*i), g.syms[*i].sym.body_hash.clone(), f.clone(), n.clone())).collect(); + let map = TestMap::write(root, &runs.iter().map(|r| r.source).collect::>().join("+"), &rows)?; + // the commit the tests ran on: `why` shows what changed in a function since then + if let Ok(out) = std::process::Command::new("git").args(["rev-parse", "HEAD"]).current_dir(root).output() { + let commit = String::from_utf8_lossy(&out.stdout).trim().to_string(); + if out.status.success() && !commit.is_empty() { + map.set_meta("commit", &commit)?; + } + } + let (functions, tests, n) = map.size(); + // Python counts a body from the line after `def`; the compiled languages from the signature + let header = runs.iter().all(|r| r.source != "pytest-cov"); + let with_body = owners_at(g, header).values().flat_map(|lines| lines.iter().flatten()).collect::>().len(); + Ok(Learned { + command: runs.iter().map(|r| r.command.as_str()).collect::>().join("; "), + seconds: runs.iter().map(|r| r.seconds).sum(), + tests_failed: runs.iter().any(|r| r.tests_failed), + functions, + tests, + pairs: n, + never_run: with_body.saturating_sub(functions), + notes: runs.iter().flat_map(|r| r.notes.iter().cloned()).chain(errors.into_iter().filter(|e| !e.ends_with(": not supported yet"))).collect(), + }) +} + +pub fn render(l: &Learned) -> String { + let mut s = format!( + "learned which tests run which functions: {} functions, {} tests, {} pairs ({:.0}s: {})\n", + l.functions, l.tests, l.pairs, l.seconds, l.command + ); + if l.never_run > 0 { + s.push_str(&format!("{} functions were run by no test — for those `tests-for` still uses the call graph\n", l.never_run)); + } + for n in &l.notes { + s.push_str(&format!("note: {n}\n")); + } + if l.tests_failed { + s.push_str("note: the test run itself reported failures; the map holds what ran\n"); + } + s.push_str("`tests-for`, `look` and `check` now use the map; run `gitnext learn-tests` again after larger changes\n"); + s +} diff --git a/crates/gitnext-ops/src/learn/go.rs b/crates/gitnext-ops/src/learn/go.rs new file mode 100644 index 0000000..98d57a5 --- /dev/null +++ b/crates/gitnext-ops/src/learn/go.rs @@ -0,0 +1,317 @@ +//! Go: one test binary per package, built with coverage of the whole module +//! (`go test -c -cover -coverpkg=/...`), then every test run alone with its own profile. +//! Measured on cobra and chi: the map finds 100% of the tests that fail when a function +//! breaks (the call graph: 78%), for 1.2–5× a plain test run. +//! +//! A block of the profile belongs to the innermost function around its first line. In Go the first +//! block of a function starts on the line of its signature (at the `{`), so that line counts. + +use std::collections::{BTreeSet, HashMap}; +use std::path::{Path, PathBuf}; +use std::process::{Command, Stdio}; +use std::time::{Duration, Instant}; + +use anyhow::{bail, Context, Result}; +use gitnext_index::Graph; + +use super::{owners_at, Run}; + +/// A package's test binary that takes longer than this to build is given up. +const BUILD_LIMIT: Duration = Duration::from_secs(600); +/// One test: the binary stops itself at `-test.timeout`, this is the last resort. +const TEST_TIMEOUT: &str = "5m"; +const TEST_LIMIT: Duration = Duration::from_secs(360); +/// How many test names a note lists before it says "and N more". +const NAMES: usize = 5; + +pub(super) fn run(root: &Path, g: &Graph) -> Result { + run_with("go", root, g) +} + +/// The temporary binaries and profiles; removed however `run` ends. +struct Scratch(PathBuf); + +impl Drop for Scratch { + fn drop(&mut self) { + let _ = std::fs::remove_dir_all(&self.0); + } +} + +/// What a command printed (stdout and stderr together) and how it ended. +struct Ran { + ok: bool, + timed_out: bool, + text: String, +} + +fn timed(cmd: &mut Command, log: &Path, limit: Duration) -> Result { + let out = std::fs::File::create(log)?; + let err = out.try_clone()?; + let mut child = cmd.stdin(Stdio::null()).stdout(out).stderr(err).spawn()?; + let started = Instant::now(); + let (ok, timed_out) = loop { + match child.try_wait()? { + Some(status) => break (status.success(), false), + None if started.elapsed() < limit => std::thread::sleep(Duration::from_millis(20)), + None => { + let _ = child.kill(); + let _ = child.wait(); + break (false, true); + } + } + }; + let text = std::fs::read(log).map(|b| String::from_utf8_lossy(&b).into_owned()).unwrap_or_default(); + let _ = std::fs::remove_file(log); + Ok(Ran { ok, timed_out, text }) +} + +fn last_line(text: &str) -> &str { + text.lines().rev().find(|l| !l.trim().is_empty()).unwrap_or("").trim() +} + +/// Learning can start: a module at the root of the repository and a `go` that runs. +fn ready(go: &str, root: &Path) -> Result<()> { + if !root.join("go.mod").exists() { + bail!("no go.mod at the root of the repository (modules in subdirectories are not learned yet)"); + } + match Command::new(go).arg("version").stdin(Stdio::null()).output() { + Ok(o) if o.status.success() => Ok(()), + Ok(o) => bail!("`{go} version` failed: {}", last_line(&String::from_utf8_lossy(&o.stderr))), + Err(_) => bail!("`{go}` is not in PATH: install Go (https://go.dev/dl/) to learn which test runs which function"), + } +} + +/// One package with tests: its import path and directory relative to the repository (`""` at the root). +struct Package { + import: String, + dir: String, + tests: bool, +} + +/// `go list -f '{{.ImportPath}}\t{{.Dir}}\t{{len .TestGoFiles}}\t{{len .XTestGoFiles}}' ./...` +fn packages(listing: &str, roots: &[String]) -> Vec { + let mut out = Vec::new(); + for line in listing.lines() { + let f: Vec<&str> = line.split('\t').collect(); + let [import, dir, t, x] = f[..] else { continue }; + let Some(rel) = roots.iter().find_map(|r| if dir == r { Some("") } else { dir.strip_prefix(&format!("{r}/")) }) else { continue }; + out.push(Package { import: import.into(), dir: rel.into(), tests: t != "0" || x != "0" }); + } + out +} + +/// A profile → the first line of every block that ran, by file relative to the repository. +/// `example.com/mod/pkg/file.go:12.30,14.2 1 3`; the file is named by its package's import path. +fn profile_lines(text: &str, dir_of: &HashMap<&str, &str>) -> BTreeSet<(String, u32)> { + let mut out = BTreeSet::new(); + for line in text.lines().skip_while(|l| l.starts_with("mode:")) { + let mut parts = line.rsplitn(3, ' '); + let (Some(count), Some(_statements), Some(place)) = (parts.next(), parts.next(), parts.next()) else { continue }; + if count == "0" { + continue; + } + let Some((file, range)) = place.rsplit_once(':') else { continue }; + let Some(Ok(start)) = range.split('.').next().map(str::parse::) else { continue }; + let Some((import, name)) = file.rsplit_once('/') else { continue }; + let Some(dir) = dir_of.get(import) else { continue }; // a file outside the module + out.insert((if dir.is_empty() { name.to_string() } else { format!("{dir}/{name}") }, start)); + } + out +} + +/// Top-level tests that failed in a `-test.v` run (`--- FAIL: TestX (0.00s)`; subtests are indented). +fn failed_in(verbose: &str) -> BTreeSet { + verbose.lines().filter_map(|l| l.strip_prefix("--- FAIL: ")).filter_map(|r| r.split_whitespace().next()).map(String::from).collect() +} + +fn is_test_name(n: &str) -> bool { + ["Test", "Example", "Fuzz"].iter().any(|p| n.starts_with(p)) && n != "TestMain" && n.chars().all(|c| c.is_alphanumeric() || c == '_') +} + +fn some(names: &[String]) -> String { + let more = names.len().saturating_sub(NAMES); + let head = names.iter().take(NAMES).cloned().collect::>().join(", "); + if more > 0 { + format!("{head} and {more} more") + } else { + head + } +} + +fn run_with(go: &str, root: &Path, g: &Graph) -> Result { + ready(go, root)?; + let started = Instant::now(); + let module_out = Command::new(go).args(["list", "-m"]).current_dir(root).stdin(Stdio::null()).output().context("running `go list -m`")?; + let module = String::from_utf8_lossy(&module_out.stdout).lines().next().unwrap_or("").trim().to_string(); + if !module_out.status.success() || module.is_empty() { + bail!("`go list -m` failed: {}", last_line(&String::from_utf8_lossy(&module_out.stderr))); + } + let listing = Command::new(go) + .args(["list", "-e", "-f", "{{.ImportPath}}\t{{.Dir}}\t{{len .TestGoFiles}}\t{{len .XTestGoFiles}}", "./..."]) + .current_dir(root) + .stdin(Stdio::null()) + .output() + .context("running `go list ./...`")?; + let mut roots = vec![root.display().to_string()]; + if let Ok(c) = root.canonicalize() { + roots.push(c.display().to_string()); + } + let pkgs = packages(&String::from_utf8_lossy(&listing.stdout), &roots); + if pkgs.is_empty() { + bail!("`go list ./...` found no package: {}", last_line(&String::from_utf8_lossy(&listing.stderr))); + } + let dir_of: HashMap<&str, &str> = pkgs.iter().map(|p| (p.import.as_str(), p.dir.as_str())).collect(); + + // the test's symbol in the graph: (directory, name) → its `_test.go` file + let mut test_file: HashMap<(&str, &str), &str> = HashMap::new(); + for s in &g.syms { + if s.sym.test && s.sym.kind.is_callable() && s.file.ends_with("_test.go") { + let dir = s.file.rsplit_once('/').map_or("", |(d, _)| d); + test_file.entry((dir, s.sym.name.as_str())).or_insert(s.file.as_str()); + } + } + let owner_of = owners_at(g, true); + + let scratch = Scratch(root.join(".gitnext").join(format!("learn-go-{}", std::process::id()))); + std::fs::create_dir_all(&scratch.0)?; + let log = scratch.0.join("out.log"); + let prof = scratch.0.join("cover.out"); + let coverpkg = format!("-coverpkg={module}/..."); + + let mut pairs = BTreeSet::new(); + let (mut notes, mut not_built, mut with_main, mut unknown, mut alone_only, mut failing) = (Vec::new(), Vec::new(), Vec::new(), Vec::new(), Vec::new(), Vec::new()); + let mut ran = 0usize; + for (k, p) in pkgs.iter().enumerate().filter(|(_, p)| p.tests) { + let cwd = root.join(&p.dir); + let shown = if p.dir.is_empty() { "." } else { p.dir.as_str() }; + let out = scratch.0.join(k.to_string()); + std::fs::create_dir_all(&out)?; + let built = timed(Command::new(go).args(["test", "-c", "-cover", &coverpkg, "-o"]).arg(format!("{}/", out.display())).arg(".").current_dir(&cwd), &log, BUILD_LIMIT)?; + let binary = std::fs::read_dir(&out).ok().and_then(|d| d.flatten().map(|e| e.path()).find(|p| p.extension().is_some_and(|x| x == "test"))); + let Some(binary) = binary.filter(|_| built.ok) else { + not_built.push(format!("{shown} ({})", if built.timed_out { "the build took longer than 10 minutes".to_string() } else { last_line(&built.text).to_string() })); + continue; + }; + if test_file.contains_key(&(p.dir.as_str(), "TestMain")) { + with_main.push(shown.to_string()); + } + let listed = timed(Command::new(&binary).args(["-test.list", "^(Test|Example|Fuzz)"]).current_dir(&cwd), &log, TEST_LIMIT)?; + let mut failed_alone = Vec::new(); + for name in listed.text.lines().map(str::trim).filter(|n| is_test_name(n)) { + let Some(&file) = test_file.get(&(p.dir.as_str(), name)) else { + unknown.push(format!("{shown}: {name}")); + continue; + }; + let _ = std::fs::remove_file(&prof); + let one = timed( + Command::new(&binary).arg(format!("-test.run=^{name}$")).args(["-test.count=1", &format!("-test.timeout={TEST_TIMEOUT}")]).arg(format!("-test.coverprofile={}", prof.display())).current_dir(&cwd), + &log, + TEST_LIMIT, + )?; + ran += 1; + if !one.ok { + failed_alone.push(name.to_string()); + } + let text = std::fs::read_to_string(&prof).unwrap_or_default(); + let _ = std::fs::remove_file(&prof); + for (f, line) in profile_lines(&text, &dir_of) { + if let Some(Some(i)) = owner_of.get(f.as_str()).and_then(|o| o.get(line as usize)) { + pairs.insert((*i, file.to_string(), name.to_string())); + } + } + } + if !failed_alone.is_empty() { + // failing alone and passing with the rest of the package: depends on another test + let all = timed(Command::new(&binary).args(["-test.v", "-test.count=1", "-test.timeout=10m"]).current_dir(&cwd), &log, BUILD_LIMIT)?; + let failed = failed_in(&all.text); + for n in failed_alone { + let passed = all.text.lines().any(|l| l.strip_prefix("--- PASS: ").and_then(|r| r.split_whitespace().next()) == Some(n.as_str())); + if passed && !failed.contains(&n) { + alone_only.push(format!("{shown}: {n}")); + } else { + failing.push(format!("{shown}: {n}")); + } + } + } + } + let _ = std::fs::remove_file(&log); + if !not_built.is_empty() { + notes.push(format!("Go: {} packages' test binaries did not build, their tests are not in the map: {}", not_built.len(), some(¬_built))); + } + if !with_main.is_empty() { + notes.push(format!("Go: {} packages have TestMain, it ran once for every test: {}", with_main.len(), some(&with_main))); + } + if !alone_only.is_empty() { + notes.push(format!("Go: {} tests fail when run alone but pass with their package (they depend on another test; what they ran alone is kept): {}", alone_only.len(), some(&alone_only))); + } + if !failing.is_empty() { + notes.push(format!("Go: {} tests fail: {}", failing.len(), some(&failing))); + } + if !unknown.is_empty() { + notes.push(format!("Go: {} tests have no symbol in the index and were not run: {}", unknown.len(), some(&unknown))); + } + Ok(Run { + source: "go test -cover", + command: format!("go test -c -cover {coverpkg} per package, then each test alone: .test -test.run '^Name$' -test.coverprofile=… ({ran} tests)"), + seconds: started.elapsed().as_secs_f32(), + tests_failed: !alone_only.is_empty() || !failing.is_empty(), + pairs, + notes, + }) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn a_profile_gives_the_first_line_of_the_blocks_that_ran_by_file_of_the_repository() { + let dir_of: HashMap<&str, &str> = [("example.com/demo", ""), ("example.com/demo/calc", "calc")].into_iter().collect(); + let text = "mode: set\n\ + example.com/demo/calc/calc.go:5.24,5.40 1 1\n\ + example.com/demo/calc/calc.go:7.24,9.2 1 0\n\ + example.com/demo/main.go:3.13,5.2 2 1\n\ + golang.org/x/other/x.go:1.1,2.2 1 1\n"; + let got: Vec<(String, u32)> = profile_lines(text, &dir_of).into_iter().collect(); + assert_eq!(got, vec![("calc/calc.go".to_string(), 5), ("main.go".to_string(), 3)]); + } + + #[test] + fn packages_are_named_by_their_directory_relative_to_the_repository() { + let roots = vec!["/r/demo".to_string(), "/private/r/demo".to_string()]; + let listing = "example.com/demo\t/r/demo\t0\t0\nexample.com/demo/calc\t/private/r/demo/calc\t2\t1\nexample.com/demo/x\t/elsewhere/x\t1\t0\n"; + let got: Vec<(String, String, bool)> = packages(listing, &roots).into_iter().map(|p| (p.import, p.dir, p.tests)).collect(); + assert_eq!(got, vec![("example.com/demo".into(), "".into(), false), ("example.com/demo/calc".into(), "calc".into(), true)]); + } + + #[test] + fn only_top_level_failures_of_a_verbose_run_are_counted() { + let v = "=== RUN TestA\n--- FAIL: TestA (0.00s)\n --- FAIL: TestA/sub (0.00s)\n--- PASS: TestB (0.01s)\nFAIL\n"; + assert_eq!(failed_in(v).into_iter().collect::>(), vec!["TestA".to_string()]); + } + + #[test] + fn tests_examples_and_fuzz_targets_are_run_but_not_test_main() { + assert!(is_test_name("TestDouble") && is_test_name("ExampleCommand_Execute") && is_test_name("FuzzParse")); + assert!(!is_test_name("TestMain") && !is_test_name("BenchmarkX") && !is_test_name("ok \texample.com/demo")); + } + + #[test] + fn without_go_mod_or_go_the_message_says_what_is_missing() { + let dir = std::env::temp_dir().join(format!("gitnext-learn-go-ready-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).unwrap(); + let e = ready("go", &dir).unwrap_err().to_string(); + assert!(e.contains("no go.mod"), "{e}"); + std::fs::write(dir.join("go.mod"), "module example.com/demo\n").unwrap(); + let e = ready("/nonexistent/bin/go", &dir).unwrap_err().to_string(); + assert!(e.contains("is not in PATH") && e.contains("go.dev"), "{e}"); + let _ = std::fs::remove_dir_all(&dir); + } + + #[test] + fn a_long_list_of_names_is_cut() { + let names: Vec = (1..=7).map(|i| format!("T{i}")).collect(); + assert_eq!(some(&names), "T1, T2, T3, T4, T5 and 2 more"); + } +} diff --git a/crates/gitnext-ops/src/learn/python.rs b/crates/gitnext-ops/src/learn/python.rs new file mode 100644 index 0000000..73bdc90 --- /dev/null +++ b/crates/gitnext-ops/src/learn/python.rs @@ -0,0 +1,67 @@ +//! Python: pytest with pytest-cov, one context per test (`--cov-context=test`). Measured on click: +//! the map finds 100% of the tests that fail when a function breaks (the call graph: 19%), 98% of +//! the tests it names do fail, for one test run that takes about 2.3× longer. + +use std::collections::BTreeSet; +use std::path::Path; +use std::process::Command; +use std::time::Instant; + +use anyhow::{bail, Context, Result}; +use gitnext_index::Graph; + +use super::{owners, Run}; + +fn python(root: &Path) -> String { + [".venv/bin/python", "venv/bin/python"].iter().find(|p| root.join(p).exists()).map(|p| p.to_string()).unwrap_or_else(|| "python3".into()) +} + +/// `tests/test_x.py::TestA::test_b[param]|run` → (`tests/test_x.py`, `TestA::test_b`) +fn test_of(context: &str) -> Option<(String, String)> { + let id = context.split('|').next()?; + let (file, rest) = id.split_once("::")?; + let name = rest.split('[').next()?; + (!name.is_empty()).then(|| (file.to_string(), name.to_string())) +} + +pub(super) fn run(root: &Path, g: &Graph) -> Result { + let py = python(root); + let has = |module: &str| Command::new(&py).args(["-c", &format!("import {module}")]).current_dir(root).output().map(|o| o.status.success()).unwrap_or(false); + if !has("pytest") { + bail!("pytest is not installed for `{py}`: {py} -m pip install pytest pytest-cov"); + } + if !has("pytest_cov") { + bail!("pytest-cov is not installed for `{py}`: {py} -m pip install pytest-cov"); + } + let data = root.join(".gitnext").join("coverage.db"); + std::fs::create_dir_all(root.join(".gitnext"))?; + for old in ["coverage.db", "coverage.db-journal"] { + let _ = std::fs::remove_file(root.join(".gitnext").join(old)); + } + let args = ["-m", "pytest", "-q", "-p", "no:cacheprovider", "--cov=.", "--cov-context=test", "--cov-report="]; + let command = format!("{py} {}", args.join(" ")); + let started = Instant::now(); + let out = Command::new(&py).args(args).env("COVERAGE_FILE", &data).current_dir(root).output().with_context(|| format!("running `{command}`"))?; + let seconds = started.elapsed().as_secs_f32(); + if !data.exists() { + let text = String::from_utf8_lossy(&out.stdout); + let tail: Vec<&str> = text.lines().rev().take(8).collect(); + bail!("`{command}` wrote no coverage data:\n{}", tail.into_iter().rev().collect::>().join("\n")); + } + let coverage = gitnext_index::read_coverage(&data)?; + let _ = std::fs::remove_file(&data); + + let prefix = format!("{}/", root.canonicalize().unwrap_or_else(|_| root.to_path_buf()).display()); + let owner_of = owners(g); + let mut pairs: BTreeSet<(usize, String, String)> = BTreeSet::new(); + for (file, context, lines) in &coverage { + let rel = file.strip_prefix(&prefix).unwrap_or(file); + let (Some(owners), Some((tfile, tname))) = (owner_of.get(rel), test_of(context)) else { continue }; + for &l in lines { + if let Some(Some(i)) = owners.get(l as usize) { + pairs.insert((*i, tfile.clone(), tname.clone())); + } + } + } + Ok(Run { source: "pytest-cov", command, seconds, tests_failed: !out.status.success(), pairs, notes: Vec::new() }) +} diff --git a/crates/gitnext-ops/src/learn/rust.rs b/crates/gitnext-ops/src/learn/rust.rs new file mode 100644 index 0000000..a43e0b1 --- /dev/null +++ b/crates/gitnext-ops/src/learn/rust.rs @@ -0,0 +1,476 @@ +//! Rust: the tests built with `-C instrument-coverage` in a target of their own, each test run +//! alone with its own profile, `llvm-profdata` + `llvm-cov export` (rustup's `llvm-tools-preview`) +//! turn the profile into the lines it ran. Measured on semver and indexmap: the map finds +//! 100% of the tests that fail when a function breaks (the call graph: 59%); the first +//! instrumented build takes 12–21 s and about 350 MB, a later map 2–5× a plain test run. +//! Doc-tests are not run. + +use std::collections::{BTreeSet, HashMap}; +use std::path::{Path, PathBuf}; +use std::process::{Command, Stdio}; +use std::sync::{mpsc, Mutex}; +use std::time::{Duration, Instant}; + +use anyhow::{bail, Context, Result}; +use gitnext_index::Graph; + +use super::{owners_at, Run}; + +/// One test may run this long; then it is stopped and counted as failed. +const TEST_TIMEOUT: Duration = Duration::from_secs(300); + +/// A test binary `cargo test --no-run` built. +#[derive(Debug, PartialEq)] +struct Binary { + exe: PathBuf, + /// the package's directory: tests run there, as under `cargo test` + package: PathBuf, + /// the target's root file (`src/lib.rs`, `tests/foo.rs`) + src: PathBuf, + /// `lib`, `bin`, `test`, `bench`, `example` + kind: String, +} + +/// `llvm-profdata` and `llvm-cov` of the toolchain whose sysroot is given. +fn llvm_tools(sysroot: &Path) -> Result<(PathBuf, PathBuf)> { + let find = |name: &str| -> Option { + let dirs = std::fs::read_dir(sysroot.join("lib").join("rustlib")).ok()?; + let mut hits: Vec = dirs.flatten().map(|d| d.path().join("bin").join(name)).filter(|p| p.is_file()).collect(); + hits.sort(); + hits.into_iter().next() + }; + match (find("llvm-profdata"), find("llvm-cov")) { + (Some(p), Some(c)) => Ok((p, c)), + _ => bail!("llvm-profdata and llvm-cov are not installed for the toolchain in {}: rustup component add llvm-tools-preview", sysroot.display()), + } +} + +/// The test binaries in the JSON messages of `cargo test --no-run --message-format=json`. +fn test_binaries(messages: &str) -> Vec { + let mut out = Vec::new(); + for line in messages.lines() { + let Ok(m) = serde_json::from_str::(line) else { continue }; + if m["reason"] != "compiler-artifact" || m["profile"]["test"] != true { + continue; + } + let (Some(exe), Some(manifest), Some(src)) = (m["executable"].as_str(), m["manifest_path"].as_str(), m["target"]["src_path"].as_str()) else { continue }; + let package = Path::new(manifest).parent().map(Path::to_path_buf).unwrap_or_default(); + let kind = m["target"]["kind"][0].as_str().unwrap_or("lib").to_string(); + out.push(Binary { exe: exe.into(), package, src: src.into(), kind }); + } + out +} + +/// The compiler's errors among the same messages, for when the build fails. +fn build_errors(messages: &str) -> String { + let errors: Vec = messages + .lines() + .filter_map(|l| serde_json::from_str::(l).ok()) + .filter(|m| m["reason"] == "compiler-message" && m["message"]["level"] == "error") + .filter_map(|m| m["message"]["rendered"].as_str().map(str::to_string)) + .take(3) + .collect(); + errors.join("") +} + +/// `a::b: test` lines of `--list --format terse` → `a::b` (benchmarks dropped). +fn listed(text: &str) -> Vec { + text.lines().filter_map(|l| l.strip_suffix(": test")).map(str::to_string).collect() +} + +/// lcov → for each file under `prefix` (an absolute directory with a trailing `/`), its path +/// relative to it and the lines that ran. +fn lcov_lines(text: &str, prefix: &str) -> HashMap> { + let mut out: HashMap> = HashMap::new(); + let mut cur: Option = None; + for line in text.lines() { + if let Some(p) = line.strip_prefix("SF:") { + cur = p.strip_prefix(prefix).map(str::to_string); + } else if let (Some(da), Some(file)) = (line.strip_prefix("DA:"), &cur) { + let mut f = da.split(','); + if let (Some(Ok(n)), Some(c)) = (f.next().map(str::parse::), f.next()) { + if c != "0" { + out.entry(file.clone()).or_default().push(n); + } + } + } else if line == "end_of_record" { + cur = None; + } + } + out +} + +/// Of the graph's tests with the name the test ends with — (file, qualified name), already only +/// those of the binary's files — the one that is this test: the most trailing parts of cargo's path +/// (`display::tests::test_align`) agree, then the fewest parts left over (`crate::set::tests::x` +/// before `crate::rayon::set::tests::x`), then the first file. +fn pick<'a>(candidates: &[(&'a str, &'a str)], cargo_name: &str) -> Option<&'a str> { + let want: Vec<&str> = cargo_name.rsplit("::").collect(); + let score = |q: &str| { + let n = q.rsplit("::").zip(&want).take_while(|(a, b)| a == *b).count(); + (n, std::cmp::Reverse(q.split("::").count() - n)) + }; + candidates.iter().map(|&(f, q)| (score(q), std::cmp::Reverse(f), f)).filter(|(s, _, _)| s.0 > 0).max().map(|(_, _, f)| f) +} + +/// The source files cargo compiled into a binary, from the dep-info file it writes next to it +/// (`deps/demo-1a2b.d`), relative to the repository (`prefix`: its absolute path with a trailing +/// `/`). rustc writes the paths cargo gave it: absolute, or relative to the workspace root, which is +/// the repository's root here; spaces are escaped. `None` when there is no such file. +fn compiled_files(dep_info: &str, prefix: &str) -> Option> { + let mut out = std::collections::HashSet::new(); + for line in dep_info.lines() { + let Some((_, deps)) = line.split_once(": ") else { continue }; + let deps = deps.replace("\\ ", "\u{0}"); + for d in deps.split_whitespace().map(|d| d.replace('\u{0}', " ")).filter(|d| d.ends_with(".rs")) { + match d.strip_prefix(prefix) { + Some(rel) => out.insert(rel.to_string()), + None if !d.starts_with('/') => out.insert(d.trim_start_matches("./").to_string()), + None => false, + }; + } + } + (!out.is_empty()).then_some(out) +} + +/// The files a test binary is made of: an integration test is its file, the files of its +/// directory (`tests/foo/…`) and the shared ones in `tests/`; a library's or program's unit tests are +/// the package's other files. Paths are relative to the repository; `packages` are the repository's +/// package directories, so a file of a nested package is not taken for one of the outer. +fn belongs(file: &str, bin: &Binary, root: &str, packages: &[String]) -> bool { + let rel = |p: &Path| p.to_string_lossy().strip_prefix(root).unwrap_or_default().trim_start_matches('/').to_string(); + let pkg = rel(&bin.package); + let owner = packages.iter().filter(|p| p.is_empty() || file.starts_with(&format!("{p}/"))).max_by_key(|p| p.len()); + if owner != Some(&pkg) { + return false; + } + let tests = if pkg.is_empty() { "tests/".to_string() } else { format!("{pkg}/tests/") }; + if bin.kind == "test" { + let src = rel(&bin.src); + // `tests/it.rs`, `tests/it/…`, and modules shared through a directory (`tests/common/mod.rs`) + file == src || file.starts_with(&format!("{}/", src.trim_end_matches(".rs"))) || file.strip_prefix(&tests).is_some_and(|r| r.contains('/')) + } else { + !file.starts_with(&tests) + } +} + +/// Size of a directory tree in bytes; cargo hard-links its binaries into `debug/`, they are counted once. +fn du(dir: &Path, seen: &mut std::collections::HashSet<(u64, u64)>) -> u64 { + let Ok(entries) = std::fs::read_dir(dir) else { return 0 }; + let mut n = 0; + for e in entries.flatten() { + match e.file_type() { + Ok(t) if t.is_dir() => n += du(&e.path(), seen), + Ok(t) if t.is_file() => { + let Ok(m) = e.metadata() else { continue }; + #[cfg(unix)] + { + use std::os::unix::fs::MetadataExt; + if !seen.insert((m.dev(), m.ino())) { + continue; + } + } + n += m.len(); + } + _ => {} + } + } + n +} + +/// The profiles' directory goes away whatever happens. +struct Scratch(PathBuf); +impl Drop for Scratch { + fn drop(&mut self) { + let _ = std::fs::remove_dir_all(&self.0); + } +} + +fn output(cmd: &mut Command) -> Option { + cmd.output().ok().filter(|o| o.status.success()).map(|o| String::from_utf8_lossy(&o.stdout).into_owned()) +} + +/// Runs one test alone; `Some(passed)`, `None` when it was stopped after `TEST_TIMEOUT`. +fn run_one(bin: &Binary, name: &str, profile: &Path) -> Result> { + let mut child = Command::new(&bin.exe) + .args(["--exact", name, "--test-threads=1", "-q"]) + .env("LLVM_PROFILE_FILE", profile) + .env("CARGO_MANIFEST_DIR", &bin.package) + .current_dir(&bin.package) + .stdin(Stdio::null()) + .stdout(Stdio::null()) + .stderr(Stdio::null()) + .spawn() + .with_context(|| format!("running {}", bin.exe.display()))?; + let started = Instant::now(); + let mut nap = Duration::from_millis(1); + loop { + if let Some(status) = child.try_wait()? { + return Ok(Some(status.success())); + } + if started.elapsed() > TEST_TIMEOUT { + let _ = child.kill(); + let _ = child.wait(); + return Ok(None); + } + std::thread::sleep(nap); + nap = (nap * 2).min(Duration::from_millis(50)); + } +} + +/// The lines one profile ran, the profile removed. +fn export(tools: &(PathBuf, PathBuf), exe: &Path, raw: &Path, prefix: &str) -> HashMap> { + let data = raw.with_extension("profdata"); + let merged = Command::new(&tools.0).arg("merge").arg("-sparse").arg(raw).arg("-o").arg(&data).stdout(Stdio::null()).stderr(Stdio::null()).status().map(|s| s.success()).unwrap_or(false); + let lines = if merged { + output(Command::new(&tools.1).arg("export").arg("-format=lcov").arg(format!("-instr-profile={}", data.display())).arg(exe).arg("--ignore-filename-regex=/.cargo/|/rustc/").stderr(Stdio::null())) + .map(|t| lcov_lines(&t, prefix)) + .unwrap_or_default() + } else { + HashMap::new() + }; + let _ = std::fs::remove_file(raw); + let _ = std::fs::remove_file(&data); + lines +} + +fn mb(bytes: u64) -> u64 { + (bytes + 500_000) / 1_000_000 +} + +fn some(names: &[String]) -> String { + let mut s = names.iter().take(5).cloned().collect::>().join(", "); + if names.len() > 5 { + s.push_str(", …"); + } + s +} + +pub(super) fn run(root: &Path, g: &Graph) -> Result { + if !root.join("Cargo.toml").is_file() { + bail!("no Cargo.toml at the root of the repository"); + } + if output(Command::new("cargo").arg("--version")).is_none() { + bail!("cargo is not installed: https://rustup.rs"); + } + let sysroot = output(Command::new("rustc").args(["--print", "sysroot"]).current_dir(root)).context("`rustc --print sysroot` failed")?; + let tools = llvm_tools(Path::new(sysroot.trim()))?; + let started = Instant::now(); + + let meta: serde_json::Value = output(Command::new("cargo").args(["metadata", "--format-version", "1", "--no-deps"]).current_dir(root).stderr(Stdio::null())) + .and_then(|t| serde_json::from_str(&t).ok()) + .unwrap_or_default(); + let target = meta["target_directory"].as_str().map(PathBuf::from).unwrap_or_else(|| root.join("target")); + let cov = target.join("gitnext-cov"); + let scratch = Scratch(cov.join(format!("profiles-{}", std::process::id()))); + std::fs::create_dir_all(&scratch.0)?; + + let flags = format!("{} -C instrument-coverage", std::env::var("RUSTFLAGS").unwrap_or_default()).trim().to_string(); + let command = format!("RUSTFLAGS='{flags}' CARGO_TARGET_DIR={} cargo test --workspace --no-run; each test alone: --exact ", cov.display()); + let built = Command::new("cargo") + .args(["test", "--workspace", "--no-run", "--message-format=json"]) + .env("RUSTFLAGS", &flags) + .env_remove("CARGO_ENCODED_RUSTFLAGS") + .env("CARGO_TARGET_DIR", &cov) + .env("LLVM_PROFILE_FILE", scratch.0.join("build-%p.profraw")) // build scripts are instrumented too + .current_dir(root) + .stderr(Stdio::piped()) + .output() + .context("running cargo test --no-run")?; + let messages = String::from_utf8_lossy(&built.stdout); + let bins = test_binaries(&messages); + if !built.status.success() || bins.is_empty() { + let why = build_errors(&messages); + let why = if why.is_empty() { String::from_utf8_lossy(&built.stderr).lines().rev().take(8).collect::>().into_iter().rev().collect::>().join("\n") } else { why }; + bail!("the tests did not build with coverage (`{command}`):\n{}", why.trim_end()); + } + + let canonical = root.canonicalize().unwrap_or_else(|_| root.to_path_buf()); + let root_s = canonical.to_string_lossy().to_string(); + let prefix = format!("{root_s}/"); + let rel = |p: &str| p.strip_prefix(&prefix).unwrap_or(if p == root_s { "" } else { p }).to_string(); + let packages: Vec = meta["packages"].as_array().map(|ps| ps.iter().filter_map(|p| p["manifest_path"].as_str()).map(|m| rel(Path::new(m).parent().map(|d| d.to_string_lossy().to_string()).unwrap_or_default().as_str())).collect()).unwrap_or_else(|| vec![String::new()]); + let bins: Vec = bins.into_iter().map(|b| Binary { package: b.package.canonicalize().unwrap_or(b.package), src: b.src.canonicalize().unwrap_or(b.src), ..b }).collect(); + + // the graph's tests by name + let mut tests_named: HashMap<&str, Vec<(&str, &str)>> = HashMap::new(); + for s in &g.syms { + if s.sym.test && s.sym.kind.is_callable() { + tests_named.entry(s.sym.name.as_str()).or_default().push((s.file.as_str(), s.sym.qualified.as_str())); + } + } + + // run the tests one by one; their profiles are exported by the other threads meanwhile + let workers = std::thread::available_parallelism().map(|n| n.get()).unwrap_or(1).clamp(1, 4); + let (to_export, jobs) = mpsc::channel::<(usize, PathBuf, PathBuf)>(); + let jobs = Mutex::new(jobs); + let mut runs: Vec<(String, String, Option)> = Vec::new(); // (file, name, passed) + let (mut unknown, mut ignored, mut timed_out) = (Vec::new(), 0usize, Vec::new()); + let lines: Vec<(usize, HashMap>)> = std::thread::scope(|s| -> Result<_> { + let handles: Vec<_> = (0..workers) + .map(|_| { + s.spawn(|| { + let mut got = Vec::new(); + loop { + let job = jobs.lock().map(|j| j.recv()); + let Ok(Ok((k, exe, raw))) = job else { break }; + got.push((k, if raw.exists() { export(&tools, &exe, &raw, &prefix) } else { HashMap::new() })); + } + got + }) + }) + .collect(); + for (b, bin) in bins.iter().enumerate() { + let compiled = std::fs::read_to_string(bin.exe.with_extension("d")).ok().and_then(|t| compiled_files(&t, &prefix)); + let of_binary = |f: &str| compiled.as_ref().map_or_else(|| belongs(f, bin, &root_s, &packages), |c| c.contains(f)); + let list =|extra: &[&str]| output(Command::new(&bin.exe).args(["--list", "--format", "terse"]).args(extra).current_dir(&bin.package).stderr(Stdio::null())).map(|t| listed(&t)).unwrap_or_default(); + let skip: BTreeSet = list(&["--ignored"]).into_iter().collect(); + for (t, name) in list(&[]).into_iter().enumerate() { + if skip.contains(&name) { + ignored += 1; + continue; + } + let short = name.rsplit("::").next().unwrap_or(&name).to_string(); + let cands: Vec<(&str, &str)> = tests_named.get(short.as_str()).map(|c| c.iter().copied().filter(|(f, _)| of_binary(f)).collect()).unwrap_or_default(); + let Some(file) = pick(&cands, &name) else { + unknown.push(name); + continue; + }; + let raw = scratch.0.join(format!("{b}-{t}.profraw")); + let passed = run_one(bin, &name, &raw)?; + if passed.is_none() { + timed_out.push(name.clone()); + } + let _ = to_export.send((runs.len(), bin.exe.clone(), raw)); + runs.push((file.to_string(), short, passed)); + } + } + drop(to_export); + Ok(handles.into_iter().flat_map(|h| h.join().unwrap_or_default()).collect()) + })?; + drop(scratch); + + let owner_of = owners_at(g, true); + let mut pairs: BTreeSet<(usize, String, String)> = BTreeSet::new(); + let mut silent = Vec::new(); + for (k, files) in &lines { + let (tfile, tname, _) = &runs[*k]; + if files.is_empty() { + silent.push(tname.clone()); + } + for (file, ls) in files { + let Some(owners) = owner_of.get(file.as_str()) else { continue }; + for &l in ls { + if let Some(Some(i)) = owners.get(l as usize) { + pairs.insert((*i, tfile.clone(), tname.clone())); + } + } + } + } + silent.sort(); + + let mut notes = vec![format!("the build with coverage is kept in {} ({} MB) to make the next map faster; `rm -rf {}` frees the space", cov.display(), mb(du(&cov, &mut Default::default())), cov.display())]; + if !unknown.is_empty() { + notes.push(format!("{} of {} tests are not functions the graph knows (made by a macro?) and were not run: {}", unknown.len(), unknown.len() + runs.len(), some(&unknown))); + } + if !silent.is_empty() { + notes.push(format!("{} tests wrote no coverage (the process aborted?): {}", silent.len(), some(&silent))); + } + if !timed_out.is_empty() { + notes.push(format!("{} tests were stopped after {} s: {}", timed_out.len(), TEST_TIMEOUT.as_secs(), some(&timed_out))); + } + if ignored > 0 { + notes.push(format!("{ignored} #[ignore] tests were not run; doc-tests are not run either")); + } + Ok(Run { source: "llvm-cov", command, seconds: started.elapsed().as_secs_f32(), tests_failed: runs.iter().any(|r| r.2 != Some(true)), pairs, notes }) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn lcov_keeps_the_lines_that_ran_in_files_of_the_repository() { + let text = "TN:\nSF:/repo/src/lib.rs\nFN:3,f\nDA:3,1\nDA:4,0\nDA:5,12\nend_of_record\nSF:/home/u/.cargo/registry/x.rs\nDA:1,1\nend_of_record\nSF:/repo/tests/it.rs\nDA:7,1\nend_of_record\nDA:9,1\n"; + let got = lcov_lines(text, "/repo/"); + assert_eq!(got.len(), 2); + assert_eq!(got["src/lib.rs"], [3, 5]); + assert_eq!(got["tests/it.rs"], [7]); + } + + #[test] + fn the_test_binaries_are_read_from_cargos_messages() { + let msgs = [ + r#"{"reason":"compiler-artifact","manifest_path":"/r/Cargo.toml","target":{"kind":["lib"],"src_path":"/r/src/lib.rs"},"profile":{"test":true},"executable":"/r/target/debug/deps/demo-1"}"#, + r#"{"reason":"compiler-artifact","manifest_path":"/r/Cargo.toml","target":{"kind":["lib"],"src_path":"/r/src/lib.rs"},"profile":{"test":false},"executable":null}"#, + r#"{"reason":"compiler-artifact","manifest_path":"/r/b/Cargo.toml","target":{"kind":["test"],"src_path":"/r/b/tests/it.rs"},"profile":{"test":true},"executable":"/r/target/debug/deps/it-2"}"#, + " Compiling demo v0.1.0", + r#"{"reason":"build-finished","success":true}"#, + ] + .join("\n"); + let got = test_binaries(&msgs); + assert_eq!(got.len(), 2); + assert_eq!(got[0], Binary { exe: "/r/target/debug/deps/demo-1".into(), package: "/r".into(), src: "/r/src/lib.rs".into(), kind: "lib".into() }); + assert_eq!((got[1].package.to_str(), got[1].kind.as_str()), (Some("/r/b"), "test")); + let err = r#"{"reason":"compiler-message","message":{"level":"error","rendered":"error[E0425]: cannot find value `x`\n"}}"#; + assert_eq!(build_errors(err), "error[E0425]: cannot find value `x`\n"); + } + + #[test] + fn the_list_names_the_tests_not_the_benchmarks() { + assert_eq!(listed("display::tests::test_align: test\nbench_parse: benchmark\n\n"), ["display::tests::test_align"]); + } + + #[test] + fn without_llvm_tools_the_message_says_how_to_install_them() { + let dir = std::env::temp_dir().join(format!("gitnext-sysroot-{}", std::process::id())); + let bin = dir.join("lib/rustlib/x86_64-unknown-linux-gnu/bin"); + std::fs::create_dir_all(&bin).unwrap(); + std::fs::write(bin.join("llvm-cov"), "").unwrap(); + let err = llvm_tools(&dir).unwrap_err().to_string(); + assert!(err.contains("rustup component add llvm-tools-preview"), "{err}"); + std::fs::write(bin.join("llvm-profdata"), "").unwrap(); + assert_eq!(llvm_tools(&dir).unwrap(), (bin.join("llvm-profdata"), bin.join("llvm-cov"))); + let _ = std::fs::remove_dir_all(&dir); + } + + #[test] + fn the_test_is_the_one_whose_path_agrees_most() { + let c = [("src/a.rs", "demo::a::tests::test_x"), ("src/b.rs", "demo::b::tests::test_x")]; + assert_eq!(pick(&c, "b::tests::test_x"), Some("src/b.rs")); + assert_eq!(pick(&c, "a::tests::test_x"), Some("src/a.rs")); + // only the name agrees: the first file + assert_eq!(pick(&c, "test_x"), Some("src/a.rs")); + assert_eq!(pick(&c, "test_y"), None); + assert_eq!(pick(&[], "test_x"), None); + // indexmap: `set::tests::comparisons` is not the one of the `rayon` module + let c = [("src/rayon/set.rs", "indexmap::rayon::set::tests::comparisons"), ("src/set/tests.rs", "indexmap::set::tests::comparisons")]; + assert_eq!(pick(&c, "set::tests::comparisons"), Some("src/set/tests.rs")); + assert_eq!(pick(&c, "rayon::set::tests::comparisons"), Some("src/rayon/set.rs")); + } + + #[test] + fn the_files_of_a_binary_come_from_its_dep_info() { + let d = "/r/target/debug/deps/demo-1: /r/src/lib.rs src/set/tests.rs /r/my\\ dir/x.rs /home/u/.cargo/registry/y.rs\n\n/r/target/debug/deps/demo-1.d: /r/src/lib.rs\n\n/r/src/lib.rs:\nsrc/set/tests.rs:\n"; + let got = compiled_files(d, "/r/").unwrap(); + let mut got: Vec<_> = got.into_iter().collect(); + got.sort(); + assert_eq!(got, ["my dir/x.rs", "src/lib.rs", "src/set/tests.rs"]); + assert_eq!(compiled_files("", "/r/"), None); + } + + #[test] + fn a_binary_is_made_of_its_own_files() { + let packages = vec![String::new(), "sub".to_string()]; + let lib = Binary { exe: "/r/t/demo".into(), package: "/r".into(), src: "/r/src/lib.rs".into(), kind: "lib".into() }; + let it = Binary { exe: "/r/t/it".into(), package: "/r".into(), src: "/r/tests/it.rs".into(), kind: "test".into() }; + assert!(belongs("src/display.rs", &lib, "/r", &packages)); + assert!(!belongs("tests/it.rs", &lib, "/r", &packages)); + assert!(!belongs("sub/src/lib.rs", &lib, "/r", &packages)); + assert!(belongs("tests/it.rs", &it, "/r", &packages)); + assert!(belongs("tests/it/helpers.rs", &it, "/r", &packages)); + assert!(belongs("tests/common/mod.rs", &it, "/r", &packages)); + assert!(!belongs("tests/other.rs", &it, "/r", &packages)); + assert!(!belongs("src/lib.rs", &it, "/r", &packages)); + } +} diff --git a/crates/gitnext-ops/src/lib.rs b/crates/gitnext-ops/src/lib.rs index 579bca4..3d1134c 100644 --- a/crates/gitnext-ops/src/lib.rs +++ b/crates/gitnext-ops/src/lib.rs @@ -11,17 +11,23 @@ use serde::Serialize; pub mod agents; pub mod bench; pub mod changes; +pub mod check; +pub mod digest; pub mod context; pub mod edit; pub mod explain; pub mod history; pub mod insight; pub mod journal; +pub mod learn; pub mod libs; pub mod locate; pub mod look; pub mod lsp; +pub mod oplog; pub mod render; +pub mod trust; +pub mod why; use std::path::{Path, PathBuf}; diff --git a/crates/gitnext-ops/src/locate.rs b/crates/gitnext-ops/src/locate.rs index 09bd5dc..e692a34 100644 --- a/crates/gitnext-ops/src/locate.rs +++ b/crates/gitnext-ops/src/locate.rs @@ -16,24 +16,29 @@ pub struct Frame { pub symbol: Option, } -const CODE_EXT: &[&str] = &["rs", "py", "pyi", "c", "h", "cc", "cpp", "cxx", "hpp", "hh", "hxx", "ipp", "inl"]; +const CODE_EXT: &[&str] = &["rs", "py", "pyi", "c", "h", "cc", "cpp", "cxx", "hpp", "hh", "hxx", "ipp", "inl", "go", "java", "kt", "ts", "tsx", "js", "jsx", "mjs", "cjs"]; /// Map a path as printed by a tool (absolute, ./relative, site-packages…) to an indexed file. -fn match_file(g: &Graph, root: &Path, raw: &str) -> Option { +pub(crate) fn match_file(g: &Graph, root: &Path, raw: &str) -> Option { let raw = raw.trim().trim_matches(['"', '\'', '(', ')', '`']); let p = raw.strip_prefix(&format!("{}/", root.display())).unwrap_or(raw).trim_start_matches("./"); if g.files.iter().any(|f| f.path == p) { return Some(p.to_string()); } // longest indexed path that is a suffix of the printed one - g.files - .iter() - .filter(|f| p.ends_with(&format!("/{}", f.path)) || p.ends_with(&f.path) && p.len() == f.path.len()) - .max_by_key(|f| f.path.len()) - .map(|f| f.path.clone()) + let by_suffix = g.files.iter().filter(|f| p.ends_with(&format!("/{}", f.path)) || p.ends_with(&f.path) && p.len() == f.path.len()).max_by_key(|f| f.path.len()).map(|f| f.path.clone()); + if by_suffix.is_some() || p.contains('/') { + return by_suffix; + } + // a bare file name (a Java stack frame: `TextNodeTest.java:88`), when only one file has it + let mut named = g.files.iter().filter(|f| f.path.rsplit('/').next() == Some(p)); + match (named.next(), named.next()) { + (Some(f), None) => Some(f.path.clone()), + _ => None, + } } -fn innermost(g: &Graph, file: &str, line: u32) -> Option { +pub(crate) fn innermost(g: &Graph, file: &str, line: u32) -> Option { g.in_file(file) .into_iter() .filter(|&i| { @@ -64,16 +69,26 @@ pub fn frames(g: &Graph, root: &Path, text: &str) -> Vec { } } // generic: some/path.ext:LINE[:COL] - for token in l.split(|c: char| c.is_whitespace() || c == ',' || c == '(' || c == ')' || c == '\'' || c == '"') { - let mut parts = token.split(':'); - let Some(path) = parts.next() else { continue }; - let ext = path.rsplit('.').next().unwrap_or(""); - if !CODE_EXT.contains(&ext) { - continue; + for word in l.split_whitespace() { + // tsc `src/x.ts(12,5):`, maven `/abs/X.java:[12,5]` + let w = word.trim_matches(['\'', '"', '`']); + if let Some((path, n, _)) = crate::digest::location(w).filter(|(p, _, _)| CODE_EXT.contains(&p.rsplit('.').next().unwrap_or(""))) { + if let Some(f) = match_file(g, root, &path) { + push(f, n); + continue; + } } - let Some(n) = parts.next().and_then(|x| x.parse::().ok()) else { continue }; - if let Some(f) = match_file(g, root, path) { - push(f, n); + for token in word.split([',', '(', ')', '\'', '"']) { + let mut parts = token.split(':'); + let Some(path) = parts.next() else { continue }; + let ext = path.rsplit('.').next().unwrap_or(""); + if !CODE_EXT.contains(&ext) { + continue; + } + let Some(n) = parts.next().and_then(|x| x.parse::().ok()) else { continue }; + if let Some(f) = match_file(g, root, path) { + push(f, n); + } } } } @@ -139,29 +154,262 @@ pub fn render_locate(g: &Graph, root: &Path, text: &str, with_code: bool) -> Str // ───────────────────────────── tests-for ───────────────────────────── +/// How many tests are named by default: the ones most likely to fail when the symbol +/// breaks. The rest is covered by one command per test file. +pub const TOP_TESTS: usize = 10; + #[derive(Debug, Clone)] pub struct TestRef { pub symbol: usize, pub how: String, } -/// Tests that reach `i` through calls / type uses (up to `depth` hops). +/// What is known about one candidate test (see [`tests_for`] for the order it gives). +#[derive(Default, Clone, Copy)] +struct Evidence { + /// call-graph distance (1 = the test calls the symbol itself) + depth: Option, + /// the test's name contains the symbol's name + named: bool, + /// … and that name is more than one common word (`Print` is in many unrelated test names) + distinctive: bool, + /// it lives in the test file that mirrors the symbol's file (`command_test.go`) + mirror: bool, + /// words of the symbol's name that the test's name has too + overlap: usize, +} + +impl Evidence { + /// Smaller = more likely to fail when the symbol breaks. + fn tier(&self) -> u8 { + match (self.depth, self.named) { + (Some(1), true) => 0, + (Some(1), false) => 1, + (_, true) if self.distinctive => 2, + (Some(_), _) | (None, true) => 3, + (None, false) => 4, + } + } + + fn how(&self) -> String { + let mut v: Vec = Vec::new(); + match self.depth { + Some(1) => v.push("direct".into()), + Some(d) => v.push(format!("{d} hops")), + None => {} + } + if self.named { + v.push("named after it".into()); + } + if self.mirror && (v.is_empty() || self.depth.is_some_and(|d| d > 1)) { + v.push("its test file".into()); + } + v.join(", ") + } +} + +/// Tests that exercise `i`, the most likely to fail first: +/// 1. tests that call it directly (those named after it before the others), +/// 2. tests named after it (the graph misses templates, decorators, reflection) — when its +/// name is distinctive: two words or more, +/// 3. tests that reach it through other functions (up to `depth` hops) — the fewer hops +/// and the more of its name they share, the earlier, +/// 4. the rest of its mirror test file, when all of the above found little. pub fn tests_for(g: &Graph, i: usize, depth: usize) -> Vec { - let mut out: Vec = Vec::new(); + let mut found: BTreeMap = BTreeMap::new(); + let lookup = |n: &gitnext_index::ImpactNode| g.find(&n.symbol.qualified).into_iter().find(|&x| g.syms[x].file == n.symbol.file && g.syms[x].sym.start_line == n.symbol.line); + let mut reach = |idx: usize, d: usize| { + let e = found.entry(idx).or_default(); + e.depth = Some(e.depth.map_or(d, |old| old.min(d))); + }; for n in g.impact(i, depth) { if !n.test || !n.certain { continue; } - let Some(idx) = g.find(&n.symbol.qualified).into_iter().find(|&x| g.syms[x].file == n.symbol.file && g.syms[x].sym.start_line == n.symbol.line) else { continue }; - if !g.syms[idx].sym.kind.is_callable() { + let Some(idx) = lookup(&n) else { continue }; + if !is_test_unit(&g.syms[idx]) { + continue; + } + reach(idx, n.depth); + // a test helper at the depth limit (`fn version(s)` in tests/util): the tests calling it + // are past the limit but run the code just the same + if n.depth == depth { + for m in g.impact(idx, 3) { + if !m.test || !m.certain { + continue; + } + if let Some(j) = lookup(&m) { + if is_test_unit(&g.syms[j]) { + reach(j, depth + m.depth); + } + } + } + } + } + // the call graph misses dynamic calls (templates, decorators, trait objects, reflection); + // conventions catch many of those: a test named after the symbol, a test file named after its file + let r = &g.syms[i]; + let name = r.sym.name.to_lowercase().replace('_', ""); + let words = name_words(&r.sym.name); + let mirror = mirror_test_files(&r.file); + let by_name = name.len() >= 4 && !r.sym.test; + let mut in_mirror = Vec::new(); + for (k, s) in g.syms.iter().enumerate() { + if !s.sym.test || !is_test_unit(s) { + continue; + } + let known = found.contains_key(&k); + // names and file names only mean something within one language: a C++ `main` in a + // fixture is not a test of Python's `main` + if !known && !(by_name && is_runnable_test(s) && gitnext_parse::family_of(&s.file) == gitnext_parse::family_of(&r.file)) { + continue; + } + let tw = name_words(&s.sym.name); + let named = by_name && contains_words(&tw, &words); + let is_mirror = mirror.iter().any(|m| s.file.ends_with(m.as_str())); + // (the type's name is no help: every method of `HelpFormatter` shares it) + let overlap = words.iter().filter(|w| w.len() >= 3 && w.as_str() != "test" && tw.contains(w)).count(); + if known || named { + let e = found.entry(k).or_default(); + (e.named, e.distinctive, e.mirror, e.overlap) = (named, words.len() > 1, is_mirror, overlap); + } else if is_mirror { + in_mirror.push((k, Evidence { depth: None, named: false, distinctive: false, mirror: true, overlap })); + } + } + // the whole mirror file when the graph and names found little (dynamic dispatch: a CLI + // runner, templates, decorators reach the code without a call the graph can see) + if found.len() < 5 { + found.extend(in_mirror); + } + let mut out: Vec<(usize, Evidence)> = found.into_iter().collect(); + // helpers in test files are not run by name: the tests that call them are in the list too + out.retain(|(k, _)| is_runnable_test(&g.syms[*k])); + out.sort_by_key(|(k, e)| (e.tier(), e.depth.unwrap_or(usize::MAX), std::cmp::Reverse(e.overlap), !e.mirror, g.syms[*k].file.as_str(), g.syms[*k].sym.start_line)); + out.into_iter().map(|(symbol, e)| TestRef { symbol, how: e.how() }).collect() +} + +/// Where a list of tests came from. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Source { + /// the call graph and naming conventions + Graph, + /// a coverage run (`gitnext learn-tests`); `stale`: the function changed since + Learned { stale: bool }, +} + +/// Tests for `i`, from the learned map when it knows the function, else from the call graph. +/// A map answer is the tests that really ran the code, narrowest first. +pub fn tests_for_at(g: &Graph, root: &Path, i: usize, depth: usize) -> (Vec, Source) { + let r = &g.syms[i]; + let covering = gitnext_index::TestMap::open_existing(root).map(|m| m.tests_of(&g.unique_name(i))).unwrap_or_default(); + if covering.is_empty() { + return (tests_for(g, i, depth), Source::Graph); + } + let stale = covering.iter().any(|c| c.body_hash != r.sym.body_hash); + let mirror = mirror_test_files(&r.file); + let mut by_place: std::collections::HashMap<(&str, &str), usize> = std::collections::HashMap::new(); + for (k, s) in g.syms.iter().enumerate() { + if s.sym.test && s.sym.kind.is_callable() { + by_place.entry((s.file.as_str(), s.sym.name.as_str())).or_insert(k); + } + } + let mut out: Vec<(bool, u32, TestRef)> = Vec::new(); + for c in &covering { + let last = c.name.rsplit("::").next().unwrap_or(&c.name); + let Some(&k) = by_place.get(&(c.file.as_str(), last)) else { continue }; // the test was renamed or removed since + if out.iter().any(|(_, _, t)| t.symbol == k) { + continue; + } + let in_mirror = mirror.iter().any(|m| c.file.ends_with(m.as_str())); + out.push((!in_mirror, c.breadth, TestRef { symbol: k, how: if in_mirror { "ran it, its test file".into() } else { "ran it".into() } })); + } + if out.is_empty() { + return (tests_for(g, i, depth), Source::Graph); + } + // the narrowest tests first (they run little else, so they are about this code); the map is already in that order + out.sort_by_key(|(not_mirror, breadth, _)| (*breadth, *not_mirror)); + (out.into_iter().map(|(_, _, t)| t).collect(), Source::Learned { stale }) +} + +/// Whether the symbol is a test a runner can be asked for by name (not a helper in a test file). +pub fn is_runnable(g: &Graph, i: usize) -> bool { + is_runnable_test(&g.syms[i]) +} + +/// `testParseURL_basic` → ["test", "parse", "url", "basic"]: camelCase, snake_case, digits apart. +pub(crate) fn name_words(n: &str) -> Vec { + let mut out: Vec = Vec::new(); + let cs: Vec = n.chars().collect(); + let mut cur = String::new(); + for (i, &c) in cs.iter().enumerate() { + if !c.is_alphanumeric() { + if !cur.is_empty() { + out.push(std::mem::take(&mut cur)); + } continue; } - let how = if n.depth == 1 { "direct".to_string() } else { format!("{} hops", n.depth) }; - out.push(TestRef { symbol: idx, how }); + let prev = i.checked_sub(1).map(|j| cs[j]); + let next = cs.get(i + 1).copied(); + let boundary = c.is_uppercase() && prev.is_some_and(|p| p.is_lowercase() || p.is_ascii_digit() || (p.is_uppercase() && next.is_some_and(char::is_lowercase))); + if boundary && !cur.is_empty() { + out.push(std::mem::take(&mut cur)); + } + cur.extend(c.to_lowercase()); + } + if !cur.is_empty() { + out.push(cur); } out } +/// `hay` has `needle` as consecutive words. +fn contains_words(hay: &[String], needle: &[String]) -> bool { + !needle.is_empty() && hay.windows(needle.len()).any(|w| w == needle) +} + +/// Test files that by convention test `file`: `command.go` → `command_test.go`, +/// `Foo.java` → `FooTest.java`, `x.py` → `test_x.py`, `x.ts` → `x.test.ts`. +fn mirror_test_files(file: &str) -> Vec { + let base = file.rsplit('/').next().unwrap_or(file); + let (stem, ext) = base.rsplit_once('.').unwrap_or((base, "")); + match ext { + "go" => vec![format!("/{stem}_test.go"), format!("{stem}_test.go")], + "java" | "kt" => vec![format!("/{stem}Test.{ext}"), format!("/{stem}Tests.{ext}")], + "py" => vec![format!("/test_{stem}.py"), format!("/{stem}_test.py")], + "ts" | "tsx" | "js" | "jsx" | "mts" | "mjs" => ["test", "spec"].iter().flat_map(|k| [format!("/{stem}.{k}.ts"), format!("/{stem}.{k}.tsx"), format!("/{stem}.{k}.js")]).collect(), + "rs" => vec![format!("/{stem}.rs"), format!("tests/{stem}.rs")], + _ => vec![], + } +} + +/// What can be named as a test: a function — and, in JavaScript and TypeScript, the test file +/// itself. `it('…', () => …)` is not a named function: the calls made inside it are booked to +/// the file's module, and the runner takes a file (`npx vitest run tests/x.ts`). Without this +/// `tests-for` found 2% of the failing test files of yaml. +fn is_test_unit(s: &gitnext_index::SymbolRow) -> bool { + s.sym.kind.is_callable() || (s.sym.test && s.sym.kind == Kind::Module && gitnext_parse::family_of(&s.file) == Some("js")) +} + +/// A test the runner executes on its own (not a helper inside a test file). +fn is_runnable_test(s: &gitnext_index::SymbolRow) -> bool { + let n = &s.sym.name; + if s.file.ends_with(".go") { + return n.starts_with("Test") || n.starts_with("Fuzz"); + } + if s.file.ends_with(".py") { + return n.starts_with("test"); + } + if s.file.ends_with(".rs") { + // a `#[test]` function takes no arguments; the helpers under tests/ do (`fn version(s: &str)`) + return s.sym.params.is_empty(); + } + if s.file.ends_with(".java") || s.file.ends_with(".kt") { + // JUnit 4/5 annotations are part of the signature; JUnit 3 goes by name + return n.starts_with("test") || ["@Test", "@ParameterizedTest", "@RepeatedTest", "@TestFactory", "@TestTemplate", "@Property"].iter().any(|a| s.sym.signature.contains(a)); + } + true +} + /// Ready-to-run commands per language/package. pub fn run_commands(g: &Graph, root: &Path, tests: &[TestRef]) -> Vec { let mut cargo: BTreeMap<(String, Option), Vec> = BTreeMap::new(); @@ -296,18 +544,125 @@ fn js_runner(file: &str, read: &mut dyn FnMut(&str) -> Option) -> String } } -pub fn render_tests_for(g: &Graph, root: &Path, i: usize, depth: usize) -> String { - let t = tests_for(g, i, depth); +/// One command per test file / package holding `tests`: "run them all" without naming each. +pub fn file_commands(g: &Graph, root: &Path, tests: &[TestRef]) -> Vec { + const MAX: usize = 8; // more files than this: the plain suite command + let mut read = |p: &str| std::fs::read_to_string(root.join(p)).ok(); + let mut cargo: BTreeMap> = BTreeMap::new(); + let mut pytest: Vec = Vec::new(); + let mut go: Vec = Vec::new(); + let mut java: Vec = Vec::new(); + let mut js: BTreeMap> = BTreeMap::new(); + let mut other: Vec = Vec::new(); + let add = |v: &mut Vec, x: String| { + if !v.contains(&x) { + v.push(x); + } + }; + for t in tests { + let r = &g.syms[t.symbol]; + if r.file.ends_with(".rs") { + let pkg = gitnext_parse::find_crate(&r.file, &mut read).map(|h| h.name.replace('_', "-")).unwrap_or_default(); + let segs: Vec<&str> = r.sym.qualified.split("::").collect(); + let what = if r.file.contains("tests/") { + format!("--test {}", r.file.rsplit('/').next().unwrap_or("").trim_end_matches(".rs")) + } else { + // unit tests: everything in the test's module + format!("-- {}::", segs[1..segs.len().saturating_sub(1)].join("::")) + }; + add(cargo.entry(pkg).or_default(), what); + } else if r.file.ends_with(".py") { + add(&mut pytest, r.file.clone()); + } else if r.file.ends_with(".go") { + add(&mut go, r.file.rsplit_once('/').map(|(d, _)| format!("./{d}")).unwrap_or_else(|| ".".into())); + } else if r.file.ends_with(".java") { + let class = if r.sym.kind == Kind::Method { r.sym.parent.as_deref().map(gitnext_parse::last_segment).unwrap_or(&r.sym.name) } else { r.sym.name.as_str() }; + add(&mut java, class.to_string()); + } else if gitnext_parse::family_of(&r.file) == Some("js") { + add(js.entry(js_runner(&r.file, &mut read)).or_default(), r.file.clone()); + } else { + add(&mut other, r.file.clone()); + } + } + let mut cmds = Vec::new(); + for (pkg, whats) in cargo { + let p = if pkg.is_empty() { String::new() } else { format!(" -p {pkg}") }; + if whats.len() > MAX { + cmds.push(format!("cargo test{p}")); + } else { + cmds.extend(whats.iter().map(|w| format!("cargo test{p} {w}"))); + } + } + if !pytest.is_empty() { + cmds.push(if pytest.len() > MAX { "pytest".to_string() } else { format!("pytest {}", pytest.join(" ")) }); + } + if !go.is_empty() { + cmds.push(if go.len() > MAX { "go test ./...".to_string() } else { format!("go test {}", go.join(" ")) }); + } + for (runner, files) in js { + cmds.push(if files.len() > MAX { runner } else { format!("{runner} {}", files.join(" ")) }); + } + if !java.is_empty() { + let gradle = ["build.gradle", "build.gradle.kts"].iter().any(|f| root.join(f).exists()); + cmds.push(match (gradle, java.len() > MAX) { + (true, true) => "./gradlew test".to_string(), + (true, false) => format!("./gradlew test {}", java.iter().map(|c| format!("--tests '*{c}'")).collect::>().join(" ")), + (false, true) => "mvn -q test".to_string(), + (false, false) => format!("mvn -q test -Dtest='{}'", java.join(",")), + }); + } + if !other.is_empty() { + cmds.push(format!("# C/C++ tests: {}", other.join(", "))); + } + cmds +} + +/// The tests to run first and the command for them, plus one command for every file with +/// the rest (`all`: every test by name instead). +pub fn render_tests_for(g: &Graph, root: &Path, i: usize, depth: usize, all: bool) -> String { + let (t, source) = tests_for_at(g, root, i, depth); if t.is_empty() { return format!("no tests reach {} (depth {depth}) — it is untested by the call graph\n", g.short_name(i)); } - let mut s = format!("tests reaching {} ({}):\n", g.short_name(i), t.len()); - for x in &t { + let top = if all { &t[..] } else { &t[..t.len().min(TOP_TESTS)] }; + let mut s = if top.len() < t.len() { + format!("tests {} {} ({}), the {} most likely to fail first:\n", if source == Source::Graph { "reaching" } else { "that ran" }, g.short_name(i), t.len(), top.len()) + } else { + format!("tests {} {} ({}), most likely to fail first:\n", if source == Source::Graph { "reaching" } else { "that ran" }, g.short_name(i), t.len()) + }; + for x in top { let _ = writeln!(s, "{} {}:{} ({})", g.short_name(x.symbol), g.syms[x.symbol].file, g.syms[x.symbol].sym.start_line, x.how); } let _ = writeln!(s, "run:"); - for c in run_commands(g, root, &t) { + for c in run_commands(g, root, top) { let _ = writeln!(s, " {c}"); } + if top.len() < t.len() { + let _ = writeln!(s, "all {} (whole test files; `--all` names each test):", t.len()); + for c in file_commands(g, root, &t) { + let _ = writeln!(s, " {c}"); + } + } + let note = match source { + Source::Graph => crate::trust::tests_note(&g.syms[i].file), + Source::Learned { stale } => crate::trust::tests_note_learned(stale), + }; + let _ = writeln!(s, "note: {note}."); s } + +#[cfg(test)] +mod tests { + use super::{contains_words, name_words}; + + #[test] + fn test_names_match_whole_words() { + assert_eq!(name_words("testParseURL_basic2"), ["test", "parse", "url", "basic2"]); + assert_eq!(name_words("TestCommandExecute"), ["test", "command", "execute"]); + let w = |s: &str| name_words(s); + assert!(contains_words(&w("test_coerce_path_result"), &w("coerce_path_result"))); + assert!(contains_words(&w("TestNamePadding"), &w("NamePadding"))); + assert!(!contains_words(&w("testClosest"), &w("close"))); + assert!(!contains_words(&w("closeAuthedConnections"), &w("closest"))); + } +} diff --git a/crates/gitnext-ops/src/look.rs b/crates/gitnext-ops/src/look.rs index 24d50b9..07cf1a4 100644 --- a/crates/gitnext-ops/src/look.rs +++ b/crates/gitnext-ops/src/look.rs @@ -59,7 +59,17 @@ pub fn look(ws: &Workspace, g: &Graph, what: &str, lite: bool) -> String { _ => what, }; let name = name.trim_end_matches("()").trim_end_matches(':'); - let ids = g.find(name); + let mut ids = g.find(name); + // a bare name that is also somebody's full name (C `main`) must not hide its namesakes + // (`run::main`, `cli::main`): picking one silently sends the agent to the wrong code + if !ids.is_empty() && !name.contains("::") && !name.contains('.') && !name.contains('@') { + for i in g.named(name) { + let k = g.syms[i].sym.kind; + if !ids.contains(&i) && (k.is_callable() || k.is_type()) { + ids.push(i); + } + } + } if !ids.is_empty() { let first = g.syms[ids[0]].sym.qualified.clone(); if ids.iter().all(|&i| g.syms[i].sym.qualified == first) { @@ -68,7 +78,10 @@ pub fn look(ws: &Workspace, g: &Graph, what: &str, lite: bool) -> String { let mut s = format!("{} things are called `{name}` — look at one by its full name (or several at once):\n", ids.len()); for &i in ids.iter().take(12) { let r = &g.syms[i]; - let _ = writeln!(s, " {} ({}) {}:{}", g.short_name(i), r.sym.kind.as_str(), r.file, r.sym.start_line); + // a name that would only bring this list back is pinned by its line: `main@78` + let short = g.short_name(i); + let label = if g.find(short).iter().all(|&x| g.syms[x].sym.qualified == r.sym.qualified) && short != name { short.to_string() } else { format!("{}@{}", r.sym.name, r.sym.start_line) }; + let _ = writeln!(s, " {label} ({}) {}:{}", r.sym.kind.as_str(), r.file, r.sym.start_line); } return s; } @@ -104,13 +117,17 @@ fn symbol(ws: &Workspace, g: &Graph, ids: &[usize], lite: bool) -> String { if !sure.is_empty() || !maybe.is_empty() { let list: Vec = sure.iter().take(12).map(|(c, l)| format!("{} {}:{l}", g.short_name(*c), short_file(&g.syms[*c].file))).collect(); let more = sure.len().saturating_sub(12); + // how far to trust the list: measured share of real callers among the sure ones; + // a small model is not shown the doubtful ones at all + let trust = crate::trust::callers_sure(&r.file); let _ = writeln!( s, - "called by ({}): {}{}{}", + "called by ({}{}): {}{}{}", sure.len(), + if trust.is_empty() || sure.is_empty() { String::new() } else { format!(", {trust}") }, if list.is_empty() { "—".to_string() } else { list.join(", ") }, if more > 0 { format!(" +{more}") } else { String::new() }, - if maybe.is_empty() { String::new() } else { format!(" · maybe {} more via calls on objects of unknown type", maybe.len()) } + if maybe.is_empty() || lite { String::new() } else { format!(" · maybe {} more via calls on objects of unknown type", maybe.len()) } ); } else if r.sym.kind.is_callable() { let _ = writeln!(s, "called by: nothing in the repo{}", if tests.is_empty() { "" } else { " except tests" }); @@ -139,21 +156,21 @@ fn symbol(ws: &Workspace, g: &Graph, ids: &[usize], lite: bool) -> String { } } // tests that reach it, and how to run exactly those - let t = locate::tests_for(g, i, 4); + let (t, source) = locate::tests_for_at(g, root, i, 4); if t.is_empty() { let _ = writeln!(s, "tests: none reach it through the call graph"); } else { - let names: Vec = t.iter().take(8).map(|x| g.short_name(x.symbol).to_string()).collect(); - let _ = writeln!(s, "tests ({}): {}{}", t.len(), names.join(", "), if t.len() > 8 { " …" } else { "" }); - let mut files: Vec<&str> = t.iter().map(|x| g.syms[x.symbol].file.as_str()).collect(); - files.sort_unstable(); - files.dedup(); - if t.len() > 8 && files.iter().all(|f| f.ends_with(".py")) { - // too many to name one by one: the files that hold them - let _ = writeln!(s, " run: python3 -m pytest -q {}", files.join(" ")); - } else { - for cmd in locate::run_commands(g, root, &t).into_iter().take(2) { - let _ = writeln!(s, " run: {cmd}"); + // most likely to fail first: name those, one command for them and one for the rest + let top = &t[..t.len().min(locate::TOP_TESTS)]; + let names: Vec = top.iter().take(8).map(|x| g.short_name(x.symbol).to_string()).collect(); + let trust = if source == locate::Source::Graph { crate::trust::tests_short(&r.file) } else { "; from a coverage run".to_string() }; + let _ = writeln!(s, "tests ({}{trust}): {}{}", t.len(), names.join(", "), if t.len() > 8 { " …" } else { "" }); + for cmd in locate::run_commands(g, root, top).into_iter().take(2) { + let _ = writeln!(s, " run: {cmd}"); + } + if top.len() < t.len() { + if let Some(cmd) = locate::file_commands(g, root, &t).into_iter().next() { + let _ = writeln!(s, " all of them: {cmd}"); } } } @@ -178,6 +195,31 @@ fn short_file(p: &str) -> &str { p.rsplit('/').next().unwrap_or(p) } +/// Lines that contain `what` (any text: a string literal, an operator, a message), each with +/// the function it sits in — "who builds this string" answered without grep. +pub fn text_hits(g: &Graph, root: &std::path::Path, what: &str, limit: usize) -> Vec { + let low = what.to_lowercase(); + let mut hits = Vec::new(); + 'files: for f in g.files.iter().filter(|f| f.lines < 20_000) { + let Ok(t) = std::fs::read_to_string(root.join(&f.path)) else { continue }; + for (n, line) in t.lines().enumerate() { + if line.to_lowercase().contains(&low) { + let ln = n as u32 + 1; + // the innermost function / type around the line + let owner = (0..g.syms.len()) + .filter(|&i| g.syms[i].file == f.path && g.syms[i].sym.start_line <= ln && g.syms[i].sym.end_line >= ln && (g.syms[i].sym.kind.is_callable() || g.syms[i].sym.kind.is_type())) + .min_by_key(|&i| g.syms[i].sym.end_line - g.syms[i].sym.start_line); + let within = owner.map(|i| format!(" (in {})", g.short_name(i))).unwrap_or_default(); + hits.push(format!(" {}:{ln}{within}: {}", f.path, line.trim().chars().take(120).collect::())); + if hits.len() >= limit { + break 'files; + } + } + } + } + hits +} + fn words_hits(g: &Graph, root: &std::path::Path, what: &str) -> String { let mut s = String::new(); let hits = g.search(what, 10); @@ -189,19 +231,7 @@ fn words_hits(g: &Graph, root: &std::path::Path, what: &str) -> String { let _ = writeln!(s, " {} ({}) {}:{}{sum}", g.short_name(i), r.sym.kind.as_str(), r.file, r.sym.start_line); } } - let low = what.to_lowercase(); - let mut text_hits = Vec::new(); - 'files: for f in g.files.iter().filter(|f| f.lines < 20_000) { - let Ok(t) = std::fs::read_to_string(root.join(&f.path)) else { continue }; - for (n, line) in t.lines().enumerate() { - if line.to_lowercase().contains(&low) { - text_hits.push(format!(" {}:{}: {}", f.path, n + 1, line.trim().chars().take(120).collect::())); - if text_hits.len() >= 20 { - break 'files; - } - } - } - } + let text_hits = text_hits(g, root, what, 20); if !text_hits.is_empty() { s.push_str("text:\n"); s.push_str(&text_hits.join("\n")); diff --git a/crates/gitnext-ops/src/lsp.rs b/crates/gitnext-ops/src/lsp.rs index f642ec3..22df7a6 100644 --- a/crates/gitnext-ops/src/lsp.rs +++ b/crates/gitnext-ops/src/lsp.rs @@ -275,7 +275,8 @@ pub fn refine(root: &Path, g: &Graph, fam: Family, limit: usize, all: bool) -> R } let n = g.resolve(file, e).len(); // `.get()` & co are skipped by name-based resolution; ask the server when the repo has such methods - let common = n == 0 && e.to.starts_with('.') && g.has_method_named(gitnext_parse::last_segment(&e.to)); + // (a receiver known only as "what `f` returns", `f()::get`, is such a call when `f` did not say) + let common = n == 0 && (e.to.starts_with('.') || e.to.contains("()::")) && g.has_method_named(gitnext_parse::last_segment(&e.to)); if ((all && n >= 1) || n > 1 || common) && seen.insert((file.clone(), e.line, e.col)) { sites.push((file.clone(), e.line, e.col)); } diff --git a/crates/gitnext-ops/src/oplog.rs b/crates/gitnext-ops/src/oplog.rs new file mode 100644 index 0000000..b4dc607 --- /dev/null +++ b/crates/gitnext-ops/src/oplog.rs @@ -0,0 +1,395 @@ +//! Operation log: every file write made through gitnext (replace / insert / delete / rename, from the CLI +//! or MCP) is one numbered operation in `.gitnext/ops.jsonl` (local, git-ignored) that can be undone on its +//! own — `gitnext ops`, `gitnext undo --op N` — in the spirit of `jj op log` / `jj undo`. +//! +//! An operation keeps, per file, the changed blocks of lines (old and new text with 3 lines of context) +//! and the sha1 of the file before and after. Undo puts the old block back: directly when the file is +//! exactly as the operation left it; otherwise only where the new block with its context is found exactly +//! once, so later edits elsewhere in the file survive. When it is not found, undo refuses and writes nothing. +//! The undo is itself an operation, so undoing it redoes the change. + +use anyhow::{bail, Context, Result}; +use serde::{Deserialize, Serialize}; +use std::fmt::Write as _; +use std::io::{Read, Write}; +use std::path::{Path, PathBuf}; +use std::cell::RefCell; +use std::sync::Mutex; + +/// Lines of context stored around each changed block. +const CONTEXT: usize = 3; +/// The log is cut to its newer half when it grows past either limit; ids keep counting. +pub const MAX_BYTES: usize = 5 << 20; +pub const MAX_OPS: usize = 500; + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +pub struct Hunk { + /// 0-based line in the file *after* the operation where `new` starts + pub at: usize, + pub old: Vec, + pub new: Vec, + /// up to 3 lines before / after `new`; fewer only at the start / end of the file + pub pre: Vec, + pub post: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct FileOp { + pub path: String, + /// sha1 of the whole file before / after the operation + pub before: String, + pub after: String, + pub hunks: Vec, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Op { + pub id: u64, + /// unix seconds + pub ts: i64, + /// `cli` or `mcp:` + pub actor: String, + pub tool: String, + pub target: String, + pub files: Vec, + /// set on undo operations: the operation they took back + #[serde(default, skip_serializing_if = "Option::is_none")] + pub undoes: Option, +} + +type Change = (String, String, String); + +static ACTOR: Mutex> = Mutex::new(None); +thread_local! { + static LAST: RefCell> = const { RefCell::new(None) }; + static GROUP: RefCell>> = const { RefCell::new(None) }; +} + +fn lock(m: &Mutex) -> std::sync::MutexGuard<'_, T> { + m.lock().unwrap_or_else(|e| e.into_inner()) +} + +/// Who writes the operations of this process (default `cli`; the MCP server sets `mcp:`). +pub fn set_actor(a: impl Into) { + *lock(&ACTOR) = Some(a.into()); +} + +/// Id of the last operation this process recorded, once. +pub fn take_last() -> Option { + LAST.with(|l| l.borrow_mut().take()) +} + +pub fn path(root: &Path) -> PathBuf { + root.join(gitnext_index::GITNEXT_DIR).join("ops.jsonl") +} + +fn sha(s: &str) -> String { + git2::Oid::hash_object(git2::ObjectType::Blob, s.as_bytes()).map(|o| o.to_string()).unwrap_or_default() +} + +/// Lines with their terminators: joining them gives the text back byte for byte (CRLF, no final newline). +fn lines(s: &str) -> Vec<&str> { + s.split_inclusive('\n').collect() +} + +fn owned(v: &[&str]) -> Vec { + v.iter().map(|s| s.to_string()).collect() +} + +/// Changed blocks between two versions of a file. The common head and tail are cut off; when the rest +/// has the same number of lines (rename, text edits) it is split into runs of changed lines. +pub fn hunks(before: &str, after: &str) -> Vec { + let (a, b) = (lines(before), lines(after)); + let mut p = 0; + while p < a.len() && p < b.len() && a[p] == b[p] { + p += 1; + } + let mut s = 0; + while s < a.len() - p && s < b.len() - p && a[a.len() - 1 - s] == b[b.len() - 1 - s] { + s += 1; + } + let (ae, be) = (a.len() - s, b.len() - s); + if p == ae && p == be { + return vec![]; + } + let mut spans = Vec::new(); // (old start, old end, new start, new end) + if ae - p == be - p { + let mut k = p; + while k < ae { + if a[k] == b[k] { + k += 1; + continue; + } + let st = k; + while k < ae && a[k] != b[k] { + k += 1; + } + spans.push((st, k, st, k)); + } + } else { + spans.push((p, ae, p, be)); + } + spans + .into_iter() + .map(|(a0, a1, b0, b1)| Hunk { + at: b0, + old: owned(&a[a0..a1]), + new: owned(&b[b0..b1]), + pre: owned(&b[b0.saturating_sub(CONTEXT)..b0]), + post: owned(&b[b1..(b1 + CONTEXT).min(b.len())]), + }) + .collect() +} + +/// Record files written by one gitnext action as an operation. Inside a [`Group`] the files join the +/// group's operation instead. Never fails the edit: a log that cannot be written is a warning. +pub fn record(root: &Path, tool: &str, target: &str, changes: &[Change]) -> Option { + let grouped = GROUP.with(|g| { + let mut g = g.borrow_mut(); + let Some(g) = g.as_mut() else { return false }; + for (p, b, a) in changes { + match g.iter_mut().find(|c| &c.0 == p) { + Some(c) => c.2 = a.clone(), + None => g.push((p.clone(), b.clone(), a.clone())), + } + } + true + }); + if grouped { + return None; + } + write_op(root, tool, target, None, changes) +} + +/// All files this thread writes while a `Group` lives make one operation (e.g. `rename --text`: the rename and the +/// text pass). It is written when the group is dropped. +pub struct Group { + root: PathBuf, + tool: String, + target: String, + outer: bool, +} + +impl Group { + pub fn start(root: &Path, tool: &str, target: &str) -> Group { + let outer = GROUP.with(|g| { + let mut g = g.borrow_mut(); + let outer = g.is_some(); + if !outer { + *g = Some(Vec::new()); + } + outer + }); + Group { root: root.to_path_buf(), tool: tool.into(), target: target.into(), outer } + } +} + +impl Drop for Group { + fn drop(&mut self) { + if self.outer { + return; + } + let changes = GROUP.with(|g| g.borrow_mut().take()).unwrap_or_default(); + write_op(&self.root, &self.tool, &self.target, None, &changes); + } +} + +fn write_op(root: &Path, tool: &str, target: &str, undoes: Option, changes: &[Change]) -> Option { + let files: Vec = changes + .iter() + .filter(|(_, b, a)| b != a) + .map(|(p, b, a)| FileOp { path: p.clone(), before: sha(b), after: sha(a), hunks: hunks(b, a) }) + .collect(); + if files.is_empty() { + return None; + } + let op = Op { + id: 0, + ts: std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.as_secs() as i64).unwrap_or(0), + actor: lock(&ACTOR).clone().unwrap_or_else(|| "cli".into()), + tool: tool.into(), + target: target.into(), + files, + undoes, + }; + match append(root, op) { + Ok(id) => { + LAST.with(|l| *l.borrow_mut() = Some(id)); + Some(id) + } + Err(e) => { + eprintln!("warning: the operation was not logged, `gitnext undo --op` will not see it: {e:#}"); + None + } + } +} + +#[derive(Deserialize)] +struct IdOnly { + id: u64, +} + +/// Append under an exclusive file lock, so a CLI and an MCP server writing at once get distinct ids. +fn append(root: &Path, mut op: Op) -> Result { + let p = path(root); + std::fs::create_dir_all(p.parent().unwrap_or(root))?; + let mut f = std::fs::OpenOptions::new().create(true).read(true).append(true).open(&p).with_context(|| p.display().to_string())?; + f.lock()?; + let mut text = String::new(); + f.read_to_string(&mut text)?; + let last = text.lines().rev().find_map(|l| serde_json::from_str::(l).ok()).map_or(0, |x| x.id); + op.id = last + 1; + let line = serde_json::to_string(&op)? + "\n"; + let mut all: Vec<&str> = text.split_inclusive('\n').filter(|l| l.ends_with('\n')).collect(); + if text.len() + line.len() > MAX_BYTES || all.len() >= MAX_OPS { + // keep the newer half (by count and by size); ids are never reused + let (mut keep, mut bytes) = (0, line.len()); + for l in all.iter().rev() { + if keep + 1 >= MAX_OPS / 2 || bytes + l.len() > MAX_BYTES / 2 { + break; + } + keep += 1; + bytes += l.len(); + } + all.drain(..all.len() - keep); + let mut out = all.concat(); + out.push_str(&line); + f.set_len(0)?; + f.write_all(out.as_bytes())?; + } else { + // a line cut short by a crash would glue onto ours + if !text.is_empty() && !text.ends_with('\n') { + f.write_all(b"\n")?; + } + f.write_all(line.as_bytes())?; + } + Ok(op.id) +} + +pub fn load(root: &Path) -> Vec { + std::fs::read_to_string(path(root)).unwrap_or_default().lines().filter_map(|l| serde_json::from_str(l).ok()).collect() +} + +/// The undo that currently takes `id` back (an undo that was itself undone does not count). +fn undone_by(ops: &[Op], id: u64) -> Option { + ops.iter().filter(|o| o.undoes == Some(id)).map(|o| o.id).find(|&u| undone_by(ops, u).is_none()) +} + +fn describe(o: &Op) -> String { + format!("#{} {} {}", o.id, o.tool, o.target) +} + +#[derive(Debug, Clone, Serialize)] +pub struct UndoReport { + pub undone: u64, + pub what: String, + /// id of the undo operation itself (undo it to redo) + pub op: Option, + pub files: Vec, +} + +fn find_block(cur: &[&str], h: &Hunk) -> Vec { + let pat: Vec<&str> = h.pre.iter().chain(&h.new).chain(&h.post).map(String::as_str).collect(); + if pat.is_empty() || pat.len() > cur.len() { + return vec![]; + } + // no anchor to the start / end of the file: code appended after the last function or an import added + // on top is the most common later change, and "exactly one match" already guards a short context + (0..=cur.len() - pat.len()).filter(|&i| cur[i..i + pat.len()] == pat[..]).map(|i| i + h.pre.len()).collect() +} + +/// The file with the operation's blocks put back, or why that is not possible. +fn revert_file(root: &Path, ops: &[Op], o: &Op, f: &FileOp) -> Result<(String, String)> { + let cur = std::fs::read_to_string(root.join(&f.path)).with_context(|| format!("{} is gone; nothing undone", f.path))?; + let c = lines(&cur); + let mut spans: Vec<(usize, &Hunk)> = Vec::new(); + if sha(&cur) == f.after { + spans.extend(f.hunks.iter().map(|h| (h.at, h))); + } else { + for h in &f.hunks { + let found = find_block(&c, h); + if found.len() != 1 { + let later: Vec = ops.iter().filter(|x| x.id > o.id && x.files.iter().any(|y| y.path == f.path)).map(describe).collect(); + let by = if later.is_empty() { "by hand or another tool".to_string() } else { format!("by {}", later.join(", ")) }; + let what = if found.is_empty() { "were changed" } else { "now appear more than once" }; + bail!( + "{}: lines {}-{} written by operation #{} {what} since ({by}); nothing undone{}", + f.path, + h.at + 1, + h.at + h.new.len().max(1), + o.id, + if later.is_empty() { String::new() } else { " — undo those first".into() } + ); + } + spans.push((found[0], h)); + } + } + spans.sort_by_key(|s| s.0); + if spans.windows(2).any(|w| w[0].0 + w[0].1.new.len() > w[1].0) { + bail!("{}: the blocks of operation #{} overlap in the current file; nothing undone", f.path, o.id); + } + let mut out: Vec<&str> = c.clone(); + for (at, h) in spans.iter().rev() { + out.splice(*at..*at + h.new.len(), h.old.iter().map(String::as_str)); + } + let new = out.concat(); + Ok((cur, new)) +} + +/// Undo one operation. Every file is checked first; if any cannot be put back, nothing is written. +pub fn undo(root: &Path, id: u64) -> Result { + let ops = load(root); + let Some(o) = ops.iter().find(|o| o.id == id) else { + let first = ops.first().map_or(String::new(), |o| format!(" (the log keeps #{} and later)", o.id)); + bail!("no operation #{id}{first}; `gitnext ops` lists them"); + }; + if let Some(u) = undone_by(&ops, id) { + bail!("operation #{id} is already undone by #{u}; `gitnext undo --op {u}` brings it back"); + } + let mut changes = Vec::new(); + for f in &o.files { + // the log is a local file anyone can write: an operation never reaches outside the repository + if f.path.is_empty() || !Path::new(&f.path).components().all(|c| matches!(c, std::path::Component::Normal(_))) { + bail!("operation #{id} names a file outside the repository ({}); nothing undone", f.path); + } + let (cur, new) = revert_file(root, &ops, o, f)?; + changes.push((f.path.clone(), cur, new)); + } + for (p, _, new) in &changes { + std::fs::write(root.join(p), new).with_context(|| format!("writing {p}"))?; + } + let what = describe(o); + let op = write_op(root, "undo", &what, Some(id), &changes); + Ok(UndoReport { undone: id, what, op, files: changes.into_iter().map(|c| c.0).collect() }) +} + +pub fn render_undo(r: &UndoReport) -> String { + let mut s = format!("✓ undid {} — {}\n", r.what, r.files.join(", ")); + if let Some(op) = r.op { + let _ = writeln!(s, " this undo is #{op}: `gitnext undo --op {op}` brings the change back"); + } + s +} + +/// Newest first: number, time, who, what, files with lines removed / added. +pub fn render(ops: &[Op], n: usize) -> String { + if ops.is_empty() { + return "no operations yet: edits made through gitnext (edit, rename, MCP edit tools) are listed here\n".into(); + } + let mut s = String::new(); + for o in ops.iter().rev().take(n) { + let files: Vec = o + .files + .iter() + .map(|f| { + let (old, new) = f.hunks.iter().fold((0, 0), |(a, b), h| (a + h.old.len(), b + h.new.len())); + format!("{} −{old} +{new}", f.path) + }) + .collect(); + let mark = undone_by(ops, o.id).map_or(String::new(), |u| format!(" [undone by #{u}]")); + let _ = writeln!(s, "#{:<4} {} {:<10} {} {}{mark}", o.id, crate::journal::hm(o.ts), o.actor, o.tool, o.target); + let _ = writeln!(s, " {}", files.join(", ")); + } + s.push_str("undo one: `gitnext undo --op N` (refuses, changing nothing, if that code was rewritten since)\n"); + s +} diff --git a/crates/gitnext-ops/src/render.rs b/crates/gitnext-ops/src/render.rs index 95f2761..89bed84 100644 --- a/crates/gitnext-ops/src/render.rs +++ b/crates/gitnext-ops/src/render.rs @@ -21,6 +21,8 @@ pub struct Opts { pub all: bool, /// Full doc comments instead of the first paragraph. pub full_doc: bool, + /// For a small model: leave out what it would have to doubt ("maybe" callers). + pub lite: bool, } fn loc(g: &Graph, i: usize) -> String { @@ -69,6 +71,18 @@ pub fn outline(g: &Graph, root: &Path, path: &str, o: Opts) -> String { let public_only = !is_file && !o.all; outline_file(g, root, f, public_only, o, &mut s); } + if s.is_empty() { + // a folder of tests, benches or private helpers: say what is there instead of nothing + let _ = writeln!(s, "{} at `{path}`, nothing public in them — `gitnext outline {path} --all` shows the rest{}:", crate::changes::plural(files.len(), "file"), if o.tests { "" } else { ", `--tests` the tests too" }); + for f in files.iter().take(30) { + let ids: Vec = g.in_file(f).into_iter().filter(|&i| !is_file_module(&g.syms[i].sym)).collect(); + let tests = ids.iter().filter(|&&i| g.syms[i].sym.test).count(); + let _ = writeln!(s, " {f} · {}{}", crate::changes::plural(ids.len(), "symbol"), if tests > 0 { format!(", {tests} of them test code") } else { String::new() }); + } + if files.len() > 30 { + let _ = writeln!(s, " … {} more", files.len() - 30); + } + } s } @@ -305,10 +319,26 @@ fn list_line(label: &str, ids: &[usize], g: &Graph, o: Opts) -> String { pub fn callers(g: &Graph, i: usize, o: Opts) -> String { let all = g.callers(i); let (tests, real): (Vec<_>, Vec<_>) = all.iter().partition(|(c, _)| g.syms[*c].sym.test); - let mut s = format!("callers of {} ({}, approximate):\n", g.syms[i].sym.qualified, real.len()); - for (c, line) in &real { + // sure: the call names this function, or the receiver's type is known; maybe: a call on a + // value of unknown type that could reach it + let (sure, maybe): (Vec<_>, Vec<_>) = real.iter().partition(|(c, _)| !g.is_guess(*c, i)); + let trust = crate::trust::callers_sure(&g.syms[i].file); + let mut s = format!( + "callers of {} ({} sure{}{}):\n", + g.syms[i].sym.qualified, + sure.len(), + if trust.is_empty() { String::new() } else { format!(", {trust}") }, + if maybe.is_empty() { String::new() } else { format!("; {} maybe", maybe.len()) } + ); + for (c, line) in &sure { let _ = writeln!(s, "{} {}:{line}", g.short_name(*c), g.syms[*c].file); } + if !maybe.is_empty() && !o.lite { + let _ = writeln!(s, "maybe — the receiver's type is unknown, check each before relying on it:"); + for (c, line) in &maybe { + let _ = writeln!(s, "{} {}:{line}", g.short_name(*c), g.syms[*c].file); + } + } if o.tests { for (c, line) in &tests { let _ = writeln!(s, "{} [test] {}:{line}", g.short_name(*c), g.syms[*c].file); diff --git a/crates/gitnext-ops/src/trust.rs b/crates/gitnext-ops/src/trust.rs new file mode 100644 index 0000000..3511a1e --- /dev/null +++ b/crates/gitnext-ops/src/trust.rs @@ -0,0 +1,53 @@ +//! How far each kind of answer can be trusted — measured, not assumed. +//! +//! gitnext says *where* things are and *what is connected*; the agent decides what to +//! change; the compiler and the tests have the last word. Between those lies a line the +//! agent should not have to guess: a "sure" caller can be acted on, a test list from the +//! call graph is a starting point. The numbers are what the project's own eval measured +//! (`eval/results/latest.md`, run 6 of 12 Nov 2026: ten repos, two per language, 232 functions for +//! callers and 166 for tests) — update them when the eval moves by more than its threshold. + +/// (language family, share of "sure" callers that are real, share of failing tests the +/// call graph finds) — in percent; `None` = not measured for that language. +const MEASURED: &[(&str, Option, Option)] = &[ + ("go", Some(98), Some(79)), + ("java", Some(100), Some(49)), + ("js", Some(100), Some(3)), + ("rust", Some(100), Some(53)), + ("python", None, Some(36)), +]; + +fn row(file: &str) -> Option<&'static (&'static str, Option, Option)> { + let fam = gitnext_parse::family_of(file)?; + MEASURED.iter().find(|(f, _, _)| *f == fam) +} + +/// `≈97% real` for callers marked sure in a file of this language; empty when not measured. +pub fn callers_sure(file: &str) -> String { + row(file).and_then(|r| r.1).map(|p| format!("≈{p}% real")).unwrap_or_default() +} + +/// What the agent must know about a test list that came from the call graph. +pub fn tests_note(file: &str) -> String { + // Python can do better than the call graph: one coverage run gives the real list + let learn = if gitnext_parse::family_of(file) == Some("python") { "; `gitnext learn-tests` learns the real list from one test run" } else { "" }; + match row(file).and_then(|r| r.2) { + Some(p) => format!("the call graph finds ≈{p}% of the tests that would fail — run the whole test file before you finish{learn}"), + None => "how many failing tests the call graph finds is not measured for this language — run the whole test file before you finish".to_string(), + } +} + +/// For a list that came from a coverage run (`gitnext learn-tests`) instead of the call graph. +pub fn tests_note_learned(stale: bool) -> String { + let base = "these tests ran this code in the coverage run (measured on click: 98% of such tests fail when the code breaks, and none is missing)"; + if stale { + format!("{base}; the code changed since that run — `gitnext learn-tests` refreshes the map") + } else { + base.to_string() + } +} + +/// The same, as short as `look` needs it. +pub fn tests_short(file: &str) -> String { + row(file).and_then(|r| r.2).map(|p| format!("; ≈{p}% of the failing ones — run the file too")).unwrap_or_default() +} diff --git a/crates/gitnext-ops/src/why.rs b/crates/gitnext-ops/src/why.rs new file mode 100644 index 0000000..cef8a39 --- /dev/null +++ b/crates/gitnext-ops/src/why.rs @@ -0,0 +1,411 @@ +//! `gitnext why `: a test fails — run it and answer in one step what an agent otherwise +//! needs four for (find the test, run it, read a screen of output, guess where to look): +//! the failure in a few lines, and the code the test reaches, most likely culprit first. +//! +//! A small model that is told "the test `test_greater_than` fails" asks for `greater_than`, +//! finds nothing and invents a function. Here the path from the test to the code is the answer. + +use std::collections::{HashMap, HashSet, VecDeque}; +use std::fmt::Write as _; +use std::path::Path; +use std::time::Duration; + +use gitnext_index::Graph; +use gitnext_parse::EdgeKind; + +use crate::check::{self, Step}; +use crate::locate::{self, TestRef}; + +/// Code the tests reach is listed up to this many functions; the code itself is shown for the first. +const LISTED: usize = 8; +const SHOWN: usize = 2; +/// Lines of code shown per function. +const CODE_LINES: usize = 45; +/// How far from the test a function may be (calls between them). +const DEPTH: usize = 6; + +pub struct Suspect { + pub symbol: usize, + /// calls between the test and this function (1 = the test calls it itself) + pub depth: usize, + /// words its name shares with the test's name (`test_greater_than` — `matches_greater`) + pub overlap: usize, + /// the failure's own output names a line inside it: position among those lines, first = 0 + pub in_failure: Option, + /// how many tests ran it in the learned coverage run (0 without a map): code that few tests + /// run and this failing one does is likelier at fault than what every test runs + pub tests: usize, + /// the learned map (`gitnext learn-tests`) says the test really ran it + pub ran: bool, + /// its code is not what it was when the map was learned + pub changed: bool, +} + +pub struct Why { + pub tests: Vec, + pub steps: Vec, + pub suspects: Vec, + /// the suspects are what the test ran in the learned coverage run, not what the call graph reaches + pub learned: bool, + /// the commit the map was learned on, when it is known + pub since: Option, +} + +impl Why { + pub fn failed(&self) -> bool { + self.steps.iter().any(|s| !s.ok) + } +} + +/// Tests run at once when a name fits several (`test_basic` of five files): the ones that fail are kept. +const SAME_NAME: usize = 6; + +/// Runnable tests by name. `greater_than` finds `test_greater_than` / `TestGreaterThan` when no +/// test has exactly that name (at most three, the shortest names first). The id a test runner +/// prints is taken as it is: `tests/test_x.py::TestA::test_b[case]`, `TestRun/subtest`. +pub fn find_tests(g: &Graph, name: &str) -> Vec { + let runnable = |i: &usize| g.syms[*i].sym.test && locate::is_runnable(g, *i); + let name = name.trim().split('[').next().unwrap_or(name); + // `path/to/test_x.py::rest`: the file narrows the search + let (file, name) = match name.split_once("::") { + Some((f, rest)) if f.contains('.') && g.files.iter().any(|x| x.path == f || x.path.ends_with(&format!("/{f}"))) => (Some(f), rest), + _ => (None, name), + }; + let in_file = |i: &usize| file.is_none_or(|f| g.syms[*i].file == f || g.syms[*i].file.ends_with(&format!("/{f}"))); + let mut exact: Vec = g.find(name).into_iter().filter(runnable).filter(in_file).collect(); + if exact.is_empty() && name.contains('/') && !name.contains("::") { + // Go's `TestRun/subtest` + exact = g.find(name.split('/').next().unwrap_or(name)).into_iter().filter(runnable).collect(); + } + if !exact.is_empty() { + return exact.into_iter().take(SAME_NAME).collect(); + } + let bare = name.rsplit("::").next().unwrap_or(name).rsplit('.').next().unwrap_or(name); + let want: Vec = locate::name_words(bare).into_iter().filter(|w| w != "test" && w != "tests").collect(); + if want.is_empty() { + return vec![]; + } + let mut hits: Vec = (0..g.syms.len()) + .filter(runnable) + .filter(in_file) + .filter(|&i| { + let have: Vec = locate::name_words(&g.syms[i].sym.name).into_iter().filter(|w| w != "test" && w != "tests").collect(); + have == want + }) + .collect(); + hits.sort_by_key(|&i| (g.syms[i].sym.name.len(), g.syms[i].file.clone())); + hits.truncate(3); + hits +} + +/// Tests whose names are close to `name`, to offer when none matched. +pub fn similar_tests(g: &Graph, name: &str) -> Vec { + let want: HashSet = locate::name_words(name).into_iter().filter(|w| w != "test").collect(); + let mut v: Vec<(usize, usize)> = (0..g.syms.len()) + .filter(|&i| g.syms[i].sym.test && locate::is_runnable(g, i)) + .map(|i| (locate::name_words(&g.syms[i].sym.name).iter().filter(|w| want.contains(*w)).count(), i)) + .filter(|(n, _)| *n > 0) + .collect(); + v.sort_by_key(|&(n, i)| (std::cmp::Reverse(n), g.syms[i].sym.name.len())); + v.into_iter().take(5).map(|(_, i)| i).collect() +} + +/// symbol → what it calls (resolved through the call graph). +fn calls(g: &Graph) -> HashMap> { + let mut forward: HashMap> = HashMap::new(); + for t in 0..g.syms.len() { + for &(src, kind, _) in g.referrers(t) { + if kind == EdgeKind::Calls { + forward.entry(src).or_default().push(t); + } + } + } + forward +} + +/// Non-test functions reachable from the tests through calls, with the shortest distance. +fn reached(g: &Graph, forward: &HashMap>, tests: &[usize]) -> Vec<(usize, usize)> { + let mut depth: HashMap = tests.iter().map(|&t| (t, 0)).collect(); + let mut queue: VecDeque = tests.iter().copied().collect(); + while let Some(i) = queue.pop_front() { + let d = depth[&i]; + if d >= DEPTH || depth.len() > 4000 { + continue; + } + for &n in forward.get(&i).map(Vec::as_slice).unwrap_or(&[]) { + if let std::collections::hash_map::Entry::Vacant(e) = depth.entry(n) { + e.insert(d + 1); + queue.push_back(n); + } + } + } + let mut out: Vec<(usize, usize)> = depth.into_iter().filter(|&(i, d)| d > 0 && !g.syms[i].sym.test && g.syms[i].sym.kind.is_callable() && !g.syms[i].sym.decl).collect(); + out.sort_unstable(); + out +} + +/// Run the tests; when they fail, rank the code they reach. +pub fn why(root: &Path, g: &Graph, tests: &[usize], timeout: Duration) -> Why { + let refs: Vec = tests.iter().map(|&t| TestRef { symbol: t, how: "asked".into() }).collect(); + let steps: Vec = check::test_commands(g, root, &refs).iter().map(|c| check::run(root, g, "tests", c, timeout)).collect(); + explain(root, g, tests, steps) +} + +/// The same from runs already made: which code to look at, given how the tests failed. +pub fn explain(root: &Path, g: &Graph, tests: &[usize], steps: Vec) -> Why { + let mut w = Why { tests: tests.to_vec(), steps, suspects: Vec::new(), learned: false, since: None }; + if !w.failed() { + return w; + } + // lines of non-test code the output names: the digest's own locations first, then the rest (stack frames) + let mut named: Vec = Vec::new(); + let mut add = |i: Option| { + if let Some(i) = i.filter(|&i| !g.syms[i].sym.test && g.syms[i].sym.kind.is_callable()) { + if !named.contains(&i) { + named.push(i); + } + } + }; + for st in w.steps.iter().filter(|s| !s.ok) { + for f in &st.digest.failures { + if let (Some(p), Some(n)) = (&f.file, f.line) { + add(locate::match_file(g, root, p).and_then(|file| locate::innermost(g, &file, n))); + } + } + for fr in &st.frames { + add(fr.symbol); + } + } + // several tests were run (one name, several files): the code to look at is what the failing ones use + let whats: Vec<(&str, Option<&str>)> = + w.steps.iter().filter(|s| !s.ok).flat_map(|s| s.digest.failures.iter()).map(|f| (f.what.split('[').next().unwrap_or(&f.what), f.file.as_deref())).collect(); + let failing = |strict: bool| -> Vec { + let hit = |t: &usize| { + let r = &g.syms[*t]; + whats.iter().any(|(x, file)| { + let name = x.rsplit("::").next().unwrap_or(x).rsplit('.').next().unwrap_or(x); + name == r.sym.name && (!strict || x.contains(r.file.as_str()) || file.is_some_and(|f| f == r.file || f.ends_with(&format!("/{}", r.file)))) + }) + }; + tests.iter().copied().filter(hit).collect() + }; + let narrowed = [failing(true), failing(false)].into_iter().find(|v| !v.is_empty()).unwrap_or_else(|| tests.to_vec()); + let tests = narrowed.as_slice(); + w.tests = narrowed.clone(); + let test_words: HashSet = + tests.iter().flat_map(|&t| locate::name_words(&g.syms[t].sym.name)).filter(|x| !matches!(x.as_str(), "test" | "tests" | "should" | "it" | "the" | "a")).collect(); + let overlap = |i: usize| -> usize { + let s = &g.syms[i].sym; + let mut words: HashSet = locate::name_words(&s.name).into_iter().collect(); + if let Some(p) = &s.parent { + words.extend(locate::name_words(p.rsplit("::").next().unwrap_or(p))); + } + words.iter().filter(|x| test_words.contains(*x)).count() + }; + let rank = std::env::var("GITNEXT_WHY_RANK").unwrap_or_default(); + let mut by: HashMap = HashMap::new(); + // what the tests really ran, when a coverage run was learned and knows them: a call through a + // CLI runner, a decorator or a trait is in it, and code on a branch the test never takes is not + if rank != "static" { + if let Some(map) = gitnext_index::TestMap::open_existing(root) { + w.since = map.meta("commit"); + // by the name the map knows a function under (two `fmt` of one type are two names) + let by_qual: HashMap = g.syms.iter().enumerate().filter(|(_, r)| !r.sym.test && r.sym.kind.is_callable() && !r.sym.decl).map(|(i, _)| (g.unique_name(i), i)).collect(); + for &t in tests { + let r = &g.syms[t]; + let class = r.sym.parent.as_deref().map(|p| p.rsplit("::").next().unwrap_or(p)); + let mut ran = class.map(|c| map.ran_by(&r.file, &format!("{c}::{}", r.sym.name))).unwrap_or_default(); + if ran.is_empty() { + ran = map.ran_by(&r.file, &r.sym.name); + } + for (q, hash, n) in ran { + let Some(&i) = by_qual.get(&q) else { continue }; // renamed or removed since + let changed = g.syms[i].sym.body_hash != hash; + by.entry(i).or_insert(Suspect { symbol: i, depth: 0, overlap: overlap(i), in_failure: None, tests: n as usize, ran: true, changed }); + } + } + } + } + w.learned = !by.is_empty(); + if w.learned { + for (pos, &i) in named.iter().enumerate() { + by.entry(i).or_insert(Suspect { symbol: i, depth: 0, overlap: overlap(i), in_failure: None, tests: 0, ran: false, changed: false }).in_failure = Some(pos); + } + } else { + let forward = calls(g); + for (i, d) in reached(g, &forward, tests) { + by.insert(i, Suspect { symbol: i, depth: d, overlap: overlap(i), in_failure: None, tests: 0, ran: false, changed: false }); + } + for (pos, &i) in named.iter().enumerate() { + by.entry(i).or_insert(Suspect { symbol: i, depth: DEPTH + 1, overlap: overlap(i), in_failure: None, tests: 0, ran: false, changed: false }).in_failure = Some(pos); + } + } + let mut v: Vec = by.into_values().collect(); + let learned = w.learned; + v.sort_by_key(|s| { + let named = (s.in_failure.is_none(), s.in_failure.unwrap_or(0)); + let place = (g.syms[s.symbol].file.clone(), g.syms[s.symbol].sym.start_line); + let words = usize::MAX - s.overlap; + if learned { + // code that changed since the test last passed under coverage, then what few other tests run + // (20 seeded bugs in click and sqlparse: the culprit is first in 90%; without the "changed" + // mark first in 20%, among the first 8 in 80%; the call graph alone: 5% and 20%) + let same = !s.changed || rank == "nochange"; + return (named, usize::from(same), s.tests, words, 0, place); + } + // measured on 40 seeded bugs: counting the tests that reach a function through the call + // graph does not help (almost every test reaches the same code), the distance does a little + (named, words, s.depth, 0, 0, place) + }); + w.suspects = v; + w +} + +/// The source line at a place the failure names, when the file is in the repo. +fn source_line(g: &Graph, root: &Path, file: &str, line: u32) -> Option<(String, String)> { + let f = locate::match_file(g, root, file)?; + let text = std::fs::read_to_string(root.join(&f)).ok()?; + let l = text.lines().nth(line.checked_sub(1)? as usize)?.trim().to_string(); + (!l.is_empty()).then_some((f, l)) +} + +/// Lines shown of what changed in a function since the map was learned. +const CHANGED_LINES: usize = 10; + +/// What changed inside lines `a..=b` of `file` since `commit`: the removed and the added lines. +fn changed_since(root: &Path, commit: &str, file: &str, a: u32, b: u32) -> Vec { + let Ok(out) = std::process::Command::new("git").args(["diff", "-U0", "--no-color", "--no-ext-diff", commit, "--", file]).current_dir(root).output() else { return vec![] }; + if !out.status.success() { + return vec![]; + } + hunks_within(&String::from_utf8_lossy(&out.stdout), a, b) +} + +/// The `-` / `+` lines of the hunks of a `git diff -U0` that touch lines `a..=b` of the new file. +pub fn hunks_within(diff: &str, a: u32, b: u32) -> Vec { + let (mut out, mut inside) = (Vec::new(), false); + for l in diff.lines() { + if let Some(rest) = l.strip_prefix("@@ ") { + // `-12,2 +12,3 @@ …`: the new side; a count of 0 is a pure removal at that line + let new = rest.split(' ').find(|x| x.starts_with('+')).unwrap_or("+0"); + let mut it = new[1..].split(','); + let start: u32 = it.next().and_then(|x| x.parse().ok()).unwrap_or(0); + let count: u32 = it.next().and_then(|x| x.parse().ok()).unwrap_or(1); + inside = start <= b && start + count.max(1) > a; + } else if inside && (l.starts_with('-') || l.starts_with('+')) && !l.starts_with("---") && !l.starts_with("+++") { + out.push(format!("{} {}", &l[..1], l[1..].trim())); + } + } + out +} + +/// Everything the ranking knows, for scripts (`gitnext why --json`). +pub fn json(g: &Graph, w: &Why) -> serde_json::Value { + serde_json::json!({ + "tests": w.tests.iter().map(|&t| g.syms[t].sym.qualified.as_str()).collect::>(), + "failed": w.failed(), + "learned": w.learned, + "failures": w.steps.iter().flat_map(|s| s.digest.failures.iter()).map(|f| serde_json::json!({ "what": f.what, "file": f.file, "line": f.line, "message": f.message, "count": f.count })).collect::>(), + "suspects": w.suspects.iter().map(|x| { + let r = &g.syms[x.symbol]; + serde_json::json!({ "symbol": r.sym.qualified, "file": r.file, "line": r.sym.start_line, "depth": x.depth, "overlap": x.overlap, "tests": x.tests, "named": x.in_failure.is_some(), "ran": x.ran, "changed": x.changed }) + }).collect::>(), + }) +} + +pub fn render(g: &Graph, root: &Path, w: &Why) -> String { + let names: Vec<&str> = w.tests.iter().map(|&t| g.syms[t].sym.name.as_str()).collect(); + let mut s = String::new(); + if w.steps.is_empty() { + let _ = writeln!(s, "why: no command known to run {} (see `gitnext tests-for`)", names.join(", ")); + return s; + } + let secs: f32 = w.steps.iter().map(|x| x.seconds).sum(); + if !w.failed() { + let _ = writeln!(s, "why: {} — passes ({secs:.1}s), nothing to explain", names.join(", ")); + for st in &w.steps { + let _ = writeln!(s, " {}", st.command); + } + return s; + } + let _ = writeln!(s, "why: {} — FAILS ({secs:.1}s)", names.join(", ")); + for st in w.steps.iter().filter(|x| !x.ok) { + let _ = writeln!(s, " {}", st.command); + if st.timed_out { + let _ = writeln!(s, " timed out"); + } + if st.digest.failures.is_empty() { + for l in st.output.lines().rev().take(12).collect::>().into_iter().rev() { + let _ = writeln!(s, " {l}"); + } + continue; + } + // one failing test: its totals line says nothing the header did not + let text = crate::digest::render(&st.digest, 3); + let one = st.digest.kind == "tests" && st.digest.failures.len() == 1; + s.extend(text.lines().skip(usize::from(one)).map(|l| format!("{l}\n"))); + // the line of the first failure, when the tool did not print it itself + if let Some(f) = st.digest.failures.first() { + if let (Some(p), Some(n)) = (&f.file, f.line) { + if !f.message.iter().any(|m| m.starts_with("> ")) { + if let Some((file, text)) = source_line(g, root, p, n) { + let _ = writeln!(s, " {file}:{n}: {text}"); + } + } + } + } + } + if w.suspects.is_empty() { + let _ = writeln!(s, "no code of the project is reached from the test through the call graph: read the test (`gitnext look {}`)", names.first().copied().unwrap_or("")); + return s; + } + let total = w.suspects.len(); + let what = if w.learned { "code the test ran (learned coverage)" } else { "code the test reaches" }; + let _ = writeln!(s, "\n{what}, most likely first ({} of {total}):", total.min(LISTED)); + for (k, x) in w.suspects.iter().take(LISTED).enumerate() { + let r = &g.syms[x.symbol]; + let how = match x.in_failure { + Some(_) => "named in the failure".to_string(), + None if x.changed => "changed since `learn-tests`".to_string(), + None if x.ran => format!("run by {}", crate::changes::plural(x.tests, "test")), + None => format!("{} from the test", crate::changes::plural(x.depth, "call")), + }; + let _ = writeln!(s, "{:>2}. {} {}:{} ({how})", k + 1, g.short_name(x.symbol), r.file, r.sym.start_line); + } + // what was changed in the first of them since the tests ran under coverage: usually the bug itself + if let (Some(commit), Some(x)) = (&w.since, w.suspects.iter().take(SHOWN).find(|x| x.changed)) { + let r = &g.syms[x.symbol]; + let lines = changed_since(root, commit, &r.file, r.sym.start_line, r.sym.end_line); + if !lines.is_empty() { + let _ = writeln!(s, "\nchanged in {} since `learn-tests` (- as it was, + as it is now):", g.short_name(x.symbol)); + for l in lines.iter().take(CHANGED_LINES) { + let _ = writeln!(s, " {l}"); + } + if lines.len() > CHANGED_LINES { + let _ = writeln!(s, " … {} more changed lines: `git diff {} -- {}`", lines.len() - CHANGED_LINES, &commit[..commit.len().min(8)], r.file); + } + } + } + let _ = writeln!(s); + // the code of the first; of the second only when something points at it too + for (k, x) in w.suspects.iter().take(SHOWN).enumerate() { + if k > 0 && x.in_failure.is_none() && x.overlap == 0 && !x.changed { + break; + } + let r = &g.syms[x.symbol]; + let Ok(text) = std::fs::read_to_string(root.join(&r.file)) else { continue }; + let (a, b) = (r.sym.start_line as usize, r.sym.end_line as usize); + let body: Vec<&str> = text.lines().skip(a.saturating_sub(1)).take(b + 1 - a).collect(); + let fence = gitnext_parse::lang_for(Path::new(&r.file)).map(|l| l.fence()).unwrap_or(""); + let _ = writeln!(s, "{}:{a}-{b} {}\n```{fence}", r.file, g.short_name(x.symbol)); + for l in body.iter().take(CODE_LINES) { + let _ = writeln!(s, "{l}"); + } + if body.len() > CODE_LINES { + let _ = writeln!(s, "… {} more lines: `gitnext look {}`", body.len() - CODE_LINES, g.short_name(x.symbol)); + } + let _ = writeln!(s, "```"); + } + let _ = writeln!(s, "next: fix the code, not the test (`gitnext edit replace `), then `gitnext check`"); + s +} diff --git a/crates/gitnext-ops/tests/check.rs b/crates/gitnext-ops/tests/check.rs new file mode 100644 index 0000000..cff71d1 --- /dev/null +++ b/crates/gitnext-ops/tests/check.rs @@ -0,0 +1,71 @@ +//! `gitnext check`: which symbols a change touched, and the build / test verdict. + +use std::path::{Path, PathBuf}; +use std::process::Command; +use std::time::Duration; + +use gitnext_ops::check; +use gitnext_ops::gitnext_index::{Graph, Index}; + +fn project(name: &str, files: &[(&str, &str)]) -> PathBuf { + let dir = std::env::temp_dir().join(format!("gitnext-check-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + for (p, c) in files { + let f = dir.join(p); + std::fs::create_dir_all(f.parent().unwrap()).unwrap(); + std::fs::write(f, c).unwrap(); + } + for args in [&["init", "-q"][..], &["add", "-A"], &["-c", "user.name=t", "-c", "user.email=t@example.invalid", "-c", "commit.gpgsign=false", "commit", "-qm", "start"]] { + assert!(Command::new("git").args(args).current_dir(&dir).output().unwrap().status.success()); + } + dir +} + +fn graph(dir: &Path) -> Graph { + let mut idx = Index::open(dir).unwrap(); + idx.refresh().unwrap(); + idx.graph().unwrap() +} + +const CALC: &str = "class Calc:\n def add(self, a, b):\n return a + b\n\n def sub(self, a, b):\n return a - b\n\n\ndef helper(x):\n return x\n"; + +#[test] +fn changed_symbols_are_the_innermost_ones() { + let dir = project("changed", &[("calc.py", CALC), (".gitignore", ".gitnext/\n__pycache__/\n")]); + assert!(check::changed_symbols(&dir, &graph(&dir)).is_empty()); + assert!(check::render(&graph(&dir), &check::check(&dir, &graph(&dir), Duration::from_secs(60))).starts_with("nothing to check")); + // one line inside a method, and a new file + std::fs::write(dir.join("calc.py"), CALC.replace("a - b", "a - b - 0")).unwrap(); + std::fs::write(dir.join("extra.py"), "def fresh():\n return 1\n").unwrap(); + let g = graph(&dir); + let mut names: Vec<&str> = check::changed_symbols(&dir, &g).into_iter().map(|i| g.syms[i].sym.name.as_str()).collect(); + names.sort_unstable(); + assert_eq!(names, ["fresh", "sub"], "the method, not its class; not the untouched `add` or `helper`"); + let _ = std::fs::remove_dir_all(&dir); +} + +#[test] +fn verdict_follows_the_build() { + let dir = project("verdict", &[("calc.py", CALC), (".gitignore", ".gitnext/\n__pycache__/\n")]); + std::fs::write(dir.join("calc.py"), CALC.replace("a + b", "a + b + 0")).unwrap(); + let g = graph(&dir); + let c = check::check(&dir, &g, Duration::from_secs(60)); + assert!(c.ok(), "{}", check::render(&g, &c)); + let text = check::render(&g, &c); + assert!(text.contains("build ok") && text.contains("verdict: builds, but no test reaches"), "{text}"); + // a syntax error: the build fails, the tests are not run, the error is shown + std::fs::write(dir.join("calc.py"), CALC.replace("return a + b", "return a +")).unwrap(); + let g = graph(&dir); + let c = check::check(&dir, &g, Duration::from_secs(60)); + let text = check::render(&g, &c); + assert!(!c.ok() && text.contains("build FAILED") && text.contains("SyntaxError") && text.contains("verdict: FAILED — build"), "{text}"); + let _ = std::fs::remove_dir_all(&dir); +} + +#[test] +fn build_commands_follow_the_languages_touched() { + let dir = project("hang", &[("x.go", "package x\n\nfunc F() int { return 1 }\n"), ("go.mod", "module x\n")]); + assert_eq!(check::build_commands(&dir, &["x.go"]).len(), 1); + assert_eq!(check::build_commands(&dir, &["notes.md"]).len(), 0); + let _ = std::fs::remove_dir_all(&dir); +} diff --git a/crates/gitnext-ops/tests/digest.rs b/crates/gitnext-ops/tests/digest.rs new file mode 100644 index 0000000..b179e01 --- /dev/null +++ b/crates/gitnext-ops/tests/digest.rs @@ -0,0 +1,136 @@ +//! The digest of real build / test output: every tool's failure becomes name, place, message. +//! The fixtures in `tests/digest/` are outputs of the eval repos with one seeded bug (cargo, pytest, +//! go, vitest, tsc) and the usual shapes of maven, jest, gcc and a Python traceback. + +use gitnext_ops::digest::{digest, render, Digest}; + +fn of(name: &str) -> Digest { + digest(&std::fs::read_to_string(format!("{}/tests/digest/{name}", env!("CARGO_MANIFEST_DIR"))).unwrap()) +} + +fn first(d: &Digest) -> (&str, Option<&str>, Option, String) { + let f = &d.failures[0]; + (f.what.as_str(), f.file.as_deref(), f.line, f.message.join(" | ")) +} + +#[test] +fn cargo_test_panic_without_the_backtrace() { + let d = of("cargo-test.txt"); + assert_eq!(d.kind, "tests"); + assert_eq!(first(&d), ("test_greater_than", Some("tests/test_version_req.rs"), Some(82), "did not match 2.0.0".into())); + assert_eq!(d.summary.as_deref(), Some("FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 19 filtered out; finished in 0.11s")); + let text = render(&d, 5); + assert!(!text.contains("rust_begin_unwind") && text.lines().count() == 3, "{text}"); +} + +#[test] +fn rustc_error_with_its_place() { + let d = of("cargo-build.txt"); + assert_eq!(d.kind, "build"); + assert_eq!(d.failures.len(), 1, "{:?}", d.failures); + // the message, the line of code, and what the compiler wrote under it + assert_eq!(first(&d), ("E0609", Some("src/eval.rs"), Some(63), "no field `majr` on type `&Comparator` | > if ver.major != cmp.majr { | unknown field".into())); +} + +#[test] +fn pytest_assertion_with_the_failing_line() { + let d = of("pytest.txt"); + assert_eq!(d.kind, "tests"); + let (what, file, line, msg) = first(&d); + assert_eq!((what, file, line), ("test_filename_formatting", Some("tests/test_utils/test_format_filename.py"), Some(6))); + assert!(msg.starts_with("> assert click.format_filename(b\"/x/foo.txt\") == \"/x/foo.txt\" | AssertionError: assert 'foo.txt' == '/x/foo.txt'"), "{msg}"); + assert_eq!(d.summary.as_deref(), Some("1 failed, 68 passed in 0.16s")); +} + +#[test] +fn pytest_cases_of_one_parametrized_test_are_one_failure() { + let d = of("pytest-param.txt"); + assert_eq!(d.failures.len(), 1, "{:?}", d.failures); + let f = &d.failures[0]; + assert_eq!((f.what.as_str(), f.file.as_deref(), f.line, f.count), ("test_param_sum", Some("tests/test_zz_param.py"), Some(6), 2)); + assert_eq!(f.message[..2], ["> assert a == b, message", "AssertionError: Error: Invalid value for '-a': Value must be an iterable."]); + let text = render(&d, 5); + assert!(text.starts_with("tests: 2 failed — 2 failed, 1 passed in") && text.contains("✗ test_param_sum tests/test_zz_param.py:6 (2 cases)"), "{text}"); +} + +#[test] +fn pytest_that_cannot_import_the_project() { + let d = of("pytest-syntax.txt"); + let (what, file, line, msg) = first(&d); + assert!(what.starts_with("ImportError while loading conftest"), "{what}"); + assert!(file.unwrap().ends_with("src/click/utils.py") && line == Some(457), "{file:?} {line:?}"); + assert!(msg.ends_with("SyntaxError: expected ':'"), "{msg}"); +} + +#[test] +fn go_panic_points_at_the_first_frame_of_the_project() { + let d = of("go-test.txt"); + let (what, file, line, msg) = first(&d); + assert_eq!(what, "TestActiveHelpAlone"); + assert!(file.unwrap().ends_with("cobra/command.go") && line == Some(1678), "{file:?} {line:?}"); + assert_eq!(msg, "runtime error: invalid memory address or nil pointer dereference"); + assert_eq!(d.summary.as_deref(), Some("FAIL github.com/spf13/cobra")); + assert!(render(&d, 5).lines().count() <= 4); +} + +#[test] +fn go_assertions_and_go_build() { + let d = of("go-assert.txt"); + assert_eq!(first(&d), ("TestCommandAlias", Some("command_test.go"), Some(120), "Unexpected error: unknown command \"say\" for \"print\" | expected \"echo\", got \"print\"".into())); + let d = of("go-build.txt"); + assert_eq!(d.kind, "build"); + assert_eq!(first(&d), ("error", Some("./command.go"), Some(1678), "c.parnt undefined (type *Command has no field or method parnt)".into())); +} + +#[test] +fn vitest_843_lines_become_a_dozen() { + let d = of("vitest.txt"); + assert_eq!(d.lines, 843); + assert_eq!(d.failures.len(), 35); + let (what, file, line, msg) = first(&d); + assert_eq!((what, file, line), ("OMap > set", Some("tests/collection-access.ts"), Some(254))); + assert!(msg.starts_with("AssertionError: expected '!!omap []\\n' to be"), "{msg}"); + assert_eq!(d.summary.as_deref(), Some("35 failed | 240 passed (275)")); + let text = render(&d, 5); + assert!(text.lines().count() <= 12 && text.contains("… and 30 more:"), "{text}"); + assert!(text.len() < 1500, "{}", text.len()); +} + +#[test] +fn tsc_maven_jest_gcc_traceback() { + let d = of("tsc.txt"); + assert_eq!(first(&d), ("TS2551", Some("src/nodes/YAMLSeq.ts"), Some(328), "Property 'lengthh' does not exist on type 'string[]'. Did you mean 'length'?".into())); + + let d = of("maven-test.txt"); + assert_eq!(d.kind, "tests"); + assert_eq!(d.failures.len(), 1, "{:?}", d.failures); + assert_eq!(first(&d), ("TextNodeTest.testSplitText", Some("TextNodeTest.java"), Some(88), "org.opentest4j.AssertionFailedError: expected: but was: ".into())); + assert_eq!(d.summary.as_deref(), Some("Tests run: 1543, Failures: 1, Errors: 0, Skipped: 12")); + + let d = of("maven-build.txt"); + assert_eq!(d.kind, "build"); + // the same error in two files, each printed twice by maven: one line with a count + assert_eq!(d.failures.len(), 1, "{:?}", d.failures); + assert!(d.failures[0].count >= 2 && d.failures[0].file.as_deref().unwrap().ends_with("nodes/Element.java") && d.failures[0].line == Some(1642)); + assert_eq!(d.failures[0].message[0], "cannot find symbol"); + + let d = of("jest.txt"); + assert_eq!(first(&d), ("vanilla store › can set the store", Some("tests/vanilla/basic.test.ts"), Some(42), "expect(received).toEqual(expected) // deep equality | Expected: 2".into())); + assert_eq!(d.summary.as_deref(), Some("1 failed, 62 passed, 63 total")); + + let d = of("gcc.txt"); + assert_eq!(d.failures.len(), 1, "{:?}", d.failures); + assert_eq!(first(&d), ("error", Some("src/parse.c"), Some(42), "'cursor' undeclared (first use in this function)".into())); + + let d = of("traceback.txt"); + assert_eq!(first(&d), ("KeyError", Some("/home/user/proj/tools/config.py"), Some(17), "'build'".into())); +} + +#[test] +fn unknown_output_keeps_its_last_lines() { + let d = digest("starting\nstep 1 done\nsomething odd happened here\n"); + assert!(d.failures.is_empty()); + let text = render(&d, 5); + assert!(text.contains("not recognised") && text.contains("something odd happened here"), "{text}"); + assert_eq!(render(&digest(""), 5), "no output\n"); +} diff --git a/crates/gitnext-ops/tests/digest/cargo-build.txt b/crates/gitnext-ops/tests/digest/cargo-build.txt new file mode 100644 index 0000000..629d780 --- /dev/null +++ b/crates/gitnext-ops/tests/digest/cargo-build.txt @@ -0,0 +1,16 @@ + Checking semver v1.0.28 (/home/claude/gitnext/eval/.work/semver) +error[E0609]: no field `majr` on type `&Comparator` + --> src/eval.rs:63:25 + | +63 | if ver.major != cmp.majr { + | ^^^^ unknown field + | +help: a field with a similar name exists + | +63 | if ver.major != cmp.major { + | + + +For more information about this error, try `rustc --explain E0609`. +error: could not compile `semver` (lib) due to 1 previous error +warning: build failed, waiting for other jobs to finish... +error: could not compile `semver` (lib test) due to 1 previous error diff --git a/crates/gitnext-ops/tests/digest/cargo-test.txt b/crates/gitnext-ops/tests/digest/cargo-test.txt new file mode 100644 index 0000000..bfb58e2 --- /dev/null +++ b/crates/gitnext-ops/tests/digest/cargo-test.txt @@ -0,0 +1,37 @@ + Compiling semver v1.0.28 (/home/claude/gitnext/eval/.work/semver) + Finished `test` profile [unoptimized + debuginfo] target(s) in 2.34s + Running tests/test_version_req.rs (target/debug/deps/test_version_req-2c31cbdbac62c14b) + +running 1 test +test test_greater_than ... FAILED + +failures: + +---- test_greater_than stdout ---- + +thread 'test_greater_than' (344) panicked at tests/test_version_req.rs:82:5: +did not match 2.0.0 +stack backtrace: + 0: __rustc::rust_begin_unwind + at /rustc/2d8144b7880597b6e6d3dfd63a9a9efae3f533d3/library/std/src/panicking.rs:689:5 + 1: core::panicking::panic_fmt + at /rustc/2d8144b7880597b6e6d3dfd63a9a9efae3f533d3/library/core/src/panicking.rs:80:14 + 2: test_version_req::assert_match_all + at ./tests/test_version_req.rs:25:9 + 3: test_version_req::test_greater_than + at ./tests/test_version_req.rs:82:5 + 4: test_version_req::test_greater_than::{closure#0} + at ./tests/test_version_req.rs:79:27 + 5: >::call_once + at /rustc/2d8144b7880597b6e6d3dfd63a9a9efae3f533d3/library/core/src/ops/function.rs:250:5 + 6: core::result::Result<(), alloc::string::String> as core::ops::function::FnOnce<()>>::call_once + at /rustc/2d8144b7880597b6e6d3dfd63a9a9efae3f533d3/library/core/src/ops/function.rs:250:5 +note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. + + +failures: + test_greater_than + +test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 19 filtered out; finished in 0.11s + +error: test failed, to rerun pass `--test test_version_req` diff --git a/crates/gitnext-ops/tests/digest/gcc.txt b/crates/gitnext-ops/tests/digest/gcc.txt new file mode 100644 index 0000000..e128e7f --- /dev/null +++ b/crates/gitnext-ops/tests/digest/gcc.txt @@ -0,0 +1,7 @@ +src/parse.c: In function 'parse_line': +src/parse.c:42:17: error: 'cursor' undeclared (first use in this function) + 42 | while (*cursor) { + | ^~~~~~ +src/parse.c:42:17: note: each undeclared identifier is reported only once for each function it appears in +src/parse.c:57:9: warning: unused variable 'n' [-Wunused-variable] +make: *** [Makefile:12: parse.o] Error 1 diff --git a/crates/gitnext-ops/tests/digest/go-assert.txt b/crates/gitnext-ops/tests/digest/go-assert.txt new file mode 100644 index 0000000..aa1716e --- /dev/null +++ b/crates/gitnext-ops/tests/digest/go-assert.txt @@ -0,0 +1,10 @@ +=== RUN TestCommandAlias +--- FAIL: TestCommandAlias (0.00s) + command_test.go:120: Unexpected error: unknown command "say" for "print" + command_test.go:123: expected "echo", got "print" +=== RUN TestRootFlags +--- PASS: TestRootFlags (0.00s) +FAIL +FAIL github.com/spf13/cobra 0.012s +ok github.com/spf13/cobra/doc 0.004s +FAIL diff --git a/crates/gitnext-ops/tests/digest/go-build.txt b/crates/gitnext-ops/tests/digest/go-build.txt new file mode 100644 index 0000000..d444b96 --- /dev/null +++ b/crates/gitnext-ops/tests/digest/go-build.txt @@ -0,0 +1,2 @@ +# github.com/spf13/cobra +./command.go:1678:11: c.parnt undefined (type *Command has no field or method parnt) diff --git a/crates/gitnext-ops/tests/digest/go-test.txt b/crates/gitnext-ops/tests/digest/go-test.txt new file mode 100644 index 0000000..c8dda5f --- /dev/null +++ b/crates/gitnext-ops/tests/digest/go-test.txt @@ -0,0 +1,32 @@ +--- FAIL: TestActiveHelpAlone (0.00s) +panic: runtime error: invalid memory address or nil pointer dereference [recovered] + panic: runtime error: invalid memory address or nil pointer dereference +[signal SIGSEGV: segmentation violation code=0x1 addr=0x2a8 pc=0x63f18e] + +goroutine 20 [running]: +testing.tRunner.func1.2({0x6ede00, 0x9bc2d0}) + /usr/local/go1.24.7/src/testing/testing.go:1734 +0x21c +testing.tRunner.func1() + /usr/local/go1.24.7/src/testing/testing.go:1737 +0x35e +panic({0x6ede00?, 0x9bc2d0?}) + /usr/local/go1.24.7/src/runtime/panic.go:792 +0x132 +github.com/spf13/cobra.(*Command).HasParent(...) + /home/claude/gitnext/eval/.work/cobra/command.go:1678 +github.com/spf13/cobra.(*Command).Root(0xc000056d80?) + /home/claude/gitnext/eval/.work/cobra/command.go:893 +0xe +github.com/spf13/cobra.(*Command).Root(...) + /home/claude/gitnext/eval/.work/cobra/command.go:894 +github.com/spf13/cobra.(*Command).ExecuteC(0x830460?) + /home/claude/gitnext/eval/.work/cobra/command.go:1091 +0x6a8 +github.com/spf13/cobra.executeCommandC(0xc000160008, {0xc00011e1c0, 0x2, 0x2}) + /home/claude/gitnext/eval/.work/cobra/command_test.go:54 +0xe9 +github.com/spf13/cobra.executeCommand(...) + /home/claude/gitnext/eval/.work/cobra/command_test.go:33 +github.com/spf13/cobra.TestActiveHelpAlone(0xc0001048c0) + /home/claude/gitnext/eval/.work/cobra/active_help_test.go:43 +0x99 +testing.tRunner(0xc0001048c0, 0x7690b8) + /usr/local/go1.24.7/src/testing/testing.go:1792 +0xf4 +created by testing.(*T).Run in goroutine 1 + /usr/local/go1.24.7/src/testing/testing.go:1851 +0x413 +FAIL github.com/spf13/cobra 0.006s +FAIL diff --git a/crates/gitnext-ops/tests/digest/jest.txt b/crates/gitnext-ops/tests/digest/jest.txt new file mode 100644 index 0000000..164a1e9 --- /dev/null +++ b/crates/gitnext-ops/tests/digest/jest.txt @@ -0,0 +1,16 @@ + FAIL tests/vanilla/basic.test.ts + ● vanilla store › can set the store + + expect(received).toEqual(expected) // deep equality + + Expected: 2 + Received: 1 + + 41 | setState({ count: 1 }) + 42 | expect(getState().count).toEqual(2) + | ^ + at Object. (tests/vanilla/basic.test.ts:42:30) + at processTicksAndRejections (node:internal/process/task_queues:95:5) + +Test Suites: 1 failed, 4 passed, 5 total +Tests: 1 failed, 62 passed, 63 total diff --git a/crates/gitnext-ops/tests/digest/maven-build.txt b/crates/gitnext-ops/tests/digest/maven-build.txt new file mode 100644 index 0000000..1d8dfe8 --- /dev/null +++ b/crates/gitnext-ops/tests/digest/maven-build.txt @@ -0,0 +1,18 @@ +[INFO] Compiling 91 source files with javac [debug target 8] to target/classes +[INFO] ------------------------------------------------------------- +[ERROR] COMPILATION ERROR : +[INFO] ------------------------------------------------------------- +[ERROR] /home/user/jsoup/src/main/java/org/jsoup/nodes/Element.java:[1642,62] cannot find symbol + symbol: method getWholeTextGnx() + location: class org.jsoup.nodes.TextNode +[ERROR] /home/user/jsoup/src/main/java/org/jsoup/nodes/Printer.java:[31,61] cannot find symbol + symbol: method getWholeTextGnx() + location: class org.jsoup.nodes.TextNode +[INFO] 2 errors +[INFO] ------------------------------------------------------------- +[INFO] BUILD FAILURE +[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project jsoup: Compilation failure: Compilation failure: +[ERROR] /home/user/jsoup/src/main/java/org/jsoup/nodes/Element.java:[1642,62] cannot find symbol +[ERROR] symbol: method getWholeTextGnx() +[ERROR] location: class org.jsoup.nodes.TextNode +[ERROR] -> [Help 1] diff --git a/crates/gitnext-ops/tests/digest/maven-test.txt b/crates/gitnext-ops/tests/digest/maven-test.txt new file mode 100644 index 0000000..d3b2fcf --- /dev/null +++ b/crates/gitnext-ops/tests/digest/maven-test.txt @@ -0,0 +1,24 @@ +[INFO] Running org.jsoup.nodes.TextNodeTest +[ERROR] Tests run: 12, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.041 s <<< FAILURE! -- in org.jsoup.nodes.TextNodeTest +[ERROR] org.jsoup.nodes.TextNodeTest.testSplitText -- Time elapsed: 0.004 s <<< FAILURE! +org.opentest4j.AssertionFailedError: expected: but was: + at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) + at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182) + at org.jsoup.nodes.TextNodeTest.testSplitText(TextNodeTest.java:88) + at java.base/java.lang.reflect.Method.invoke(Method.java:580) + +[INFO] +[INFO] Results: +[INFO] +[ERROR] Failures: +[ERROR] TextNodeTest.testSplitText:88 expected: but was: +[INFO] +[ERROR] Tests run: 1543, Failures: 1, Errors: 0, Skipped: 12 +[INFO] +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD FAILURE +[INFO] ------------------------------------------------------------------------ +[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on project jsoup: There are test failures. +[ERROR] +[ERROR] Please refer to /home/user/jsoup/target/surefire-reports for the individual test results. +[ERROR] -> [Help 1] diff --git a/crates/gitnext-ops/tests/digest/pytest-param.txt b/crates/gitnext-ops/tests/digest/pytest-param.txt new file mode 100644 index 0000000..e70744b --- /dev/null +++ b/crates/gitnext-ops/tests/digest/pytest-param.txt @@ -0,0 +1,29 @@ +FF. [100%] +=================================== FAILURES =================================== +_ test_param_sum[1-2-Error: Invalid value for '-a': Value must be an iterable.] _ + +a = 1, b = 2 +message = "Error: Invalid value for '-a': Value must be an iterable." + + @pytest.mark.parametrize(("a", "b", "message"), [(1, 2, "Error: Invalid value for '-a': Value must be an iterable."), (2, 3, "x"), (3, 3, "ok")]) + def test_param_sum(a, b, message): +> assert a == b, message +E AssertionError: Error: Invalid value for '-a': Value must be an iterable. +E assert 1 == 2 + +tests/test_zz_param.py:6: AssertionError +____________________________ test_param_sum[2-3-x] _____________________________ + +a = 2, b = 3, message = 'x' + + @pytest.mark.parametrize(("a", "b", "message"), [(1, 2, "Error: Invalid value for '-a': Value must be an iterable."), (2, 3, "x"), (3, 3, "ok")]) + def test_param_sum(a, b, message): +> assert a == b, message +E AssertionError: x +E assert 2 == 3 + +tests/test_zz_param.py:6: AssertionError +=========================== short test summary info ============================ +FAILED tests/test_zz_param.py::test_param_sum[1-2-Error: Invalid value for '-a': Value must be an iterable.] +FAILED tests/test_zz_param.py::test_param_sum[2-3-x] - AssertionError: x +2 failed, 1 passed in 0.02s diff --git a/crates/gitnext-ops/tests/digest/pytest-syntax.txt b/crates/gitnext-ops/tests/digest/pytest-syntax.txt new file mode 100644 index 0000000..f8e0239 --- /dev/null +++ b/crates/gitnext-ops/tests/digest/pytest-syntax.txt @@ -0,0 +1,15 @@ +ImportError while loading conftest '/home/claude/gitnext/eval/.work/click/tests/conftest.py'. +tests/conftest.py:3: in + from click.testing import CliRunner +src/click/__init__.py:10: in + from .core import Argument as Argument +src/click/core.py:24: in + from . import types +src/click/types.py:17: in + from .exceptions import BadParameter +src/click/exceptions.py:10: in + from .utils import echo +E File "/home/claude/gitnext/eval/.work/click/src/click/utils.py", line 457 +E if shorten +E ^ +E SyntaxError: expected ':' diff --git a/crates/gitnext-ops/tests/digest/pytest.txt b/crates/gitnext-ops/tests/digest/pytest.txt new file mode 100644 index 0000000..ffb0268 --- /dev/null +++ b/crates/gitnext-ops/tests/digest/pytest.txt @@ -0,0 +1,17 @@ +F.................................................................... [100%] +=================================== FAILURES =================================== +___________________________ test_filename_formatting ___________________________ + + def test_filename_formatting(): + assert click.format_filename(b"foo.txt") == "foo.txt" +> assert click.format_filename(b"/x/foo.txt") == "/x/foo.txt" +E AssertionError: assert 'foo.txt' == '/x/foo.txt' +E +E - /x/foo.txt +E ? --- +E + foo.txt + +tests/test_utils/test_format_filename.py:6: AssertionError +=========================== short test summary info ============================ +FAILED tests/test_utils/test_format_filename.py::test_filename_formatting - A... +1 failed, 68 passed in 0.16s diff --git a/crates/gitnext-ops/tests/digest/traceback.txt b/crates/gitnext-ops/tests/digest/traceback.txt new file mode 100644 index 0000000..f7edd9d --- /dev/null +++ b/crates/gitnext-ops/tests/digest/traceback.txt @@ -0,0 +1,8 @@ +Traceback (most recent call last): + File "/home/user/proj/tools/build.py", line 88, in + main() + File "/home/user/proj/tools/build.py", line 61, in main + config = load(path) + File "/home/user/proj/tools/config.py", line 17, in load + return json.loads(text)["build"] +KeyError: 'build' diff --git a/crates/gitnext-ops/tests/digest/tsc.txt b/crates/gitnext-ops/tests/digest/tsc.txt new file mode 100644 index 0000000..26820db --- /dev/null +++ b/crates/gitnext-ops/tests/digest/tsc.txt @@ -0,0 +1 @@ +src/nodes/YAMLSeq.ts(328,15): error TS2551: Property 'lengthh' does not exist on type 'string[]'. Did you mean 'length'? diff --git a/crates/gitnext-ops/tests/digest/vitest.txt b/crates/gitnext-ops/tests/digest/vitest.txt new file mode 100644 index 0000000..0d07959 --- /dev/null +++ b/crates/gitnext-ops/tests/digest/vitest.txt @@ -0,0 +1,843 @@ + + RUN v4.1.11 /home/claude/gitnext/eval/.work/yaml + + ❯ tests/doc/stringify.ts (243 tests | 33 failed) 158ms + × long line in sequence 15ms + × long line in sequence in map 2ms + × long line in sequence 1ms + × long line in sequence in map 1ms + × sibling sequences 3ms + × further relatives 1ms + × only match objects 2ms + × array 1ms + × JS Object 1ms + × explicit tag on block sequence 3ms + × single-line comment on block sequence 1ms + × single-line comment and explicit tag on block sequence 1ms + × explicit tag and comment on block sequence 1ms + × anchor on block sequence 1ms + × anchor and explicit tag on block sequence 1ms + × explicit tag on explicit-value block sequence 1ms + × empty string camelBool 1ms + × empty string upperBool 1ms + × YAML node inside object (#128) 1ms + × indent: 1 1ms + × indent: 4 1ms + × indent: 1 1ms + × indent: 2 4ms + × indent: 4 1ms + × collectionStyle: undefined 1ms + × collectionStyle: 'any' 1ms + × collectionStyle: 'block' 1ms + × [1, undefined, 2] 0ms + × empty array 0ms + × Object, array of string 1ms + × function as filter of Object entries 1ms + × function as filter of Map entries 1ms + × function as transformer 1ms + ❯ tests/collection-access.ts (32 tests | 2 failed) 33ms + × set 8ms + × toString 1ms + +⎯⎯⎯⎯⎯⎯ Failed Tests 35 ⎯⎯⎯⎯⎯⎯⎯ + + FAIL tests/collection-access.ts > OMap > set +AssertionError: expected '!!omap []\n' to be '!!omap\n- a: 2\n- b: 5\n- null\n- d: …' // Object.is equality + +- Expected ++ Received + +- !!omap +- - a: 2 +- - b: 5 +- - null +- - d: 6 ++ !!omap [] + + + ❯ tests/collection-access.ts:254:25 + 252| ]) + 253| expect(omap.size).toBe(4) + 254| expect(String(doc)).toBe(`\ + | ^ + 255| !!omap + 256| - a: 2 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/35]⎯ + + FAIL tests/collection-access.ts > OMap > toString +AssertionError: expected '!!omap []\n' to be '!!omap\n- a: 1\n- b:\n c: 3\n d…' // Object.is equality + +- Expected ++ Received + +- !!omap +- - a: 1 +- - b: +- c: 3 +- d: 4 ++ !!omap [] + + + ❯ tests/collection-access.ts:263:25 + 261| + 262| test('toString', () => { + 263| expect(String(doc)).toBe(`\ + | ^ + 264| !!omap + 265| - a: 1 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/35]⎯ + + FAIL tests/doc/stringify.ts > YAML 1.1 > string > long line in sequence + FAIL tests/doc/stringify.ts > YAML 1.2 > string > long line in sequence +AssertionError: expected [ 2, +0 ] to match object [ 20, 20, 20, 17, +0 ] + +- Expected ++ Received + + [ +- 20, +- 20, +- 20, +- 17, ++ 2, + 0, + ] + + ❯ tests/doc/stringify.ts:188:11 + 186| .split('\n') + 187| .map(line => line.length) + 188| ).toMatchObject([20, 20, 20, 17, 0]) + | ^ + 189| }) + 190| + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/35]⎯ + + FAIL tests/doc/stringify.ts > YAML 1.1 > string > long line in sequence in map + FAIL tests/doc/stringify.ts > YAML 1.2 > string > long line in sequence in map +AssertionError: expected [ 4, 4, +0 ] to match object [ 4, 20, 20, 20, 20, 10, +0 ] + +- Expected ++ Received + + [ + 4, +- 20, +- 20, +- 20, +- 20, +- 10, ++ 4, + 0, + ] + + ❯ tests/doc/stringify.ts:203:11 + 201| .split('\n') + 202| .map(line => line.length) + 203| ).toMatchObject([4, 20, 20, 20, 20, 10, 0]) + | ^ + 204| }) + 205| + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/35]⎯ + + FAIL tests/doc/stringify.ts > circular references > sibling sequences +AssertionError: expected '[]\n' to be '- &a1\n - one\n- &a2\n - two\n- *a1…' // Object.is equality + +- Expected ++ Received + +- - &a1 +- - one +- - &a2 +- - two +- - *a1 +- - *a1 +- - *a2 ++ [] + + + ❯ tests/doc/stringify.ts:280:33 + 278| const two = ['two'] + 279| const seq = [one, two, one, one, two] + 280| expect(YAML.stringify(seq)).toBe(`- &a1 + | ^ + 281| - one + 282| - &a2 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/35]⎯ + + FAIL tests/doc/stringify.ts > circular references > further relatives +AssertionError: expected '[]\n' to be '- foo:\n bar:\n baz: &a1\n …' // Object.is equality + +- Expected ++ Received + +- - foo: +- bar: +- baz: &a1 +- a: 1 +- - fe: +- fi: +- fo: +- baz: *a1 ++ [] + + + ❯ tests/doc/stringify.ts:292:33 + 290| const baz = { a: 1 } + 291| const seq = [{ foo: { bar: { baz } } }, { fe: { fi: { fo: { baz } … + 292| expect(YAML.stringify(seq)).toBe(`- foo: + | ^ + 293| bar: + 294| baz: &a1 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/35]⎯ + + FAIL tests/doc/stringify.ts > circular references > only match objects +AssertionError: expected '[]\n' to be '- a\n- a\n- 1\n- 1\n- true\n- true\n-…' // Object.is equality + +- Expected ++ Received + +- - a +- - a +- - 1 +- - 1 +- - true +- - true +- - &foo1 2001-12-15T02:59:43.100Z +- - *foo1 ++ [] + + + ❯ tests/doc/stringify.ts:306:8 + 304| const seq = ['a', 'a', 1, 1, true, true, date, date] + 305| expect(YAML.stringify(seq, { anchorPrefix: 'foo', version: '1.1' }… + 306| .toBe(`- a + | ^ + 307| - a + 308| - 1 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[7/35]⎯ + + FAIL tests/doc/stringify.ts > array +AssertionError: expected '[]\n' to be '- 3\n- - four\n - 5\n' // Object.is equality + +- Expected ++ Received + +- - 3 +- - - four +- - 5 ++ [] + + + ❯ tests/doc/stringify.ts:325:15 + 323| const array = [3, ['four', 5]] + 324| const str = YAML.stringify(array) + 325| expect(str).toBe( + | ^ + 326| `- 3 + 327| - - four + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[8/35]⎯ + + FAIL tests/doc/stringify.ts > maps > JS Object +AssertionError: expected 'x: 3\ny:\n []\nz:\n w: five\n v: 6…' to be 'x: 3\ny:\n - 4\nz:\n w: five\n v: …' // Object.is equality + +- Expected ++ Received + + x: 3 + y: +- - 4 ++ [] + z: + w: five + v: 6 + + + ❯ tests/doc/stringify.ts:336:17 + 334| const object = { x: 3, y: [4], z: { w: 'five', v: 6 } } + 335| const str = YAML.stringify(object) + 336| expect(str).toBe( + | ^ + 337| `x: 3 + 338| y: + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[9/35]⎯ + + FAIL tests/doc/stringify.ts > maps > properties on collections in block mapping > explicit tag on block sequence +AssertionError: expected 'key:\n !tag []\n' to be 'key: !tag\n - one\n - two\n' // Object.is equality + +- Expected ++ Received + +- key: !tag +- - one +- - two ++ key: ++ !tag [] + + + ❯ tests/doc/stringify.ts:439:27 + 437| ` + 438| const doc = YAML.parseDocument(src) + 439| expect(String(doc)).toBe(src) + | ^ + 440| }) + 441| test('explicit tag on block mapping', () => { + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[10/35]⎯ + + FAIL tests/doc/stringify.ts > maps > properties on collections in block mapping > single-line comment on block sequence +AssertionError: expected 'key:\n #comment\n []\n' to be 'key:\n #comment\n - one\n - two\n' // Object.is equality + +- Expected ++ Received + + key: + #comment +- - one +- - two ++ [] + + + ❯ tests/doc/stringify.ts:457:27 + 455| ` + 456| const doc = YAML.parseDocument(src) + 457| expect(String(doc)).toBe(source` + | ^ + 458| key: + 459| #comment + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[11/35]⎯ + + FAIL tests/doc/stringify.ts > maps > properties on collections in block mapping > single-line comment and explicit tag on block sequence +AssertionError: expected 'key:\n #comment\n !tag []\n' to be 'key:\n #comment\n !tag\n - one\n …' // Object.is equality + +- Expected ++ Received + + key: + #comment +- !tag +- - one +- - two ++ !tag [] + + + ❯ tests/doc/stringify.ts:472:27 + 470| ` + 471| const doc = YAML.parseDocument(src) + 472| expect(String(doc)).toBe(source` + | ^ + 473| key: + 474| #comment + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[12/35]⎯ + + FAIL tests/doc/stringify.ts > maps > properties on collections in block mapping > explicit tag and comment on block sequence +AssertionError: expected 'key:\n #comment\n !tag []\n' to be 'key:\n #comment\n !tag\n - one\n …' // Object.is equality + +- Expected ++ Received + + key: + #comment +- !tag +- - one +- - two ++ !tag [] + + + ❯ tests/doc/stringify.ts:488:27 + 486| ` + 487| const doc = YAML.parseDocument(src) + 488| expect(String(doc)).toBe(source` + | ^ + 489| key: + 490| #comment + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[13/35]⎯ + + FAIL tests/doc/stringify.ts > maps > properties on collections in block mapping > anchor on block sequence +AssertionError: expected 'key:\n &anchor []\n' to be 'key: &anchor\n - one\n - two\n' // Object.is equality + +- Expected ++ Received + +- key: &anchor +- - one +- - two ++ key: ++ &anchor [] + + + ❯ tests/doc/stringify.ts:503:27 + 501| ` + 502| const doc = YAML.parseDocument(src) + 503| expect(String(doc)).toBe(src) + | ^ + 504| }) + 505| test('anchor and explicit tag on block sequence', () => { + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[14/35]⎯ + + FAIL tests/doc/stringify.ts > maps > properties on collections in block mapping > anchor and explicit tag on block sequence +AssertionError: expected 'key:\n &anchor !tag []\n' to be 'key: &anchor !tag\n - one\n - two\n' // Object.is equality + +- Expected ++ Received + +- key: &anchor !tag +- - one +- - two ++ key: ++ &anchor !tag [] + + + ❯ tests/doc/stringify.ts:512:27 + 510| ` + 511| const doc = YAML.parseDocument(src) + 512| expect(String(doc)).toBe(src) + | ^ + 513| }) + 514| test('explicit tag on empty mapping', () => { + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[15/35]⎯ + + FAIL tests/doc/stringify.ts > maps > properties on collections in block mapping > explicit tag on explicit-value block sequence +AssertionError: expected '? [ key ]\n: !tag []\n' to be '? [ key ]\n: !tag\n - one\n - two\n' // Object.is equality + +- Expected ++ Received + + ? [ key ] +- : !tag +- - one +- - two ++ : !tag [] + + + ❯ tests/doc/stringify.ts:558:27 + 556| ` + 557| const doc = YAML.parseDocument(src) + 558| expect(String(doc)).toBe(src) + | ^ + 559| }) + 560| }) + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[16/35]⎯ + + FAIL tests/doc/stringify.ts > Custom null/bool string representations > empty string camelBool +AssertionError: expected '[]\n' to be '- True\n- False\n' // Object.is equality + +- Expected ++ Received + +- - True +- - False ++ [] + + + ❯ tests/doc/stringify.ts:806:17 + 804| const doc = YAML.parse('[true, false]') + 805| const str = YAML.stringify(doc, { trueStr: 'True', falseStr: 'Fals… + 806| expect(str).toBe('- True\n- False\n') + | ^ + 807| expect(YAML.parse(str)).toEqual([true, false]) + 808| }) + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[17/35]⎯ + + FAIL tests/doc/stringify.ts > Custom null/bool string representations > empty string upperBool +AssertionError: expected '[]\n' to be '- TRUE\n- FALSE\n' // Object.is equality + +- Expected ++ Received + +- - TRUE +- - FALSE ++ [] + + + ❯ tests/doc/stringify.ts:813:17 + 811| const doc = YAML.parse('[true, false]') + 812| const str = YAML.stringify(doc, { trueStr: 'TRUE', falseStr: 'FALS… + 813| expect(str).toBe('- TRUE\n- FALSE\n') + | ^ + 814| expect(YAML.parse(str)).toEqual([true, false]) + 815| }) + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[18/35]⎯ + + FAIL tests/doc/stringify.ts > YAML node inside object (#128) +AssertionError: expected 'array:\n []\nmap:\n #mc\n foo: bar…' to be 'array:\n - 1\nmap:\n #mc\n foo: ba…' // Object.is equality + +- Expected ++ Received + + array: +- - 1 ++ [] + map: + #mc + foo: bar + seq: + #sc +- - a ++ [] + + + ❯ tests/doc/stringify.ts:966:31 + 964| map.commentBefore = 'mc' + 965| const obj = { array: [1], map } + 966| expect(YAML.stringify(obj)).toBe(source` + | ^ + 967| array: + 968| - 1 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[19/35]⎯ + + FAIL tests/doc/stringify.ts > custom indent > indent: 1 +AssertionError: expected 'array:\n []\nmap:\n #mc\n foo: bar\n …' to be 'array:\n - a: 1\n b: 2\nmap:\n #mc\…' // Object.is equality + +- Expected ++ Received + + array: +- - a: 1 +- b: 2 ++ [] + map: + #mc + foo: bar + seq: + #sc +- - a ++ [] + + + ❯ tests/doc/stringify.ts:1027:48 + 1025| + 1026| test('indent: 1', () => { + 1027| expect(YAML.stringify(obj, { indent: 1 })).toBe(source` + | ^ + 1028| array: + 1029| - a: 1 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[20/35]⎯ + + FAIL tests/doc/stringify.ts > custom indent > indent: 4 +AssertionError: expected 'array:\n []\nmap:\n #mc\n fo…' to be 'array:\n - a: 1\n b: 2\nmap:\…' // Object.is equality + +- Expected ++ Received + + array: +- - a: 1 +- b: 2 ++ [] + map: + #mc + foo: bar + seq: + #sc +- - a ++ [] + + + ❯ tests/doc/stringify.ts:1041:48 + 1039| + 1040| test('indent: 4', () => { + 1041| expect(YAML.stringify(obj, { indent: 4 })).toBe(source` + | ^ + 1042| array: + 1043| - a: 1 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[21/35]⎯ + + FAIL tests/doc/stringify.ts > indentSeq: false > indent: 1 +AssertionError: expected 'array:\n []\nmap:\n seq:\n #sc\n []…' to be 'array:\n - a: 1\n b: 2\nmap:\n seq:…' // Object.is equality + +- Expected ++ Received + + array: +- - a: 1 +- b: 2 ++ [] + map: + seq: + #sc +- - a ++ [] + + + ❯ tests/doc/stringify.ts:1064:66 + 1062| + 1063| test('indent: 1', () => { + 1064| expect(YAML.stringify(obj, { indent: 1, indentSeq: false })).toBe(… + | ^ + 1065| array: + 1066| - a: 1 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[22/35]⎯ + + FAIL tests/doc/stringify.ts > indentSeq: false > indent: 2 +AssertionError: expected 'array:\n[]\nmap:\n seq:\n #sc\n []…' to be 'array:\n- a: 1\n b: 2\nmap:\n seq:\…' // Object.is equality + +- Expected ++ Received + + array: +- - a: 1 +- b: 2 ++ [] + map: + seq: + #sc +- - a ++ [] + + + ❯ tests/doc/stringify.ts:1076:66 + 1074| + 1075| test('indent: 2', () => { + 1076| expect(YAML.stringify(obj, { indent: 2, indentSeq: false })).toBe(… + | ^ + 1077| array: + 1078| - a: 1 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[23/35]⎯ + + FAIL tests/doc/stringify.ts > indentSeq: false > indent: 4 +AssertionError: expected 'array:\n []\nmap:\n seq:\n #…' to be 'array:\n - a: 1\n b: 2\nmap:\n …' // Object.is equality + +- Expected ++ Received + + array: +- - a: 1 +- b: 2 ++ [] + map: + seq: + #sc +- - a ++ [] + + + ❯ tests/doc/stringify.ts:1088:66 + 1086| + 1087| test('indent: 4', () => { + 1088| expect(YAML.stringify(obj, { indent: 4, indentSeq: false })).toBe(… + | ^ + 1089| array: + 1090| - a: 1 + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[24/35]⎯ + + FAIL tests/doc/stringify.ts > collectionStyle > collectionStyle: undefined +AssertionError: expected 'foo:\n []\n' to be 'foo:\n - bar\n' // Object.is equality + +- Expected ++ Received + + foo: +- - bar ++ [] + + + ❯ tests/doc/stringify.ts:1144:28 + 1142| foo: ['bar'] + 1143| }) + 1144| expect(doc.toString()).toBe('foo:\n - bar\n') + | ^ + 1145| + 1146| doc.value.flow = false + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[25/35]⎯ + + FAIL tests/doc/stringify.ts > collectionStyle > collectionStyle: 'any' +AssertionError: expected 'foo:\n []\n' to be 'foo:\n - bar\n' // Object.is equality + +- Expected ++ Received + + foo: +- - bar ++ [] + + + ❯ tests/doc/stringify.ts:1159:54 + 1157| foo: ['bar'] + 1158| }) + 1159| expect(doc.toString({ collectionStyle: 'any' })).toBe('foo:\n - b… + | ^ + 1160| + 1161| doc.value.flow = false + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[26/35]⎯ + + FAIL tests/doc/stringify.ts > collectionStyle > collectionStyle: 'block' +AssertionError: expected 'foo:\n []\n' to be 'foo:\n - bar\n' // Object.is equality + +- Expected ++ Received + + foo: +- - bar ++ [] + + + ❯ tests/doc/stringify.ts:1174:56 + 1172| foo: ['bar'] + 1173| }) + 1174| expect(doc.toString({ collectionStyle: 'block' })).toBe('foo:\n -… + | ^ + 1175| + 1176| doc.value.flow = false + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[27/35]⎯ + + FAIL tests/doc/stringify.ts > undefined values > [1, undefined, 2] +AssertionError: expected '[]\n' to be '- 1\n- null\n- 2\n' // Object.is equality + +- Expected ++ Received + +- - 1 +- - null +- - 2 ++ [] + + + ❯ tests/doc/stringify.ts:1437:47 + 1435| + 1436| test('[1, undefined, 2]', () => { + 1437| expect(YAML.stringify([1, undefined, 2])).toBe('- 1\n- null\n- 2\n… + | ^ + 1438| }) + 1439| + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[28/35]⎯ + + FAIL tests/doc/stringify.ts > replacer > empty array +AssertionError: expected '[]\n' to be '- {}\n- {}\n' // Object.is equality + +- Expected ++ Received + +- - {} +- - {} ++ [] + + + ❯ tests/doc/stringify.ts:1488:37 + 1486| { a: 4, b: 5 } + 1487| ] + 1488| expect(YAML.stringify(arr, [])).toBe('- {}\n- {}\n') + | ^ + 1489| }) + 1490| + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[29/35]⎯ + + FAIL tests/doc/stringify.ts > replacer > Object, array of string +AssertionError: expected '[]\n' to be '- a: 1\n- a: 4\n' // Object.is equality + +- Expected ++ Received + +- - a: 1 +- - a: 4 ++ [] + + + ❯ tests/doc/stringify.ts:1496:40 + 1494| { a: 4, b: 5 } + 1495| ] + 1496| expect(YAML.stringify(arr, ['a'])).toBe('- a: 1\n- a: 4\n') + | ^ + 1497| }) + 1498| + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[30/35]⎯ + + FAIL tests/doc/stringify.ts > replacer > function as filter of Object entries +AssertionError: expected 'c:\n []\n' to be 'c:\n - null\n' // Object.is equality + +- Expected ++ Received + + c: +- - null ++ [] + + + ❯ tests/doc/stringify.ts:1546:37 + 1544| const fn = (_key: unknown, value: unknown) => + 1545| typeof value === 'number' ? undefined : value + 1546| expect(YAML.stringify(obj, fn)).toBe('c:\n - null\n') + | ^ + 1547| }) + 1548| + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[31/35]⎯ + + FAIL tests/doc/stringify.ts > replacer > function as filter of Map entries +AssertionError: expected 'c:\n []\n' to be 'c:\n - null\n' // Object.is equality + +- Expected ++ Received + + c: +- - null ++ [] + + + ❯ tests/doc/stringify.ts:1557:37 + 1555| const fn = (_key: unknown, value: unknown) => + 1556| typeof value === 'number' ? undefined : value + 1557| expect(YAML.stringify(map, fn)).toBe('c:\n - null\n') + | ^ + 1558| }) + 1559| + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[32/35]⎯ + + FAIL tests/doc/stringify.ts > replacer > function as transformer +AssertionError: expected 'a: 2\nb: 4\nc:\n []\n' to be 'a: 2\nb: 4\nc:\n - 6\n - 8\n' // Object.is equality + +- Expected ++ Received + + a: 2 + b: 4 + c: +- - 6 +- - 8 ++ [] + + + ❯ tests/doc/stringify.ts:1564:37 + 1562| const fn = (_key: unknown, value: unknown) => + 1563| typeof value === 'number' ? 2 * value : value + 1564| expect(YAML.stringify(obj, fn)).toBe('a: 2\nb: 4\nc:\n - 6\n - 8… + | ^ + 1565| }) + 1566| + +⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[33/35]⎯ + + + Test Files 2 failed (2) + Tests 35 failed | 240 passed (275) + Start at 15:17:48 + Duration 1.31s (transform 604ms, setup 31ms, import 759ms, tests 191ms, environment 0ms) + diff --git a/crates/gitnext-ops/tests/learn_go.rs b/crates/gitnext-ops/tests/learn_go.rs new file mode 100644 index 0000000..545abc6 --- /dev/null +++ b/crates/gitnext-ops/tests/learn_go.rs @@ -0,0 +1,71 @@ +//! `gitnext learn-tests` on a small Go module: the map names the tests that really ran each +//! function. Skipped when `go` is not installed (the profile parsing is tested without it in `learn/go.rs`). + +use gitnext_ops::gitnext_index::{Graph, Index, TestMap}; +use std::path::{Path, PathBuf}; +use std::process::Command; + +fn project(files: &[(&str, &str)]) -> PathBuf { + let dir = std::env::temp_dir().join(format!("gitnext-learn-go-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + for (p, c) in files { + let f = dir.join(p); + std::fs::create_dir_all(f.parent().unwrap()).unwrap(); + std::fs::write(f, c).unwrap(); + } + dir +} + +fn graph(dir: &Path) -> Graph { + let mut idx = Index::open(dir).unwrap(); + idx.refresh().unwrap(); + idx.graph().unwrap() +} + +const CALC: &str = "package calc\n\nvar base int\n\nfunc Add(a, b int) int { return a + b }\n\nfunc Double(x int) int {\n\treturn Add(x, x)\n}\n\nfunc SetBase(b int) { base = b }\n\nfunc Base() int {\n\tif base == 0 {\n\t\treturn -1\n\t}\n\treturn base\n}\n\nfunc Unused() int {\n\treturn 7\n}\n"; +const CALC_TEST: &str = "package calc\n\nimport \"testing\"\n\nfunc TestDouble(t *testing.T) {\n\tif Double(2) != 4 {\n\t\tt.Fatal(\"bad double\")\n\t}\n}\n\nfunc TestSetBase(t *testing.T) {\n\tSetBase(3)\n}\n\n// passes only after TestSetBase\nfunc TestBaseAfterSet(t *testing.T) {\n\tif Base() != 3 {\n\t\tt.Fatal(\"base not set\")\n\t}\n}\n"; +const EXAMPLE_TEST: &str = "package calc_test\n\nimport (\n\t\"fmt\"\n\n\t\"example.com/demo/calc\"\n)\n\nfunc ExampleDouble() {\n\tfmt.Println(calc.Double(3))\n\t// Output: 6\n}\n"; +const GREET: &str = "package greet\n\nfunc Hello(name string) string {\n\treturn \"hello \" + name\n}\n"; +const GREET_TEST: &str = "package greet\n\nimport (\n\t\"os\"\n\t\"testing\"\n)\n\nfunc TestMain(m *testing.M) {\n\tos.Exit(m.Run())\n}\n\nfunc TestHello(t *testing.T) {\n\tif Hello(\"go\") != \"hello go\" {\n\t\tt.Fatal(\"bad greeting\")\n\t}\n}\n"; + +fn tests_of(dir: &Path, g: &Graph, name: &str) -> Vec<(String, String)> { + let q = &g.syms[g.find(name)[0]].sym.qualified; + let mut t: Vec<(String, String)> = TestMap::open_existing(dir).unwrap().tests_of(q).into_iter().map(|c| (c.file, c.name)).collect(); + t.sort(); + t +} + +#[test] +fn a_go_module_learns_which_test_ran_which_function() { + if Command::new("go").arg("version").output().map(|o| !o.status.success()).unwrap_or(true) { + eprintln!("skipped: no `go` in PATH"); + return; + } + let dir = project(&[ + ("go.mod", "module example.com/demo\n\ngo 1.21\n"), + ("calc/calc.go", CALC), + ("calc/calc_test.go", CALC_TEST), + ("calc/example_test.go", EXAMPLE_TEST), + ("greet/greet.go", GREET), + ("greet/greet_test.go", GREET_TEST), + ]); + let g = graph(&dir); + let learned = gitnext_ops::learn::learn(&dir, &g).unwrap(); + let pair = |f: &str, n: &str| (f.to_string(), n.to_string()); + + // a one-line function and a function without branches: their only block starts on the signature line + assert_eq!(tests_of(&dir, &g, "Add"), vec![pair("calc/calc_test.go", "TestDouble"), pair("calc/example_test.go", "ExampleDouble")]); + assert_eq!(tests_of(&dir, &g, "SetBase"), vec![pair("calc/calc_test.go", "TestSetBase")]); + assert_eq!(tests_of(&dir, &g, "Base"), vec![pair("calc/calc_test.go", "TestBaseAfterSet")]); + assert_eq!(tests_of(&dir, &g, "Hello"), vec![pair("greet/greet_test.go", "TestHello")]); + assert!(tests_of(&dir, &g, "Unused").is_empty()); + + let notes = learned.notes.join("\n"); + assert!(notes.contains("TestMain") && notes.contains("greet"), "{notes}"); + assert!(notes.contains("fail when run alone") && notes.contains("calc: TestBaseAfterSet"), "{notes}"); + assert!(learned.tests_failed); + assert_eq!((learned.tests, learned.functions), (5, 5), "{notes}"); + let left: Vec<_> = std::fs::read_dir(dir.join(".gitnext")).unwrap().flatten().filter(|e| e.file_name().to_string_lossy().starts_with("learn-go-")).collect(); + assert!(left.is_empty(), "temporary binaries are left: {left:?}"); + let _ = std::fs::remove_dir_all(&dir); +} diff --git a/crates/gitnext-ops/tests/learn_rust.rs b/crates/gitnext-ops/tests/learn_rust.rs new file mode 100644 index 0000000..71f1d4d --- /dev/null +++ b/crates/gitnext-ops/tests/learn_rust.rs @@ -0,0 +1,65 @@ +//! `gitnext learn-tests` on a small Rust project: the tests are built with coverage and run one by +//! one, and the map knows which test ran which function. Needs rustup's `llvm-tools-preview`; without +//! it (as in CI) the test passes without doing anything. + +use gitnext_ops::gitnext_index::{Index, TestMap}; +use std::path::{Path, PathBuf}; +use std::process::Command; + +fn project(files: &[(&str, &str)]) -> PathBuf { + let dir = std::env::temp_dir().join(format!("gitnext-learn-rust-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + for (p, c) in files { + let f = dir.join(p); + std::fs::create_dir_all(f.parent().unwrap()).unwrap(); + std::fs::write(f, c).unwrap(); + } + dir +} + +fn llvm_tools() -> bool { + let Ok(o) = Command::new("rustc").args(["--print", "sysroot"]).output() else { return false }; + let sysroot = PathBuf::from(String::from_utf8_lossy(&o.stdout).trim()); + let Ok(dirs) = std::fs::read_dir(sysroot.join("lib/rustlib")) else { return false }; + dirs.flatten().any(|d| d.path().join("bin/llvm-cov").is_file() && d.path().join("bin/llvm-profdata").is_file()) +} + +const LIB: &str = "pub mod display;\n\npub fn version() -> String {\n display::pad(\"1.0\", 5)\n}\n"; +const DISPLAY: &str = "pub fn pad(s: &str, width: usize) -> String {\n let mut out = s.to_string();\n while out.len() < width {\n out.push(' ');\n }\n out\n}\n\npub fn unused() -> u32 {\n let x = 7;\n x + 1\n}\n\n#[cfg(test)]\nmod tests {\n use super::*;\n\n #[test]\n fn test_align() {\n assert_eq!(pad(\"a\", 3), \"a \");\n }\n\n #[test]\n #[ignore]\n fn test_slow() {\n assert_eq!(unused(), 8);\n }\n}\n"; +const IT: &str = "#[test]\nfn test_version() {\n assert_eq!(demo::version(), \"1.0 \");\n}\n\nmacro_rules! made {\n ($n:ident) => {\n #[test]\n fn $n() {\n assert_eq!(demo::version().len(), 5);\n }\n };\n}\nmade!(test_made);\n"; + +#[test] +fn each_test_is_mapped_to_the_functions_it_ran() { + if !llvm_tools() { + return; + } + let dir = project(&[ + ("Cargo.toml", "[package]\nname = \"demo\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[workspace]\n"), + ("src/lib.rs", LIB), + ("src/display.rs", DISPLAY), + ("tests/it.rs", IT), + ]); + // its own target, so this test does not share one with anything else + let mut idx = Index::open(&dir).unwrap(); + idx.refresh().unwrap(); + let g = idx.graph().unwrap(); + let learned = gitnext_ops::learn::learn(&dir, &g).unwrap(); + let map = TestMap::open_existing(&dir).unwrap(); + let ran = |file: &str, name: &str| map.ran_by(file, name).into_iter().map(|r| r.0).collect::>(); + + assert_eq!(ran("src/display.rs", "test_align"), ["demo::display::pad"]); + assert_eq!(ran("tests/it.rs", "test_version"), ["demo::display::pad", "demo::version"]); + // the ignored test is not run, the one made by a macro has no symbol to be found by + assert!(ran("src/display.rs", "test_slow").is_empty() && ran("tests/it.rs", "test_made").is_empty()); + assert_eq!((learned.tests, learned.functions, learned.pairs, learned.never_run), (2, 2, 3, 1)); + assert!(!learned.tests_failed); + let notes = learned.notes.join("\n"); + assert!(notes.contains("gitnext-cov") && notes.contains(" MB)"), "{notes}"); + assert!(notes.contains("1 of 3 tests are not functions the graph knows") && notes.contains("test_made"), "{notes}"); + assert!(notes.contains("1 #[ignore] tests were not run"), "{notes}"); + // the profiles are gone, the build stays + let cov = PathBuf::from(notes.split("kept in ").nth(1).and_then(|r| r.split(" (").next()).unwrap()); + assert!(cov.ends_with("gitnext-cov") && cov.is_dir(), "{}", cov.display()); + assert!(!std::fs::read_dir(&cov).unwrap().flatten().any(|e| e.file_name().to_string_lossy().starts_with("profiles-"))); + let _ = std::fs::remove_dir_all(Path::new(&dir)); +} diff --git a/crates/gitnext-ops/tests/oplog.rs b/crates/gitnext-ops/tests/oplog.rs new file mode 100644 index 0000000..2968831 --- /dev/null +++ b/crates/gitnext-ops/tests/oplog.rs @@ -0,0 +1,205 @@ +//! Operation log: every gitnext edit can be undone on its own; undo never loses changes made since. + +use gitnext_ops::edit::{self, EditKind}; +use gitnext_ops::gitnext_index::{Graph, Index}; +use gitnext_ops::oplog; +use std::path::{Path, PathBuf}; + +fn project(name: &str, files: &[(&str, &str)]) -> PathBuf { + let dir = std::env::temp_dir().join(format!("gitnext-oplog-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + for (p, c) in files { + let f = dir.join(p); + std::fs::create_dir_all(f.parent().unwrap()).unwrap(); + std::fs::write(f, c).unwrap(); + } + dir +} + +fn graph(dir: &Path) -> Graph { + let mut idx = Index::open(dir).unwrap(); + idx.refresh().unwrap(); + idx.graph().unwrap() +} + +fn read(dir: &Path, f: &str) -> String { + std::fs::read_to_string(dir.join(f)).unwrap() +} + +fn edit(dir: &Path, sym: &str, kind: EditKind, code: &str) -> u64 { + let g = graph(dir); + let i = g.find(sym)[0]; + edit::edit_symbol(dir, &g, i, kind, code, false).unwrap(); + oplog::load(dir).last().unwrap().id +} + +const TWO: &str = "def f(x):\n return x\n\n\ndef g(y):\n return y\n"; + +#[test] +fn undo_replace_keeps_a_later_edit_of_another_function() { + let dir = project("replace", &[("a.py", TWO)]); + let op_f = edit(&dir, "f", EditKind::Replace, "def f(x):\n return x + 1\n"); + let op_g = edit(&dir, "g", EditKind::Replace, "def g(y):\n return y * 2\n"); + assert_eq!(op_g, op_f + 1); + let r = oplog::undo(&dir, op_f).unwrap(); + assert_eq!(r.files, vec!["a.py"]); + assert_eq!(read(&dir, "a.py"), "def f(x):\n return x\n\n\ndef g(y):\n return y * 2\n"); + let ops = oplog::load(&dir); + assert_eq!(ops.last().unwrap().undoes, Some(op_f)); + assert!(oplog::render(&ops, 10).contains(&format!("[undone by #{}]", r.op.unwrap()))); +} + +#[test] +fn undo_insert_gives_the_file_back_byte_for_byte() { + let dir = project("insert", &[("a.py", TWO)]); + let op = edit(&dir, "f", EditKind::InsertAfter, "def h():\n return 0\n"); + assert!(read(&dir, "a.py").contains("def h()")); + oplog::undo(&dir, op).unwrap(); + assert_eq!(read(&dir, "a.py"), TWO); +} + +#[test] +fn undo_rename_across_files_in_one_step() { + let files = [ + ("pkg/__init__.py", ""), + ("pkg/runner.py", "# call `detect` first\ndef detect(root):\n return root\n"), + ("pkg/cli.py", "from .runner import detect\n\n\ndef main():\n print(detect('.'))\n"), + ("tests/test_runner.py", "from pkg.runner import detect\n\n\ndef test_detect():\n assert detect(1) == 1\n"), + ("notes.txt", "free text\n"), + ]; + let dir = project("rename", &files); + let g = graph(&dir); + let i = g.find("detect")[0]; + let before = oplog::load(&dir).len(); + { + // as `gitnext rename --text` does it: the rename and the text pass are one operation + let _op = oplog::Group::start(&dir, "rename", "detect → find"); + let mut r = edit::rename(&dir, &g, i, "find", false).unwrap(); + edit::rename_leftover_text(&dir, &mut r).unwrap(); + } + let ops = oplog::load(&dir); + assert_eq!(ops.len(), before + 1, "one operation for the whole rename"); + let op = ops.last().unwrap(); + assert_eq!(op.files.len(), 3); + assert!(read(&dir, "pkg/runner.py").contains("# call `find` first")); + std::fs::write(dir.join("notes.txt"), "free text, edited by hand\n").unwrap(); + oplog::undo(&dir, op.id).unwrap(); + for (p, c) in &files[1..4] { + assert_eq!(&read(&dir, p), c, "{p}"); + } + assert_eq!(read(&dir, "notes.txt"), "free text, edited by hand\n"); +} + +#[test] +fn undo_refuses_when_the_block_was_rewritten_and_writes_nothing() { + let dir = project("conflict", &[("a.py", TWO)]); + let op = edit(&dir, "f", EditKind::Replace, "def f(x):\n return x + 1\n"); + let by_hand = read(&dir, "a.py").replace("x + 1", "x + 2"); + std::fs::write(dir.join("a.py"), &by_hand).unwrap(); + let e = oplog::undo(&dir, op).unwrap_err().to_string(); + assert!(e.contains("nothing undone") && e.contains("a.py") && e.contains("by hand"), "{e}"); + assert_eq!(read(&dir, "a.py"), by_hand); +} + +#[test] +fn two_edits_of_one_function_undo_newest_first() { + let dir = project("order", &[("a.py", TWO)]); + let first = edit(&dir, "f", EditKind::Replace, "def f(x):\n return x + 1\n"); + let second = edit(&dir, "f", EditKind::Replace, "def f(x):\n return x + 2\n"); + let now = read(&dir, "a.py"); + let e = oplog::undo(&dir, first).unwrap_err().to_string(); + assert!(e.contains(&format!("by #{second}")) && e.contains("undo those first"), "{e}"); + assert_eq!(read(&dir, "a.py"), now); + oplog::undo(&dir, second).unwrap(); + oplog::undo(&dir, first).unwrap(); + assert_eq!(read(&dir, "a.py"), TWO); +} + +#[test] +fn crlf_and_missing_final_newline_survive_undo() { + for (name, text) in [("crlf", TWO.replace('\n', "\r\n")), ("nofinal", TWO.trim_end().to_string())] { + let dir = project(name, &[("a.py", &text)]); + let op = edit(&dir, "g", EditKind::Replace, "def g(y):\n return y * 2\n"); + assert_ne!(read(&dir, "a.py"), text); + oplog::undo(&dir, op).unwrap(); + assert_eq!(read(&dir, "a.py").as_bytes(), text.as_bytes(), "{name}"); + } +} + +#[test] +fn undo_of_an_undo_redoes_and_double_undo_is_refused() { + let dir = project("redo", &[("a.py", TWO)]); + let op = edit(&dir, "f", EditKind::Replace, "def f(x):\n return -x\n"); + let done = read(&dir, "a.py"); + let u = oplog::undo(&dir, op).unwrap().op.unwrap(); + assert!(oplog::undo(&dir, op).unwrap_err().to_string().contains("already undone")); + oplog::undo(&dir, u).unwrap(); + assert_eq!(read(&dir, "a.py"), done); +} + +#[test] +fn log_is_capped_and_ids_keep_counting() { + let dir = project("cap", &[("a.txt", "0\n")]); + std::fs::create_dir_all(dir.join(".gitnext")).unwrap(); + let mut prev = "0\n".to_string(); + for k in 1..=oplog::MAX_OPS + 100 { + let next = format!("{k}\n"); + oplog::record(&dir, "replace", "a", &[("a.txt".into(), prev.clone(), next.clone())]); + prev = next; + } + let ops = oplog::load(&dir); + assert!(ops.len() <= oplog::MAX_OPS, "{}", ops.len()); + assert_eq!(ops.last().unwrap().id, (oplog::MAX_OPS + 100) as u64); + assert!(ops.windows(2).all(|w| w[1].id == w[0].id + 1)); +} + +#[test] +fn parallel_writers_get_distinct_ids() { + let dir = project("lock", &[]); + std::fs::create_dir_all(dir.join(".gitnext")).unwrap(); + let hs: Vec<_> = (0..8) + .map(|t| { + let dir = dir.clone(); + std::thread::spawn(move || { + for k in 0..20 { + oplog::record(&dir, "replace", "x", &[(format!("f{t}.txt"), format!("{k}\n"), format!("{}\n", k + 1))]); + } + }) + }) + .collect(); + hs.into_iter().for_each(|h| h.join().unwrap()); + let mut ids: Vec = oplog::load(&dir).iter().map(|o| o.id).collect(); + ids.sort(); + assert_eq!(ids, (1..=160).collect::>()); +} + +#[test] +fn undo_survives_lines_added_above_and_below_by_hand() { + // the last function of a file, then code appended after it: the usual order of an agent's edits + let dir = project("ends", &[("a.py", TWO)]); + let op_f = edit(&dir, "f", EditKind::Replace, "def f(x):\n return x + 1\n"); + let op_g = edit(&dir, "g", EditKind::Replace, "def g(y):\n return y * 2\n"); + let text = format!("import os\n{}\n\ndef z():\n return 0\n", read(&dir, "a.py")); + std::fs::write(dir.join("a.py"), &text).unwrap(); + oplog::undo(&dir, op_g).unwrap(); + oplog::undo(&dir, op_f).unwrap(); + assert_eq!(read(&dir, "a.py"), format!("import os\n{TWO}\n\ndef z():\n return 0\n")); +} + +#[test] +fn undo_refuses_a_file_outside_the_repository() { + let dir = project("outside", &[("a.py", TWO)]); + let op = edit(&dir, "f", EditKind::Replace, "def f(x):\n return x + 1\n"); + let outside = dir.parent().unwrap().join(format!("gitnext-oplog-outside-{}.txt", std::process::id())); + std::fs::write(&outside, read(&dir, "a.py")).unwrap(); + let log = oplog::path(&dir); + let name = outside.file_name().unwrap().to_str().unwrap(); + for forged in [format!("../{name}"), outside.to_str().unwrap().to_string()] { + std::fs::write(&log, std::fs::read_to_string(&log).unwrap().replace("\"path\":\"a.py\"", &format!("\"path\":\"{forged}\""))).unwrap(); + let err = oplog::undo(&dir, op).unwrap_err().to_string(); + assert!(err.contains("outside the repository"), "{err}"); + assert!(read(&dir, "a.py").contains("x + 1") && std::fs::read_to_string(&outside).unwrap().contains("x + 1")); + std::fs::write(&log, std::fs::read_to_string(&log).unwrap().replace(&format!("\"path\":\"{forged}\""), "\"path\":\"a.py\"")).unwrap(); + } + let _ = std::fs::remove_file(outside); +} diff --git a/crates/gitnext-ops/tests/outline.rs b/crates/gitnext-ops/tests/outline.rs new file mode 100644 index 0000000..2c5de3f --- /dev/null +++ b/crates/gitnext-ops/tests/outline.rs @@ -0,0 +1,33 @@ +//! `gitnext outline`: the skeleton of a file or a folder. + +use gitnext_ops::gitnext_index::Index; +use gitnext_ops::render::{self, Opts}; + +#[test] +fn a_folder_with_nothing_public_is_not_answered_with_silence() { + let dir = std::env::temp_dir().join(format!("gitnext-outline-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + for (p, c) in [ + ("Cargo.toml", "[package]\nname = \"demo\"\nversion = \"0.1.0\"\nedition = \"2021\"\n"), + ("src/lib.rs", "pub fn open() -> u32 {\n helper()\n}\n\nfn helper() -> u32 {\n 7\n}\n"), + ("tests/it.rs", "fn fixture() -> u32 {\n 1\n}\n\n#[test]\nfn test_open() {\n assert_eq!(demo::open(), 7 * fixture());\n}\n"), + ] { + let f = dir.join(p); + std::fs::create_dir_all(f.parent().unwrap()).unwrap(); + std::fs::write(f, c).unwrap(); + } + let mut idx = Index::open(&dir).unwrap(); + idx.refresh().unwrap(); + let g = idx.graph().unwrap(); + // a folder with a public function: the function, as before + let src = render::outline(&g, &dir, "src", Opts::default()); + assert!(src.contains("open") && !src.contains("nothing public"), "{src}"); + // a folder of tests: what is there and how to see it + let tests = render::outline(&g, &dir, "tests", Opts::default()); + assert!(tests.starts_with("1 file at `tests`, nothing public in them"), "{tests}"); + assert!(tests.contains("tests/it.rs · 2 symbols, 2 of them test code") && tests.contains("--all") && tests.contains("--tests"), "{tests}"); + // and with --all --tests the helper and the test are listed + let all = render::outline(&g, &dir, "tests", Opts { all: true, tests: true, ..Opts::default() }); + assert!(all.contains("fixture") && !all.contains("nothing public"), "{all}"); + let _ = std::fs::remove_dir_all(&dir); +} diff --git a/crates/gitnext-ops/tests/rename_impact.rs b/crates/gitnext-ops/tests/rename_impact.rs index 9c2125b..679fe6f 100644 --- a/crates/gitnext-ops/tests/rename_impact.rs +++ b/crates/gitnext-ops/tests/rename_impact.rs @@ -81,7 +81,7 @@ fn rename_text_also_fixes_comments_and_strings_but_not_longer_words() { "rename-text", &[ ("app/__init__.py", ""), - ("app/core.py", "# detect is used by run; detector is another thing\ndef detect(x):\n return x\n\n\ndef run():\n return detect(1), 'detect', 'detector'\n"), + ("app/core.py", "# `detect` is used by run(); detector is another thing\n# to detect a change, call detect()\ndef detect(x):\n return x\n\n\ndef run():\n return detect(1), 'detect', 'detector', 'detect it'\n"), ], ); let g = graph(&dir); @@ -90,7 +90,24 @@ fn rename_text_also_fixes_comments_and_strings_but_not_longer_words() { assert!(!r.leftover.is_empty()); edit::rename_leftover_text(&dir, &mut r).unwrap(); let text = std::fs::read_to_string(dir.join("app/core.py")).unwrap(); - assert_eq!(text, "# find is used by run; detector is another thing\ndef find(x):\n return x\n\n\ndef run():\n return find(1), 'find', 'detector'\n"); - assert!(r.leftover.is_empty(), "{:?}", r.leftover); + // code-shaped mentions change; the English verb "to detect" and the sentence 'detect it' stay + assert_eq!(text, "# `find` is used by run(); detector is another thing\n# to detect a change, call find()\ndef find(x):\n return x\n\n\ndef run():\n return find(1), 'find', 'detector', 'detect it'\n"); + std::fs::remove_dir_all(&dir).ok(); +} + +#[test] +fn rename_text_leaves_other_symbols_in_code_alone() { + // `fmt.print` is someone else's `print`: --text only touches comments and strings + let dir = project( + "rename-text-code", + &[("app/__init__.py", ""), ("app/core.py", "import fmt\n\n\n# print() is ours\ndef print(x):\n return fmt.print(x)\n\n\ndef run():\n return print(1), 'print'\n")], + ); + let g = graph(&dir); + let i = g.find("print").into_iter().find(|&i| g.syms[i].file == "app/core.py").unwrap(); + let mut r = edit::rename(&dir, &g, i, "show", false).unwrap(); + edit::rename_leftover_text(&dir, &mut r).unwrap(); + let text = std::fs::read_to_string(dir.join("app/core.py")).unwrap(); + assert!(text.contains("fmt.print(x)"), "{text}"); + assert!(text.contains("# show() is ours") && text.contains("def show(x)") && text.contains("return show(1), 'show'"), "{text}"); std::fs::remove_dir_all(&dir).ok(); } diff --git a/crates/gitnext-ops/tests/rename_more.rs b/crates/gitnext-ops/tests/rename_more.rs new file mode 100644 index 0000000..e7e7adf --- /dev/null +++ b/crates/gitnext-ops/tests/rename_more.rs @@ -0,0 +1,194 @@ +//! Renames that broke the code on the eval's large sample (run 6): each test is one of the causes. + +use gitnext_ops::edit; +use gitnext_ops::gitnext_index::{Graph, Index}; +use std::path::{Path, PathBuf}; + +fn project(name: &str, files: &[(&str, &str)]) -> PathBuf { + let dir = std::env::temp_dir().join(format!("gitnext-rename-more-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + for (p, c) in files { + let f = dir.join(p); + std::fs::create_dir_all(f.parent().unwrap()).unwrap(); + std::fs::write(f, c).unwrap(); + } + dir +} + +fn graph(dir: &Path) -> Graph { + let mut idx = Index::open(dir).unwrap(); + idx.refresh().unwrap(); + idx.graph().unwrap() +} + +fn read(dir: &Path, f: &str) -> String { + std::fs::read_to_string(dir.join(f)).unwrap() +} + +fn callers(g: &Graph, name: &str) -> Vec { + let i = g.find(name)[0]; + let mut v: Vec = g.callers(i).iter().map(|&(c, _)| g.syms[c].sym.name.clone()).collect(); + v.sort(); + v.dedup(); + v +} + +const PY: &[(&str, &str)] = &[ + ("pkg/__init__.py", "from .core import Ctx as Ctx\nfrom .core import helper as helper\n"), + ( + "pkg/core.py", + "class Ctx:\n def find_object(self, t):\n return t\n\n\ndef helper(x):\n return x\n\n\ndef get_ctx():\n return Ctx()\n\n\ndef decorator(object_type):\n def wrap(f):\n def new_func(*args, **kwargs):\n ctx = get_ctx()\n obj = ctx.find_object(object_type)\n return f(obj, helper(1))\n return new_func\n return wrap\n", + ), + ("tests/test_x.py", "import pkg\n\n\ndef test_helper():\n assert pkg.helper(1) == 1\n"), +]; + +/// click: `click.style(...)` in tests and examples — the package's `__init__` re-exports the function. +#[test] +fn python_call_through_the_package_is_a_caller_and_is_renamed() { + let dir = project("py-package", PY); + let g = graph(&dir); + assert_eq!(callers(&g, "helper"), ["decorator", "test_helper"]); + let i = g.find("helper")[0]; + edit::rename(&dir, &g, i, "assist", false).unwrap(); + assert!(read(&dir, "tests/test_x.py").contains("pkg.assist(1)")); + assert!(read(&dir, "pkg/__init__.py").contains("import assist as assist")); + assert!(read(&dir, "pkg/core.py").contains("return f(obj, assist(1))")); +} + +/// click decorators: the call sits in a function nested two levels deep. +#[test] +fn python_calls_inside_nested_functions_belong_to_the_outer_function() { + let dir = project("py-nested", PY); + let g = graph(&dir); + assert_eq!(callers(&g, "get_ctx"), ["decorator"]); + assert_eq!(callers(&g, "find_object"), ["decorator"]); + let i = g.find("find_object")[0]; + edit::rename(&dir, &g, i, "lookup", false).unwrap(); + assert!(read(&dir, "pkg/core.py").contains("obj = ctx.lookup(object_type)")); +} + +/// indexmap: `use crate::util::{third, slice_eq};` kept the old name, the calls got the new one. +#[test] +fn rust_name_inside_a_use_group_is_renamed() { + let dir = project( + "rs-group", + &[ + ("Cargo.toml", "[package]\nname = \"demo\"\nversion = \"0.1.0\"\nedition = \"2021\"\n"), + ("src/lib.rs", "mod map;\nmod util;\n"), + ("src/util.rs", "pub(crate) fn third(t: (A, B, C)) -> C {\n t.2\n}\n\npub(crate) fn first(t: (A, B)) -> A {\n t.0\n}\n"), + ( + "src/map.rs", + "use crate::util::{first, third as last};\nuse crate::util::{\n self,\n third,\n};\nuse std::cmp::{max, min as third_min};\n\npub fn pick(t: (u8, u8, u8)) -> u8 {\n max(third(t), last(t)) + first((1, 2)) + util::third(t) + third_min(1, 2)\n}\n", + ), + ], + ); + let g = graph(&dir); + let i = g.find("third")[0]; + edit::rename(&dir, &g, i, "third_of", false).unwrap(); + let map = read(&dir, "src/map.rs"); + assert!(map.contains("use crate::util::{first, third_of as last};"), "{map}"); + assert!(map.contains(" third_of,\n"), "{map}"); + assert!(map.contains("max(third_of(t), last(t))"), "{map}"); + assert!(map.contains("use std::cmp::{max, min as third_min};"), "{map}"); + assert!(read(&dir, "src/util.rs").contains("fn third_of")); +} + +/// yaml: `#stringifyFlowMap` was refused with the `#`, and without it became a public member. +#[test] +fn typescript_private_member_stays_private() { + let src = "export class Box {\n #count = 0\n\n #bump(n: number) {\n return this.#count + n\n }\n\n next() {\n return this.#bump(1)\n }\n}\n"; + for (case, new) in [("with", "#raise"), ("without", "raise")] { + let dir = project(&format!("ts-private-{case}"), &[("src/box.ts", src)]); + let g = graph(&dir); + let i = g.find("#bump")[0]; + edit::rename(&dir, &g, i, new, false).unwrap(); + let text = read(&dir, "src/box.ts"); + assert!(text.contains(" #raise(n: number) {") && text.contains("return this.#raise(1)"), "{text}"); + } + let dir = project("ts-private-bad", &[("src/box.ts", src)]); + let g = graph(&dir); + assert!(edit::rename(&dir, &g, g.find("#bump")[0], "#1x", false).is_err()); +} + +/// click, four more shapes of a use that no call edge reached. +#[test] +fn python_uses_that_are_not_plain_calls() { + let dir = project( + "py-shapes", + &[ + ("pkg/__init__.py", "from . import compat\nfrom .core import command as command\n"), + ("pkg/compat.py", "def strip_ansi(s):\n return s\n\n\ndef hidden(p):\n return p\n\n\ndef visible(p):\n return p\n\n\ndef ask(hide):\n f = hidden if hide else visible\n return f('?')\n"), + ( + "pkg/core.py", + "class Ctx:\n def call_on_close(self, f):\n return f\n\n def short_help(self):\n return ''\n\n\ndef command(f):\n return f\n\n\ndef listing(pairs):\n from .core import command\n return [command.short_help() for name, command in pairs]\n", + ), + ( + "tests/test_y.py", + "import pkg\nimport pkg.compat\n\n\ndef test_chain():\n assert pkg.compat.strip_ansi('x') == 'x'\n table = [(pkg.compat, 'strip_ansi', pkg.compat.strip_ansi)]\n assert table\n\n\ndef test_decorator(ctx):\n @ctx.call_on_close\n def done():\n pass\n", + ), + ], + ); + let g = graph(&dir); + // a dotted module path, called and passed as a value + assert_eq!(callers(&g, "strip_ansi"), ["test_chain"]); + // a bare name used as a value + assert_eq!(callers(&g, "hidden"), ["ask"]); + // a decorator on a nested function, through an unknown receiver + assert_eq!(callers(&g, "call_on_close"), ["test_decorator"]); + // the loop variable `command` is not the imported function `command` + assert_eq!(callers(&g, "short_help"), ["listing"]); + for (old, new, file, want) in [ + ("strip_ansi", "plain", "tests/test_y.py", "pkg.compat.plain('x')"), + ("hidden", "masked", "pkg/compat.py", "f = masked if hide else visible"), + ("call_on_close", "at_exit", "tests/test_y.py", "@ctx.at_exit"), + ("short_help", "brief", "pkg/core.py", "command.brief() for name, command"), + ] { + let g = graph(&dir); + edit::rename(&dir, &g, g.find(old)[0], new, false).unwrap(); + let text = read(&dir, file); + assert!(text.contains(want), "{old}: {text}"); + } + assert!(read(&dir, "tests/test_y.py").contains("'strip_ansi', pkg.compat.plain)")); +} + +/// cobra: `c.Flags().HasFlags()` is `pflag.FlagSet.HasFlags`, not the repo's `Command.HasFlags`. +#[test] +fn go_method_of_a_library_result_is_left_alone() { + let dir = project( + "go-library", + &[ + ("go.mod", "module example.com/demo\n\ngo 1.21\n"), + ( + "command.go", + "package demo\n\nimport flag \"github.com/spf13/pflag\"\n\ntype Command struct {\n\tflags *flag.FlagSet\n}\n\nfunc (c *Command) Flags() *flag.FlagSet {\n\treturn c.flags\n}\n\nfunc (c *Command) HasFlags() bool {\n\treturn c.Flags().HasFlags()\n}\n\nfunc (c *Command) Show() bool {\n\treturn c.HasFlags()\n}\n", + ), + ], + ); + let g = graph(&dir); + let i = g.find("HasFlags")[0]; + let r = edit::rename(&dir, &g, i, "HasAnyFlags", false).unwrap(); + let text = read(&dir, "command.go"); + assert!(text.contains("func (c *Command) HasAnyFlags() bool {\n\treturn c.Flags().HasFlags()\n}"), "{text}"); + assert!(text.contains("return c.HasAnyFlags()"), "{text}"); + assert!(r.skipped.iter().any(|s| s.contains("library type")), "{:?}", r.skipped); +} + +/// jsoup: a library call that hands a repo object on is still a use of the repo's method. +#[test] +fn java_method_reached_through_a_library_call_is_renamed() { + let dir = project( + "java-through", + &[ + ("src/main/java/demo/TextNode.java", "package demo;\n\npublic class TextNode {\n public String getWholeText() {\n return \"\";\n }\n}\n"), + ( + "src/test/java/demo/TextNodeTest.java", + "package demo;\n\nimport static org.junit.jupiter.api.Assertions.assertInstanceOf;\nimport java.util.List;\n\npublic class TextNodeTest {\n void whole(Object n, List nodes) {\n String a = assertInstanceOf(TextNode.class, n).getWholeText();\n String b = nodes.get(0).getWholeText();\n }\n}\n", + ), + ], + ); + let g = graph(&dir); + edit::rename(&dir, &g, g.find("getWholeText")[0], "wholeText", false).unwrap(); + let text = read(&dir, "src/test/java/demo/TextNodeTest.java"); + assert!(text.contains("assertInstanceOf(TextNode.class, n).wholeText()") && text.contains("nodes.get(0).wholeText()"), "{text}"); +} + diff --git a/crates/gitnext-ops/tests/tests_for.rs b/crates/gitnext-ops/tests/tests_for.rs new file mode 100644 index 0000000..9905165 --- /dev/null +++ b/crates/gitnext-ops/tests/tests_for.rs @@ -0,0 +1,191 @@ +//! `tests-for` names the tests most likely to fail first: direct calls (those named after +//! the function before the others), tests named after it, then the ones that only reach it +//! through other functions — and gives one command for the top and one for whole files. + +use gitnext_ops::gitnext_index::Index; +use gitnext_ops::locate; + +#[test] +fn most_likely_tests_first() { + let dir = std::env::temp_dir().join(format!("gitnext-testsfor-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(dir.join("tests")).unwrap(); + std::fs::write( + dir.join("shop.py"), + "def total_price(items):\n return sum(items)\n\n\ndef checkout(cart):\n return total_price(cart)\n\n\ndef run(cart):\n return checkout(cart)\n", + ) + .unwrap(); + // 12 tests that only reach it through `run`, in the file that would be listed first by path + let mut far = String::from("from shop import run\n\n\ndef helper(cart):\n return run(cart)\n"); + for i in 0..12 { + far.push_str(&format!("\n\ndef test_flow_{i}():\n assert helper([{i}]) == {i}\n")); + } + std::fs::write(dir.join("tests/test_a_flows.py"), far).unwrap(); + std::fs::write( + dir.join("tests/test_shop.py"), + "from shop import checkout, total_price\n\n\ndef test_rounding():\n assert total_price([1, 2]) == 3\n\n\ndef test_total_price_empty():\n assert total_price([]) == 0\n\n\ndef test_checkout():\n assert checkout([1]) == 1\n\n\ndef test_total_price_documented():\n pass\n", + ) + .unwrap(); + let mut idx = Index::open(&dir).unwrap(); + idx.refresh().unwrap(); + let g = idx.graph().unwrap(); + let target = g.find("total_price")[0]; + let t = locate::tests_for(&g, target, 4); + let names: Vec<&str> = t.iter().map(|x| g.syms[x.symbol].sym.name.as_str()).collect(); + // direct and named, direct, named only, one hop away, then the far ones; no helpers + assert_eq!(&names[..4], ["test_total_price_empty", "test_rounding", "test_total_price_documented", "test_checkout"], "{names:?}"); + assert_eq!(names.len(), 16, "{names:?}"); + assert!(!names.contains(&"helper")); + assert_eq!(t[0].how, "direct, named after it"); + assert_eq!(t[2].how, "named after it"); + + let text = locate::render_tests_for(&g, &dir, target, 4, false); + assert!(text.contains("(16), the 10 most likely to fail first"), "{text}"); + assert_eq!(text.matches("test_flow_").count(), 2 * 6, "6 of the 12 far tests fit the top 10 (listed and in the command):\n{text}"); + assert!(text.contains("pytest tests/test_shop.py::test_total_price_empty"), "{text}"); + assert!(text.contains(" pytest tests/test_a_flows.py tests/test_shop.py") || text.contains(" pytest tests/test_shop.py tests/test_a_flows.py"), "{text}"); + let all = locate::render_tests_for(&g, &dir, target, 4, true); + assert_eq!(all.matches("test_flow_").count(), 2 * 12, "{all}"); + let _ = std::fs::remove_dir_all(&dir); +} + +fn project(name: &str, files: &[(&str, &str)]) -> std::path::PathBuf { + let dir = std::env::temp_dir().join(format!("gitnext-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + for (p, c) in files { + let f = dir.join(p); + std::fs::create_dir_all(f.parent().unwrap()).unwrap(); + std::fs::write(f, c).unwrap(); + } + dir +} + +/// A test in another language that happens to carry the same name is not a test of this function. +#[test] +fn names_do_not_cross_languages() { + let dir = project( + "crosslang", + &[ + ("tool.py", "def main():\n return run()\n\n\ndef run():\n return 1\n"), + ("tests/fixtures/zoo.cpp", "int helper() { return 1; }\n\nint main() {\n return helper();\n}\n"), + ("tests/test_tool.py", "from tool import main\n\n\ndef test_main():\n assert main() == 1\n"), + ], + ); + let mut idx = Index::open(&dir).unwrap(); + idx.refresh().unwrap(); + let g = idx.graph().unwrap(); + let target = g.find("tool::main")[0]; + let files: Vec<&str> = locate::tests_for(&g, target, 4).iter().map(|x| g.syms[x.symbol].file.as_str()).collect(); + assert_eq!(files, ["tests/test_tool.py"]); + let text = locate::render_tests_for(&g, &dir, target, 4, false); + assert!(text.contains("note: the call graph finds ≈") && text.contains("% of the tests that would fail"), "{text}"); + let _ = std::fs::remove_dir_all(&dir); +} + +/// `look main` with several `main`s lists them all — also when one of them is exactly `main`. +#[test] +fn look_asks_when_a_bare_name_has_namesakes() { + let dir = project( + "namesakes", + &[ + ("tool.py", "def main():\n return 1\n\n\ndef only_here():\n return main()\n"), + ("native/zoo.cpp", "int helper() { return 1; }\n\nint main() {\n return helper();\n}\n"), + ], + ); + let mut idx = Index::open(&dir).unwrap(); + idx.refresh().unwrap(); + let g = idx.graph().unwrap(); + let ws = gitnext_ops::Workspace::open(&dir).unwrap(); + let text = gitnext_ops::look::look(&ws, &g, "main", false); + assert!(text.starts_with("2 things are called `main`"), "{text}"); + assert!(text.contains("tool::main") && text.contains("main@3 (function) native/zoo.cpp:3"), "{text}"); + // each label in the list leads to exactly one of them + assert!(gitnext_ops::look::look(&ws, &g, "main@3", false).contains("int main")); + assert!(gitnext_ops::look::look(&ws, &g, "tool::main", false).contains("def main")); + // a name without namesakes is answered at once, with how far to trust the callers + let one = gitnext_ops::look::look(&ws, &g, "only_here", false); + assert!(one.contains("def only_here"), "{one}"); + // sure / maybe apart in the callers list + let callers = gitnext_ops::render::callers(&g, g.find("tool::main")[0], Default::default()); + assert!(callers.starts_with("callers of tool::main (1 sure"), "{callers}"); + let _ = std::fs::remove_dir_all(&dir); +} + +/// Text search names the function each hit is in. +#[test] +fn text_hits_name_the_enclosing_function() { + let dir = project("texthits", &[("tool.py", "def render(x):\n return \"()::\" + x\n\n\nLIMIT = \"()::\"\n")]); + let mut idx = Index::open(&dir).unwrap(); + idx.refresh().unwrap(); + let g = idx.graph().unwrap(); + let hits = gitnext_ops::look::text_hits(&g, &dir, "()::", 10); + assert_eq!(hits.len(), 2, "{hits:?}"); + assert!(hits[0].starts_with(" tool.py:2 (in render): return"), "{hits:?}"); + assert!(hits[1].starts_with(" tool.py:5: LIMIT"), "{hits:?}"); + let _ = std::fs::remove_dir_all(&dir); +} + +/// With a learned map `tests-for` names the tests that really ran the function — also the +/// ones the call graph cannot see — and says when the function changed since. +#[test] +fn learned_map_replaces_the_call_graph() { + let dir = project( + "learned", + &[ + ("app.py", "def handler(x):\n return x + 1\n\n\nREGISTRY = {\"h\": handler}\n\n\ndef dispatch(name, x):\n return REGISTRY[name](x)\n"), + ("tests/test_app.py", "from app import dispatch\n\n\ndef test_dispatch():\n assert dispatch(\"h\", 1) == 2\n\n\ndef test_other():\n assert True\n"), + ], + ); + let mut idx = Index::open(&dir).unwrap(); + idx.refresh().unwrap(); + let g = idx.graph().unwrap(); + let target = g.find("app::handler")[0]; + // `handler` is only reached through a dict: without a map the answer is the whole mirror + // test file, including a test that never runs it + let (t, source) = locate::tests_for_at(&g, &dir, target, 4); + assert_eq!(source, locate::Source::Graph); + assert!(t.iter().any(|x| g.syms[x.symbol].sym.name == "test_other"), "{:?}", t.iter().map(|x| &x.how).collect::>()); + let hash = g.syms[target].sym.body_hash.clone(); + let row = |h: &str| ("app::handler".to_string(), h.to_string(), "tests/test_app.py".to_string(), "test_dispatch".to_string()); + gitnext_ops::gitnext_index::TestMap::write(&dir, "pytest-cov", &[row(&hash)]).unwrap(); + let (t, source) = locate::tests_for_at(&g, &dir, target, 4); + assert_eq!(source, locate::Source::Learned { stale: false }); + assert_eq!(t.iter().map(|x| g.syms[x.symbol].sym.name.as_str()).collect::>(), ["test_dispatch"]); + let text = locate::render_tests_for(&g, &dir, target, 4, false); + assert!(text.starts_with("tests that ran handler (1)") && text.contains("pytest tests/test_app.py::test_dispatch") && text.contains("ran this code in the coverage run"), "{text}"); + // the function was edited after the map was learned + gitnext_ops::gitnext_index::TestMap::write(&dir, "pytest-cov", &[row("an older hash")]).unwrap(); + assert_eq!(locate::tests_for_at(&g, &dir, target, 4).1, locate::Source::Learned { stale: true }); + assert!(locate::render_tests_for(&g, &dir, target, 4, false).contains("the code changed since that run")); + // a function the map does not know falls back to the call graph + assert_eq!(locate::tests_for_at(&g, &dir, g.find("app::dispatch")[0], 4).1, locate::Source::Graph); + let _ = std::fs::remove_dir_all(&dir); +} + +/// JavaScript / TypeScript: `it('…', () => …)` is not a named function — the test is the file. +#[test] +fn a_typescript_test_file_is_a_test() { + let dir = std::env::temp_dir().join(format!("gitnext-testsfor-ts-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(dir.join("src")).unwrap(); + std::fs::create_dir_all(dir.join("tests")).unwrap(); + std::fs::write(dir.join("package.json"), "{ \"name\": \"demo\", \"devDependencies\": { \"vitest\": \"^3.0.0\" } }\n").unwrap(); + std::fs::write(dir.join("src/price.ts"), "export function totalPrice(items: number[]): number {\n return items.reduce((a, b) => a + b, 0)\n}\n\nexport function unused(): number {\n return 1\n}\n").unwrap(); + std::fs::write( + dir.join("tests/cart.ts"), + "import { describe, expect, it } from 'vitest'\nimport { totalPrice } from '../src/price'\n\ndescribe('cart', () => {\n it('adds up', () => {\n expect(totalPrice([1, 2])).toBe(3)\n })\n})\n", + ) + .unwrap(); + let mut idx = Index::open(&dir).unwrap(); + idx.refresh().unwrap(); + let g = idx.graph().unwrap(); + let t = locate::tests_for(&g, g.find("totalPrice")[0], 4); + let files: Vec<&str> = t.iter().map(|x| g.syms[x.symbol].file.as_str()).collect(); + assert_eq!(files, ["tests/cart.ts"]); + // the command runs that file + let cmds = locate::run_commands(&g, &dir, &t); + assert!(cmds.iter().any(|c| c.contains("vitest run") && c.contains("tests/cart.ts")), "{cmds:?}"); + // a function no test file calls gets none + assert!(locate::tests_for(&g, g.find("unused")[0], 4).is_empty()); + let _ = std::fs::remove_dir_all(&dir); +} diff --git a/crates/gitnext-ops/tests/why.rs b/crates/gitnext-ops/tests/why.rs new file mode 100644 index 0000000..c5a5d1c --- /dev/null +++ b/crates/gitnext-ops/tests/why.rs @@ -0,0 +1,256 @@ +//! `gitnext why`: from a failing test to the code to look at. The test run itself is the project's +//! own command (cargo, pytest, go…); here its output is given, and what is checked is what is made of it. + +use gitnext_ops::check::Step; +use gitnext_ops::gitnext_index::{Graph, Index}; +use gitnext_ops::{digest, locate, why}; +use std::path::{Path, PathBuf}; + +fn project(name: &str, files: &[(&str, &str)]) -> PathBuf { + let dir = std::env::temp_dir().join(format!("gitnext-why-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + for (p, c) in files { + let f = dir.join(p); + std::fs::create_dir_all(f.parent().unwrap()).unwrap(); + std::fs::write(f, c).unwrap(); + } + dir +} + +fn graph(dir: &Path) -> Graph { + let mut idx = Index::open(dir).unwrap(); + idx.refresh().unwrap(); + idx.graph().unwrap() +} + +fn failed(g: &Graph, dir: &Path, output: &str) -> Step { + Step { what: "tests", command: "the test command".into(), ok: false, timed_out: false, seconds: 0.2, output: output.into(), digest: digest::digest(output), frames: locate::frames(g, dir, output) } +} + +const EVAL: &str = "pub fn matches(req: u32, v: u32) -> bool {\n matches_exact(req, v) || matches_greater(req, v)\n}\n\nfn matches_exact(req: u32, v: u32) -> bool {\n req == v\n}\n\nfn matches_greater(req: u32, v: u32) -> bool {\n v < req\n}\n\npub fn unrelated() -> u32 {\n 7\n}\n"; +const TESTS: &str = "use demo::matches;\n\nfn assert_all(req: u32, vs: &[u32]) {\n for v in vs {\n assert!(matches(req, *v), \"did not match {v}\");\n }\n}\n\n#[test]\nfn test_greater_than() {\n assert_all(1, &[2, 3]);\n}\n\n#[test]\nfn test_exact() {\n assert_all(1, &[1]);\n}\n"; + +fn rust_project(name: &str) -> PathBuf { + project( + name, + &[ + ("Cargo.toml", "[package]\nname = \"demo\"\nversion = \"0.1.0\"\nedition = \"2021\"\n"), + ("src/lib.rs", "mod eval;\npub use eval::matches;\n"), + ("src/eval.rs", EVAL), + ("tests/test_req.rs", TESTS), + ], + ) +} + +#[test] +fn the_test_is_found_by_the_words_of_its_name() { + let dir = rust_project("find"); + let g = graph(&dir); + let name = |i: &usize| g.syms[*i].sym.name.clone(); + assert_eq!(why::find_tests(&g, "test_greater_than").iter().map(name).collect::>(), ["test_greater_than"]); + // what a small model asks for when told that `test_greater_than` fails + assert_eq!(why::find_tests(&g, "greater_than").iter().map(name).collect::>(), ["test_greater_than"]); + assert_eq!(why::find_tests(&g, "GreaterThan").iter().map(name).collect::>(), ["test_greater_than"]); + // a helper of the tests is not a test, and code is not a test + assert!(why::find_tests(&g, "assert_all").is_empty() && why::find_tests(&g, "matches_greater").is_empty()); + assert_eq!(why::similar_tests(&g, "greater").iter().map(name).collect::>(), ["test_greater_than"]); +} + +#[test] +fn the_function_named_like_the_test_comes_first_with_its_code() { + let dir = rust_project("rank"); + let g = graph(&dir); + let test = why::find_tests(&g, "greater_than"); + let out = "running 1 test\ntest test_greater_than ... FAILED\n\nfailures:\n\n---- test_greater_than stdout ----\n\nthread 'test_greater_than' (7) panicked at tests/test_req.rs:5:9:\ndid not match 2\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n\n\nfailures:\n test_greater_than\n\ntest result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 1 filtered out; finished in 0.00s\n"; + let w = why::explain(&dir, &g, &test, vec![failed(&g, &dir, out)]); + assert!(w.failed()); + let names: Vec<&str> = w.suspects.iter().map(|s| g.syms[s.symbol].sym.name.as_str()).collect(); + // through the helper `assert_all`, which is test code and is not listed; `unrelated` is not reached + assert_eq!(names, ["matches_greater", "matches", "matches_exact"]); + let text = why::render(&g, &dir, &w); + assert!(text.starts_with("why: test_greater_than — FAILS"), "{text}"); + assert!(text.contains("✗ test_greater_than tests/test_req.rs:5\n did not match 2\n"), "{text}"); + // the source line of the failure, and the code of the first function only + assert!(text.contains("tests/test_req.rs:5: assert!(matches(req, *v), \"did not match {v}\");"), "{text}"); + assert!(text.contains(" 1. matches_greater src/eval.rs:9") && text.contains(" v < req\n"), "{text}"); + assert!(!text.contains("req == v") && !text.contains("test result:"), "{text}"); + assert!(text.len() < 900, "{}", text.len()); +} + +#[test] +fn a_function_the_failure_names_comes_before_the_rest() { + let dir = project( + "frames", + &[ + ("go.mod", "module example.com/demo\n\ngo 1.21\n"), + ("command.go", "package demo\n\ntype Command struct {\n\tparent *Command\n}\n\nfunc (c *Command) HasParent() bool {\n\treturn c.parent == nil\n}\n\nfunc (c *Command) Root() *Command {\n\tif c.HasParent() {\n\t\treturn c.parent.Root()\n\t}\n\treturn c\n}\n\nfunc (c *Command) Name() string {\n\treturn \"x\"\n}\n"), + ("command_test.go", "package demo\n\nimport \"testing\"\n\nfunc TestRoot(t *testing.T) {\n\tc := &Command{}\n\tif c.Root().Name() != \"x\" {\n\t\tt.Fatal(\"no root\")\n\t}\n}\n"), + ], + ); + let g = graph(&dir); + let test = why::find_tests(&g, "TestRoot"); + let out = format!( + "--- FAIL: TestRoot (0.00s)\npanic: runtime error: invalid memory address or nil pointer dereference [recovered]\n\tpanic: runtime error: invalid memory address or nil pointer dereference\n\ngoroutine 20 [running]:\ntesting.tRunner.func1.2({{0x6ede00, 0x9bc2d0}})\n\t/usr/local/go/src/testing/testing.go:1734 +0x21c\nexample.com/demo.(*Command).Root(...)\n\t{0}/command.go:13\nexample.com/demo.TestRoot(0xc0001048c0)\n\t{0}/command_test.go:7 +0x99\nFAIL\texample.com/demo\t0.006s\nFAIL\n", + dir.display() + ); + let mut step = failed(&g, &dir, &out); + // `check::run` gives the paths as the project has them + for f in &mut step.digest.failures { + f.file = f.file.as_deref().and_then(|p| p.strip_prefix(&format!("{}/", dir.display())).map(str::to_string)); + } + let w = why::explain(&dir, &g, &test, vec![step]); + let first = &w.suspects[0]; + assert_eq!((g.syms[first.symbol].sym.name.as_str(), first.in_failure), ("Root", Some(0))); + let text = why::render(&g, &dir, &w); + assert!(text.contains("✗ TestRoot command.go:13\n runtime error: invalid memory address or nil pointer dereference\n command.go:13: return c.parent.Root()"), "{text}"); + assert!(text.contains(" 1. Root command.go:11 (named in the failure)"), "{text}"); + assert!(!text.contains("/usr/local/go") && !text.contains("goroutine"), "{text}"); +} + +#[test] +fn a_passing_test_needs_no_explanation() { + let dir = rust_project("pass"); + let g = graph(&dir); + let test = why::find_tests(&g, "test_exact"); + let ok = Step { what: "tests", command: "cargo test".into(), ok: true, timed_out: false, seconds: 0.1, output: String::new(), digest: Default::default(), frames: vec![] }; + let w = why::explain(&dir, &g, &test, vec![ok]); + assert!(!w.failed() && w.suspects.is_empty()); + assert!(why::render(&g, &dir, &w).starts_with("why: test_exact — passes")); +} + +/// A learned map for the Rust project: `test_greater_than` ran all three functions, `test_exact` two. +fn learn(dir: &Path, g: &Graph, stale: &str) { + let q = |name: &str| { + let s = &g.syms[g.find(name)[0]].sym; + (s.qualified.clone(), if name == stale { "old".to_string() } else { s.body_hash.clone() }) + }; + let mut pairs = Vec::new(); + for (test, ran) in [("test_greater_than", &["matches", "matches_exact", "matches_greater"][..]), ("test_exact", &["matches", "matches_exact"][..])] { + for f in ran { + let (qualified, hash) = q(f); + pairs.push((qualified, hash, "tests/test_req.rs".to_string(), test.to_string())); + } + } + gitnext_ops::gitnext_index::TestMap::write(dir, "test", &pairs).unwrap(); +} + +#[test] +fn with_a_learned_map_the_code_only_this_test_ran_comes_first() { + let dir = rust_project("learned"); + let g = graph(&dir); + learn(&dir, &g, ""); + let t = why::find_tests(&g, "test_exact"); + // nothing in the name or the output points anywhere: `test_exact` ran two functions, one of them every test runs + let w = why::explain(&dir, &g, &t, vec![failed(&g, &dir, "test test_exact ... FAILED\n")]); + assert!(w.learned); + let names: Vec<&str> = w.suspects.iter().map(|s| g.syms[s.symbol].sym.name.as_str()).collect(); + assert_eq!(names, ["matches_exact", "matches"]); + let t = why::find_tests(&g, "test_greater_than"); + let w = why::explain(&dir, &g, &t, vec![failed(&g, &dir, "test test_greater_than ... FAILED\n")]); + let names: Vec<&str> = w.suspects.iter().map(|s| g.syms[s.symbol].sym.name.as_str()).collect(); + assert_eq!(names, ["matches_greater", "matches", "matches_exact"], "run by this test only, then what both tests run"); + let text = why::render(&g, &dir, &w); + assert!(text.contains("code the test ran (learned coverage)") && text.contains("(run by 1 test)"), "{text}"); + let _ = std::fs::remove_dir_all(&dir); +} + +#[test] +fn code_changed_since_the_map_was_learned_comes_before_the_rest() { + let dir = rust_project("changed"); + let g = graph(&dir); + learn(&dir, &g, "matches"); + let t = why::find_tests(&g, "test_greater_than"); + let w = why::explain(&dir, &g, &t, vec![failed(&g, &dir, "test test_greater_than ... FAILED\n")]); + assert_eq!(g.syms[w.suspects[0].symbol].sym.name, "matches"); + assert!(w.suspects[0].changed && !w.suspects[1].changed); + assert!(why::render(&g, &dir, &w).contains("(changed since `learn-tests`)")); + let _ = std::fs::remove_dir_all(&dir); +} + +#[test] +fn a_test_the_map_does_not_know_falls_back_to_the_call_graph() { + let dir = rust_project("unknown"); + let g = graph(&dir); + gitnext_ops::gitnext_index::TestMap::write(&dir, "test", &[("demo::eval::unrelated".into(), "h".into(), "tests/other.rs".into(), "test_other".into())]).unwrap(); + let t = why::find_tests(&g, "test_greater_than"); + let w = why::explain(&dir, &g, &t, vec![failed(&g, &dir, "test test_greater_than ... FAILED\n")]); + assert!(!w.learned && w.suspects.iter().any(|s| g.syms[s.symbol].sym.name == "matches_greater")); + let _ = std::fs::remove_dir_all(&dir); +} + +#[test] +fn of_several_tests_with_one_name_the_failing_one_is_explained() { + let dir = project( + "samename", + &[ + ("pkg/__init__.py", ""), + ("pkg/a.py", "def alpha():\n return 1\n"), + ("pkg/b.py", "def beta():\n return 2\n"), + ("tests/test_a.py", "from pkg.a import alpha\n\n\ndef test_basic():\n assert alpha() == 1\n"), + ("tests/test_b.py", "from pkg.b import beta\n\n\ndef test_basic():\n assert beta() == 3\n"), + ], + ); + let g = graph(&dir); + let both = why::find_tests(&g, "test_basic"); + assert_eq!(both.len(), 2); + // the id as pytest prints it names the file, and a parameter is not part of the name + let one = why::find_tests(&g, "tests/test_b.py::test_basic[case0]"); + assert_eq!(one.iter().map(|&i| g.syms[i].file.as_str()).collect::>(), ["tests/test_b.py"]); + let out = "F. [100%]\n=================================== FAILURES ===================================\n__________________________________ test_basic __________________________________\n\n def test_basic():\n> assert beta() == 3\nE assert 2 == 3\nE + where 2 = beta()\n\ntests/test_b.py:5: AssertionError\n=========================== short test summary info ============================\nFAILED tests/test_b.py::test_basic - assert 2 == 3\n1 failed, 1 passed in 0.02s\n"; + let w = why::explain(&dir, &g, &both, vec![failed(&g, &dir, out)]); + let names: Vec<&str> = w.suspects.iter().map(|s| g.syms[s.symbol].sym.name.as_str()).collect(); + assert_eq!(names, ["beta"], "{}", why::render(&g, &dir, &w)); + assert_eq!(w.tests.len(), 1); + let _ = std::fs::remove_dir_all(&dir); +} + +#[test] +fn only_the_hunks_inside_the_function_are_shown() { + let diff = "diff --git a/src/eval.rs b/src/eval.rs\n--- a/src/eval.rs\n+++ b/src/eval.rs\n@@ -2 +2 @@ pub fn matches\n- old_first()\n+ new_first()\n@@ -10 +10 @@ fn matches_greater\n- v > req\n+ v < req\n@@ -20,2 +19,0 @@ fn gone\n- a\n- b\n"; + assert_eq!(why::hunks_within(diff, 9, 11), ["- v > req", "+ v < req"]); + assert_eq!(why::hunks_within(diff, 1, 3), ["- old_first()", "+ new_first()"]); + // lines removed with nothing put in their place belong to the function around that place + assert_eq!(why::hunks_within(diff, 18, 25), ["- a", "- b"]); + assert!(why::hunks_within(diff, 12, 17).is_empty()); +} + +#[test] +fn what_changed_in_the_culprit_since_the_map_was_learned_is_shown() { + let dir = rust_project("since"); + let git = |args: &[&str]| assert!(std::process::Command::new("git").args(args).current_dir(&dir).output().unwrap().status.success(), "git {args:?}"); + git(&["init", "-q"]); + git(&["add", "-A"]); + git(&["-c", "user.name=t", "-c", "user.email=t@example.invalid", "-c", "commit.gpgsign=false", "commit", "-q", "-m", "as it was"]); + let g = graph(&dir); + learn(&dir, &g, ""); + let commit = String::from_utf8(std::process::Command::new("git").args(["rev-parse", "HEAD"]).current_dir(&dir).output().unwrap().stdout).unwrap(); + gitnext_ops::gitnext_index::TestMap::open_existing(&dir).unwrap().set_meta("commit", commit.trim()).unwrap(); + // the bug: one operator, not committed + std::fs::write(dir.join("src/eval.rs"), EVAL.replace("v < req", "v <= req")).unwrap(); + let g = graph(&dir); + let t = why::find_tests(&g, "test_greater_than"); + let w = why::explain(&dir, &g, &t, vec![failed(&g, &dir, "test test_greater_than ... FAILED\n")]); + let text = why::render(&g, &dir, &w); + assert!(text.contains("changed in matches_greater since `learn-tests` (- as it was, + as it is now):\n - v < req\n + v <= req\n"), "{text}"); + let _ = std::fs::remove_dir_all(&dir); +} + +#[test] +fn two_functions_with_one_name_are_two_entries_of_the_map() { + // `impl Display` and `impl Debug` of one type both define `Version::fmt` + let lib = "use std::fmt;\n\npub struct Version(pub u32);\n\nimpl fmt::Display for Version {\n fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n write!(f, \"{}\", self.0)\n }\n}\n\nimpl fmt::Debug for Version {\n fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {\n write!(f, \"v{}\", self.0)\n }\n}\n"; + let dir = project("namesakes", &[("Cargo.toml", "[package]\nname = \"demo\"\nversion = \"0.1.0\"\nedition = \"2021\"\n"), ("src/lib.rs", lib), ("tests/t.rs", "#[test]\nfn test_show() {\n assert_eq!(format!(\"{}\", demo::Version(1)), \"1\");\n}\n")]); + let g = graph(&dir); + let fmts: Vec = (0..g.syms.len()).filter(|&i| g.syms[i].sym.name == "fmt").collect(); + assert_eq!(fmts.len(), 2); + let names: Vec = fmts.iter().map(|&i| g.unique_name(i)).collect(); + assert!(names[0] != names[1] && names.iter().any(|n| n.ends_with("#2")), "{names:?}"); + // the test ran both; neither was changed since + let pairs: Vec<_> = fmts.iter().map(|&i| (g.unique_name(i), g.syms[i].sym.body_hash.clone(), "tests/t.rs".to_string(), "test_show".to_string())).collect(); + gitnext_ops::gitnext_index::TestMap::write(&dir, "test", &pairs).unwrap(); + let t = why::find_tests(&g, "test_show"); + let w = why::explain(&dir, &g, &t, vec![failed(&g, &dir, "test test_show ... FAILED\n")]); + assert_eq!(w.suspects.len(), 2); + assert!(w.suspects.iter().all(|s| !s.changed), "one `fmt` must not be compared with the code of the other"); + let _ = std::fs::remove_dir_all(&dir); +} diff --git a/crates/gitnext-parse/src/generic.rs b/crates/gitnext-parse/src/generic.rs index 08c0377..82b1d19 100644 --- a/crates/gitnext-parse/src/generic.rs +++ b/crates/gitnext-parse/src/generic.rs @@ -10,6 +10,9 @@ //! //! - `name` — a plain call; `Self::name` — a method of the enclosing type; //! `.name` — a method on a value of unknown type; +//! - `getPool()::release` — a method of whatever `getPool` returns (`x := getPool(); +//! x.release()`, `getPool().release()`): the declared result type lives in another +//! file, so the index resolves it once everything is parsed; //! - `module::name` — through an import (`fs.readFile` with `import * as fs //! from "node:fs"` → `node:fs::readFile`), so calls into a library carry the //! library's name. @@ -79,6 +82,10 @@ pub(crate) struct Ctx { pub in_test: bool, /// Go: the receiver's name (`s` in `func (s *Store)`) means "this object". pub recv: Option, + /// Local values whose type is known: parameters `c *Command`, `x := &Store{}`, + /// `Store s = new Store()` — `c.Execute()` is then `Command::Execute`, not a guess. + /// `x := getPool()` is kept as `getPool()`: the type `getPool` returns. + pub vars: HashMap, } pub(crate) fn analyze(spec: &Spec, rel: &Path, src: &str, pkg: Option<&CrateHint>) -> anyhow::Result { @@ -91,7 +98,7 @@ pub(crate) fn analyze(spec: &Spec, rel: &Path, src: &str, pkg: Option<&CrateHint let module = (spec.module)(&rel_s, root, b, pkg); let in_test = is_test_path(&rel_s); let imports = (spec.imports)(root, b, &rel_s, &module, pkg); - let mut ex = Ex { spec, src: b, out: FileAnalysis::default(), aliases: imports.aliases }; + let mut ex = Ex { spec, src: b, out: FileAnalysis::default(), aliases: imports.aliases, fields: HashMap::new() }; for (to, line) in imports.edges { ex.out.edges.push(Edge { from: module.clone(), to, kind: EdgeKind::Imports, line, col: 0 }); } @@ -115,7 +122,7 @@ pub(crate) fn analyze(spec: &Spec, rel: &Path, src: &str, pkg: Option<&CrateHint body_hash: hash_hex(b), inferred: false, }); - let ctx = Ctx { module: module.clone(), owner: None, func: None, in_test, recv: None }; + let ctx = Ctx { module: module.clone(), owner: None, func: None, in_test, recv: None, vars: HashMap::new() }; let locals = HashSet::new(); ex.walk(root, &ctx, &locals); Ok(ex.out) @@ -126,6 +133,8 @@ struct Ex<'a> { src: &'a [u8], out: FileAnalysis, aliases: HashMap, + /// type (qualified) → its fields with a known type: `pool SoftPool`, `parent *Command` + fields: HashMap>, } impl<'a> Ex<'a> { @@ -139,6 +148,46 @@ impl<'a> Ex<'a> { return; } self.reference(n, ctx, locals); + // Java `new Evaluator() { @Override … }`: an anonymous subclass — its methods override + // the base type's (a rename of the base method must reach them) + if n.kind() == "object_creation_expression" { + let body = (0..n.named_child_count()).filter_map(|i| n.named_child(i as _)).find(|x| x.kind() == "class_body"); + if let (Some(body), Some(ty)) = (body, n.child_by_field_name("type")) { + let base = self.text(ty).split('<').next().unwrap_or("").to_string(); + let q = format!("{}::{base}$anon{}", ctx.owner.as_deref().unwrap_or(&ctx.module), line(n)); + self.out.symbols.push(Symbol { + kind: Kind::Class, + name: format!("{base}$anon{}", line(n)), + qualified: q.clone(), + parent: ctx.owner.clone().or_else(|| Some(ctx.module.clone())), + trait_impl: None, + start_line: line(n), + end_line: n.end_position().row as u32 + 1, + signature: format!("new {base}() {{ … }}"), + params: vec![], + returns: None, + doc: None, + summary: None, + visibility: None, + test: ctx.in_test, + decl: false, + body_hash: hash_hex(&self.src[n.start_byte()..n.end_byte()]), + inferred: false, + }); + let (l, col) = name_pos(ty); + self.out.edges.push(Edge { from: q.clone(), to: self.map_alias(&base.replace('.', "::")), kind: EdgeKind::Inherits, line: l, col }); + let inner = Ctx { module: ctx.module.clone(), owner: Some(q), func: None, in_test: ctx.in_test, recv: None, vars: HashMap::new() }; + let mut c2 = n.walk(); + for ch in n.named_children(&mut c2) { + if ch.id() == body.id() { + self.walk(ch, &inner, &HashSet::new()); + } else { + self.walk(ch, ctx, locals); + } + } + return; + } + } let mut c = n.walk(); for ch in n.named_children(&mut c) { self.walk(ch, ctx, locals); @@ -182,6 +231,7 @@ impl<'a> Ex<'a> { } else if kind.is_type() { params = self.fields(n, &mut types); } + let vars = if kind.is_callable() { self.var_types(func, ¶ms) } else { HashMap::new() }; let parent = owner.clone().or_else(|| Some(ctx.module.clone())); self.out.symbols.push(Symbol { kind, @@ -208,21 +258,29 @@ impl<'a> Ex<'a> { } if kind.is_type() { self.heritage(n, &qualified); + let typed: HashMap = self.out.symbols.last().map(|s| s.params.iter().filter_map(|p| Some((p.name.clone(), self.base_type(&p.ty)?))).collect()).unwrap_or_default(); + if !typed.is_empty() { + self.fields.insert(qualified.clone(), typed); + } } // inside: a type's members belong to it; a function's body makes calls from it let recv = (n.kind() == "method_declaration" && self.spec.lang == Lang::Go) .then(|| n.child_by_field_name("receiver")?.named_child(0)?.child_by_field_name("name").map(|x| self.text(x).to_string())) .flatten(); let inner = if kind.is_type() { - Ctx { module: ctx.module.clone(), owner: Some(qualified.clone()), func: None, in_test: test, recv: None } + Ctx { module: ctx.module.clone(), owner: Some(qualified.clone()), func: None, in_test: test, recv: None, vars: HashMap::new() } } else { - Ctx { module: ctx.module.clone(), owner: owner.clone(), func: Some(qualified.clone()), in_test: test, recv } + Ctx { module: ctx.module.clone(), owner: owner.clone(), func: Some(qualified.clone()), in_test: test, recv, vars } }; // a type alias is a type expression: nothing inside it is a definition or a call if kind == Kind::TypeAlias { return; } let locals = if kind.is_callable() { self.locals(func) } else { HashSet::new() }; + let mut inner = inner; + if kind.is_callable() { + self.call_vars(func, &mut inner, &locals); + } let mut c = func.walk(); let kids: Vec = func.named_children(&mut c).collect(); for ch in kids { @@ -370,16 +428,20 @@ impl<'a> Ex<'a> { fn reference(&mut self, n: Node, ctx: &Ctx, locals: &HashSet) { let from = ctx.func.clone().unwrap_or_else(|| ctx.module.clone()); if let Some(&(_, field)) = self.spec.calls.iter().find(|(k, _)| *k == n.kind()) { - // Java `obj.m()` keeps object and name on the call node itself - let target = if n.child_by_field_name("object").is_some() && n.kind() == "method_invocation" { - self.member_target(n.child_by_field_name("object").unwrap(), n.child_by_field_name("name"), ctx, locals) - } else { - n.child_by_field_name(field).and_then(|f| self.callee(f, ctx, locals)) - }; - if let Some(to) = target { + if let Some(to) = self.call_target(n, ctx, locals) { let (l, c) = name_pos(n.child_by_field_name(field).unwrap_or(n)); self.out.edges.push(Edge { from, to, kind: EdgeKind::Calls, line: l, col: c }); } + } else if n.kind() == "method_reference" { + // Java `StringUtil::isAsciiLetter`, `this::visit`: the method is used (passed, not called here) + let mut c = n.walk(); + let kids: Vec = n.named_children(&mut c).collect(); + if let (Some(obj), Some(m)) = (kids.first(), kids.last().filter(|m| m.kind() == "identifier")) { + if let Some(to) = self.member_target(*obj, Some(*m), ctx, locals) { + let (l, c) = name_pos(*m); + self.out.edges.push(Edge { from, to, kind: EdgeKind::Calls, line: l, col: c }); + } + } } else if let Some(&(_, field)) = self.spec.new.iter().find(|(k, _)| *k == n.kind()) { if let Some(t) = n.child_by_field_name(field) { let name = self.text(t).split('<').next().unwrap_or("").replace('.', "::"); @@ -394,6 +456,96 @@ impl<'a> Ex<'a> { } } + /// What a call expression calls, in edge notation (`Self::load`, `fs::open`, `.get`). + fn call_target(&self, n: Node, ctx: &Ctx, locals: &HashSet) -> Option { + let &(_, field) = self.spec.calls.iter().find(|(k, _)| *k == n.kind())?; + // Java `obj.m()` keeps object and name on the call node itself + if n.kind() == "method_invocation" { + if let Some(obj) = n.child_by_field_name("object") { + return self.member_target(obj, n.child_by_field_name("name"), ctx, locals); + } + } + n.child_by_field_name(field).and_then(|f| self.callee(f, ctx, locals)) + } + + /// Type of the value an expression makes. Known here: `new Store()`, `&Command{}`, a typed + /// local. Known to the index only: `getPool()` → `getPool()`, "what `getPool` returns". + fn value_type(&self, e: Node, ctx: &Ctx, locals: &HashSet) -> Option { + if let Some(t) = self.expr_type(e) { + return Some(t); + } + match e.kind() { + "parenthesized_expression" | "await_expression" | "non_null_expression" | "unary_expression" => self.value_type(e.child_by_field_name("operand").or_else(|| e.named_child(0))?, ctx, locals), + // `((Element) node).text()`, `(x as Store).load()`: the type it is cast to + "cast_expression" => self.base_type(self.text(e.child_by_field_name("type")?)), + "as_expression" | "satisfies_expression" => self.base_type(self.text(e.named_child(1)?)), + "identifier" => ctx.vars.get(self.text(e)).cloned(), + k if self.spec.calls.iter().any(|(c, _)| *c == k) => { + let t = self.call_target(e, ctx, locals)?; + // long chains (`a().b().c().d()`) are builders: every step returns the same thing + (t.matches("()").count() < 4).then(|| format!("{t}()")) + } + _ => None, + } + } + + /// Locals initialised from a call (`x := getPool()`, `var s = repo.find(id)`, + /// `const st = createStore()`): their type is the callee's result, in source order so that + /// `y := x.child()` builds on `x`. + fn call_vars(&self, func: Node, ctx: &mut Ctx, locals: &HashSet) { + let mut found: Vec<(Node, Node)> = Vec::new(); + let mut stack = vec![func]; + while let Some(n) = stack.pop() { + match n.kind() { + // Go: `x := f()`, `x, err := f()` (the first result), `a, b := f(), g()` + "short_var_declaration" => { + if let (Some(l), Some(r)) = (n.child_by_field_name("left"), n.child_by_field_name("right")) { + let (mut c1, mut c2) = (l.walk(), r.walk()); + let names: Vec = l.named_children(&mut c1).collect(); + let vals: Vec = r.named_children(&mut c2).collect(); + if vals.len() == 1 { + found.extend(names.first().map(|nm| (*nm, vals[0]))); + } else { + found.extend(names.iter().copied().zip(vals.iter().copied())); + } + } + } + // Go `for _, c := range cmd.Commands()`: the element of what the call returns + "range_clause" => { + if let (Some(l), Some(r)) = (n.child_by_field_name("left"), n.child_by_field_name("right")) { + let mut c1 = l.walk(); + let names: Vec = l.named_children(&mut c1).collect(); + if names.len() == 2 { + found.push((names[1], r)); + } + } + } + // Go `var x = f()`; TS `const x = f()`; Java `var x = f();` + "var_spec" | "variable_declarator" => { + if let (Some(nm), Some(val)) = (n.child_by_field_name("name"), n.child_by_field_name("value")) { + let val = if val.kind() == "expression_list" { val.named_child(0).unwrap_or(val) } else { val }; + found.push((nm, val)); + } + } + _ => {} + } + let mut c = n.walk(); + for ch in n.named_children(&mut c) { + stack.push(ch); + } + } + found.sort_by_key(|(nm, _)| nm.start_byte()); + for (nm, val) in found { + let name = self.text(nm); + if nm.kind() != "identifier" || name == "_" || ctx.vars.contains_key(name) { + continue; + } + if let Some(t) = self.value_type(val, ctx, locals) { + ctx.vars.insert(name.to_string(), t); + } + } + } + fn callee(&self, f: Node, ctx: &Ctx, locals: &HashSet) -> Option { if let Some(&(_, of, mf)) = self.spec.member.iter().find(|(k, _, _)| *k == f.kind()) { return self.member_target(f.child_by_field_name(of)?, f.child_by_field_name(mf), ctx, locals); @@ -428,6 +580,34 @@ impl<'a> Ex<'a> { if self.spec.this.contains(&o) || self.spec.this.contains(&obj.kind()) || ctx.recv.as_deref() == Some(o) { return Some(format!("Self::{m}")); } + if obj.kind() == "identifier" { + if let Some(t) = ctx.vars.get(o) { + return Some(format!("{t}::{m}")); + } + // Java: a bare field name is `this.field` + if self.spec.bare_is_self && !locals.contains(o) { + if let Some(t) = ctx.owner.as_ref().and_then(|w| self.fields.get(w)).and_then(|f| f.get(o)) { + return Some(format!("{t}::{m}")); + } + } + } + // `getPool().release()`, `new Store().load()`: a method of what the expression makes + if obj.kind() != "identifier" { + if let Some(t) = self.value_type(obj, ctx, locals) { + return Some(format!("{t}::{m}")); + } + } + // `this.pool.release()`, Go `s.parent.Find()`: a field of this object with a known type + if let Some(&(_, of, mf)) = self.spec.member.iter().find(|(k, _, _)| *k == obj.kind()) { + if let (Some(base), Some(field)) = (obj.child_by_field_name(of), obj.child_by_field_name(mf)) { + let b = self.text(base); + if self.spec.this.contains(&b) || self.spec.this.contains(&base.kind()) || ctx.recv.as_deref() == Some(b) { + if let Some(t) = ctx.owner.as_ref().and_then(|w| self.fields.get(w)).and_then(|f| f.get(self.text(field))) { + return Some(format!("{t}::{m}")); + } + } + } + } if obj.kind() == "identifier" || obj.kind() == "package_identifier" { if let Some(a) = self.aliases.get(o) { if !locals.contains(o) { @@ -456,6 +636,101 @@ impl<'a> Ex<'a> { name.to_string() } + /// Named type of a type expression: `*Command` → `Command`, `List` → `List`, + /// `pkg.Type` → through the import. Built-ins and literals give nothing. + fn base_type(&self, t: &str) -> Option { + let t = t.trim().trim_start_matches(':').trim(); + let t = t.trim_start_matches(['*', '&', ' ']); + let t = t.strip_prefix("[]").unwrap_or(t); + let t = t.split(['<', '[', '(', '|', ' ', '{', ',', '?']).next()?.trim_end_matches("[]"); + let first = t.chars().next()?; + if t.is_empty() || !(first.is_alphabetic() || first == '_') || self.spec.builtin_types.contains(&t) || matches!(t, "map" | "chan" | "func" | "var" | "const" | "let") { + return None; + } + Some(self.map_alias(&t.replace('.', "::"))) + } + + /// Type of the value an expression makes: `&Command{}`, `new Store()`, `NewCommand()`, `new(T)`. + fn expr_type(&self, e: Node) -> Option { + match e.kind() { + "composite_literal" | "object_creation_expression" => self.base_type(self.text(e.child_by_field_name("type")?)), + "new_expression" => self.base_type(self.text(e.child_by_field_name("constructor")?)), + "unary_expression" | "parenthesized_expression" | "await_expression" => self.expr_type(e.child_by_field_name("operand").or_else(|| e.named_child(0))?), + "call_expression" => { + let f = e.child_by_field_name("function")?; + let name = self.text(f.child_by_field_name("field").or_else(|| f.child_by_field_name("property")).unwrap_or(f)); + if name == "new" { + return self.base_type(self.text(e.child_by_field_name("arguments")?.named_child(0)?)); + } + // Go constructors by convention: NewCommand() → Command (keep a package prefix: pkg.NewX → pkg::X) + let rest = name.strip_prefix("New").filter(|r| r.chars().next().is_some_and(char::is_uppercase))?; + let pkg = f.child_by_field_name("operand").map(|o| format!("{}.", self.text(o))).unwrap_or_default(); + self.base_type(&format!("{pkg}{rest}")) + } + _ => None, + } + } + + /// Local names with a known type inside one function. + fn var_types(&self, func: Node, params: &[Param]) -> HashMap { + let mut v = HashMap::new(); + for p in params { + if let Some(t) = self.base_type(&p.ty) { + v.insert(p.name.clone(), t); + } + } + let mut stack = vec![func]; + while let Some(n) = stack.pop() { + match n.kind() { + // Go: a, b := X{}, NewY() + "short_var_declaration" => { + if let (Some(l), Some(r)) = (n.child_by_field_name("left"), n.child_by_field_name("right")) { + let (mut c1, mut c2) = (l.walk(), r.walk()); + let names: Vec = l.named_children(&mut c1).collect(); + let vals: Vec = r.named_children(&mut c2).collect(); + for (nm, val) in names.iter().zip(vals.iter()) { + if let Some(t) = self.expr_type(*val) { + v.insert(self.text(*nm).to_string(), t); + } + } + } + } + // Go `var x T`; TS `let x: T` / `const x = new T()` + "var_spec" | "variable_declarator" => { + let t = n.child_by_field_name("type").and_then(|t| self.base_type(self.text(t))).or_else(|| n.child_by_field_name("value").and_then(|x| self.expr_type(x))); + if let (Some(t), Some(nm)) = (t, n.child_by_field_name("name")) { + if nm.kind() == "identifier" { + v.insert(self.text(nm).to_string(), t); + } + } + } + // Java `for (Element el : els)` + "enhanced_for_statement" => { + if let (Some(t), Some(nm)) = (n.child_by_field_name("type").and_then(|t| self.base_type(self.text(t))), n.child_by_field_name("name")) { + v.insert(self.text(nm).to_string(), t); + } + } + // Java `Store s = …;` / `var s = new Store();` + "local_variable_declaration" => { + let declared = n.child_by_field_name("type").map(|t| self.text(t)).unwrap_or(""); + let mut c = n.walk(); + for d in n.children_by_field_name("declarator", &mut c) { + let t = if declared == "var" { d.child_by_field_name("value").and_then(|x| self.expr_type(x)) } else { self.base_type(declared) }; + if let (Some(t), Some(nm)) = (t, d.child_by_field_name("name")) { + v.insert(self.text(nm).to_string(), t); + } + } + } + _ => {} + } + let mut c = n.walk(); + for ch in n.named_children(&mut c) { + stack.push(ch); + } + } + v + } + /// Names bound inside a function: parameters, variables, loop variables, lambda parameters. fn locals(&self, func: Node) -> HashSet { let mut out = HashSet::new(); diff --git a/crates/gitnext-parse/src/lib.rs b/crates/gitnext-parse/src/lib.rs index 320d5d2..496ea79 100644 --- a/crates/gitnext-parse/src/lib.rs +++ b/crates/gitnext-parse/src/lib.rs @@ -9,7 +9,7 @@ //! TypeScript, JavaScript, Go and Java. /// Bump when extractor output changes; the index re-parses everything on mismatch. -pub const PARSER_VERSION: u32 = 21; +pub const PARSER_VERSION: u32 = 31; mod cfamily; mod generic; @@ -598,6 +598,129 @@ pub fn cargo_package_name(toml: &str) -> Option { None } +/// Byte ranges of comments and string literals in a source file — where a name is +/// only text. `None` for files without a parser (all of it is text). +pub fn text_spans(rel: &Path, src: &str) -> Option> { + let lang = lang_for(rel)?; + let mut parser = tree_sitter::Parser::new(); + parser.set_language(&lang.grammar()).ok()?; + let tree = parser.parse(src, None)?; + let mut out = Vec::new(); + let mut stack = vec![tree.root_node()]; + while let Some(n) = stack.pop() { + let k = n.kind(); + if k.contains("comment") || k.contains("string") || k == "char_literal" || k == "character_literal" || k == "rune_literal" || k == "template_literal" { + out.push((n.start_byte(), n.end_byte())); + continue; + } + let mut c = n.walk(); + for ch in n.children(&mut c) { + stack.push(ch); + } + } + Some(out) +} + +/// Byte ranges of names inside import / export statements (`import { a as b } from …`, +/// `export { a } from …`, Java `import static p.C.m;`): where a rename must follow +/// the name even though no call edge points there. +pub fn import_name_spans(rel: &Path, src: &str) -> Vec<(usize, usize)> { + let Some(lang) = lang_for(rel) else { return vec![] }; + let mut parser = tree_sitter::Parser::new(); + if parser.set_language(&lang.grammar()).is_err() { + return vec![]; + } + let Some(tree) = parser.parse(src, None) else { return vec![] }; + let mut out = Vec::new(); + let mut stack = vec![tree.root_node()]; + while let Some(n) = stack.pop() { + match n.kind() { + "import_specifier" | "export_specifier" => { + if let Some(x) = n.child_by_field_name("name") { + out.push((x.start_byte(), x.end_byte())); + } + continue; + } + // Java: the last identifier of `import [static] a.b.C.m;` + "import_declaration" if lang == Lang::Java => { + let mut c = n.walk(); + if let Some(p) = n.named_children(&mut c).find(|x| x.kind() == "scoped_identifier") { + if let Some(x) = p.child_by_field_name("name") { + out.push((x.start_byte(), x.end_byte())); + } + } + continue; + } + _ => {} + } + let mut c = n.walk(); + for ch in n.named_children(&mut c) { + stack.push(ch); + } + } + out +} + +/// Rust: byte range of every name a `use` brings in, with the first segment of its path — +/// `use crate::util::{third, slice_eq as eq};` gives `third` and `slice_eq`, both from `crate`. +/// A rename follows the name here even inside a group, where no edge points at it. +pub fn rust_use_names(src: &str) -> Vec<(usize, usize, String)> { + fn walk(n: tree_sitter::Node, src: &[u8], first: Option<&str>, out: &mut Vec<(usize, usize, String)>) { + let head = |p: tree_sitter::Node| p.utf8_text(src).unwrap_or("").split("::").next().unwrap_or("").trim().to_string(); + match n.kind() { + "scoped_identifier" => { + if let (Some(path), Some(name)) = (n.child_by_field_name("path"), n.child_by_field_name("name")) { + let f = first.map(str::to_string).unwrap_or_else(|| head(path)); + out.push((name.start_byte(), name.end_byte(), f)); + } + } + "identifier" => { + if let Some(f) = first { + out.push((n.start_byte(), n.end_byte(), f.to_string())); + } + } + "use_as_clause" => { + if let Some(p) = n.child_by_field_name("path") { + walk(p, src, first, out); + } + } + "scoped_use_list" => { + let f = first.map(str::to_string).or_else(|| n.child_by_field_name("path").map(head)); + if let Some(list) = n.child_by_field_name("list") { + walk(list, src, f.as_deref(), out); + } + } + "use_list" => { + let mut c = n.walk(); + for ch in n.named_children(&mut c) { + walk(ch, src, first, out); + } + } + _ => {} + } + } + let mut parser = tree_sitter::Parser::new(); + if parser.set_language(&Lang::Rust.grammar()).is_err() { + return vec![]; + } + let Some(tree) = parser.parse(src, None) else { return vec![] }; + let mut out = Vec::new(); + let mut stack = vec![tree.root_node()]; + while let Some(n) = stack.pop() { + if n.kind() == "use_declaration" { + if let Some(a) = n.child_by_field_name("argument") { + walk(a, src.as_bytes(), None, &mut out); + } + continue; + } + let mut c = n.walk(); + for ch in n.named_children(&mut c) { + stack.push(ch); + } + } + out +} + /// Positions (1-based line, 0-based col) of syntax errors in a source file. /// Used to refuse edits that would break the file. Empty for unknown languages. pub fn syntax_errors(rel: &Path, src: &str) -> Vec<(u32, u32)> { diff --git a/crates/gitnext-parse/src/python.rs b/crates/gitnext-parse/src/python.rs index b26beab..2c1a049 100644 --- a/crates/gitnext-parse/src/python.rs +++ b/crates/gitnext-parse/src/python.rs @@ -26,7 +26,7 @@ pub fn analyze(rel: &Path, src: &str, pkg: Option<&CrateHint>) -> anyhow::Result let is_pkg = rel_s.ends_with("__init__.py"); let in_test = is_test_path(&rel_s); - let mut ex = Ex { src: src.as_bytes(), out: FileAnalysis::default(), imported: HashSet::new(), aliases: std::collections::HashMap::new() }; + let mut ex = Ex { src: src.as_bytes(), out: FileAnalysis::default(), imported: HashSet::new(), aliases: std::collections::HashMap::new(), toplevel: HashSet::new() }; ex.out.module_doc = docstring(root, ex.src); ex.out.symbols.push(Symbol { kind: Kind::Module, @@ -50,6 +50,13 @@ pub fn analyze(rel: &Path, src: &str, pkg: Option<&CrateHint>) -> anyhow::Result // Pass 1: imports (names bound by imports decide how `x.f()` calls are read). let package = if is_pkg { module.clone() } else { module.rsplit_once("::").map(|(p, _)| p.to_string()).unwrap_or_default() }; ex.imports(root, &module, &package); + let mut cur = root.walk(); + for c in root.named_children(&mut cur) { + let def = if c.kind() == "decorated_definition" { c.child_by_field_name("definition") } else { Some(c) }; + if let Some(name) = def.filter(|d| matches!(d.kind(), "function_definition" | "class_definition")).and_then(|d| d.child_by_field_name("name")) { + ex.toplevel.insert(ex.text(name).to_string()); + } + } // Pass 2: definitions. let ctx = Ctx { module: module.clone(), owner: None, in_test }; ex.block(root, &ctx); @@ -85,6 +92,8 @@ struct Ex<'a> { imported: HashSet, /// local name → module path it stands for (`tt` → `loca::tools::tests`) aliases: std::collections::HashMap, + /// Functions and classes defined at module level: a bare mention of one is a reference to it. + toplevel: HashSet, } const BUILTIN_TYPES: &[&str] = &[ @@ -202,7 +211,7 @@ impl<'a> Ex<'a> { let mut cur = n.walk(); let ds: Vec = n.named_children(&mut cur).filter(|c| c.kind() == "decorator").collect(); for d in ds { - self.collect_calls(d, &mut calls); + self.collect_calls(d, &HashSet::new(), &mut calls); } for (to, l, col) in calls { self.out.edges.push(Edge { from: ctx.module.clone(), to, kind: EdgeKind::Calls, line: l, col }); @@ -214,7 +223,7 @@ impl<'a> Ex<'a> { self.module_const(n, ctx); // module-level code runs at import / as a script: `app = Flask(...)`, `main()` let mut calls = Vec::new(); - self.collect_calls(n, &mut calls); + self.collect_calls(n, &HashSet::new(), &mut calls); for (to, l, col) in calls { self.out.edges.push(Edge { from: ctx.module.clone(), to, kind: EdgeKind::Calls, line: l, col }); } @@ -331,8 +340,8 @@ impl<'a> Ex<'a> { } if let Some(b) = body { let mut calls = Vec::new(); - self.collect_calls(b, &mut calls); let locals = crate::local_bindings(n, self.src); + self.collect_calls(b, &locals, &mut calls); calls.retain(|(to, _, _)| to.contains("::") || to.starts_with('.') || !locals.contains(to.as_str())); for (to, l, col) in calls { self.out.edges.push(Edge { from: sym.qualified.clone(), to, kind: EdgeKind::Calls, line: l, col }); @@ -340,7 +349,13 @@ impl<'a> Ex<'a> { } let q = sym.qualified.clone(); let is_init = name == "__init__"; + let in_test = sym.test; self.out.symbols.push(sym); + // classes defined inside the function (test doubles: `class CustomFormatter(HelpFormatter)`) + if let Some(b) = body { + let inner = Ctx { module: q.clone(), owner: None, in_test }; + self.nested_classes(b, &inner); + } // `self.x = …` in __init__ become fields of the class. if is_init { if let (Some(b), Some(owner)) = (body, ctx.owner.as_ref()) { @@ -390,6 +405,18 @@ impl<'a> Ex<'a> { } } + fn nested_classes(&mut self, n: Node, ctx: &Ctx) { + let mut cur = n.walk(); + let kids: Vec = n.named_children(&mut cur).collect(); + for c in kids { + match c.kind() { + "class_definition" => self.class(c, ctx, None), + "function_definition" | "lambda" => {} + _ => self.nested_classes(c, ctx), + } + } + } + fn class(&mut self, n: Node, ctx: &Ctx, decorators: Option) { let Some(name_n) = n.child_by_field_name("name") else { return }; let name = self.text(name_n).to_string(); @@ -467,65 +494,146 @@ impl<'a> Ex<'a> { } } - fn collect_calls(&self, n: Node, out: &mut Vec<(String, u32, u32)>) { - if n.kind() == "call" { - if let Some(f) = n.child_by_field_name("function") { - let name = match f.kind() { - "identifier" => Some(self.text(f).to_string()), - "attribute" => { - let attr = f.child_by_field_name("attribute").map(|a| self.text(a)).unwrap_or(""); - let obj = f.child_by_field_name("object"); - match obj.map(|o| (o.kind(), self.text(o))) { - Some((_, "self" | "cls")) => Some(format!("Self::{attr}")), - // `Class.method()` or `module.func()` for imported / capitalised names - // `tt.run()` where `tt` is an imported module: the module's function - Some(("identifier", o)) if self.aliases.contains_key(o) && !self.aliases[o].is_empty() => { - Some(format!("{}::{attr}", self.aliases[o])) - } - Some(("identifier", o)) if self.imported.contains(o) || o.chars().next().is_some_and(|c| c.is_ascii_uppercase()) => { - Some(format!("{o}::{attr}")) - } - _ => Some(format!(".{attr}")), - } - } - _ => None, - }; - if let Some(nm) = name { - let (l, c) = name_pos(f); - out.push((nm, l, c)); + /// `click._compat` → `click::_compat`: a dotted chain that starts at an imported module. + /// A local value of the same name (`for command in …` next to `from .decorators import command`) + /// is not that module. + fn module_chain(&self, obj: Node, locals: &HashSet) -> Option { + let mut parts: Vec<&str> = Vec::new(); + let mut cur = obj; + loop { + match cur.kind() { + "identifier" => { + parts.push(self.text(cur)); + break; } + "attribute" => { + parts.push(self.text(cur.child_by_field_name("attribute")?)); + cur = cur.child_by_field_name("object")?; + } + _ => return None, + } + } + parts.reverse(); + let root = parts[0]; + if locals.contains(root) { + return None; + } + let head = match self.aliases.get(root) { + Some(p) if !p.is_empty() => p.as_str(), + _ if self.imported.contains(root) => root, + _ => return None, + }; + Some(std::iter::once(head).chain(parts[1..].iter().copied()).collect::>().join("::")) + } + + /// What `f` names when it is called or used as a decorator, in edge notation. + fn callee(&self, f: Node, locals: &HashSet) -> Option { + match f.kind() { + "identifier" => Some(self.text(f).to_string()), + "attribute" => { + let attr = f.child_by_field_name("attribute").map(|a| self.text(a)).unwrap_or(""); + let obj = f.child_by_field_name("object")?; + let o = self.text(obj); + Some(if matches!(o, "self" | "cls") { + format!("Self::{attr}") + } else if let Some(path) = self.module_chain(obj, locals) { + // `module.func()`, `tt.run()` where `tt` is an imported module, `click._compat.f()` + format!("{path}::{attr}") + } else if obj.kind() == "identifier" && o.chars().next().is_some_and(|c| c.is_ascii_uppercase()) { + // `Class.method()` + format!("{o}::{attr}") + } else { + format!(".{attr}") + }) } + _ => None, } - // `real = tt.detect_test_command`, `tt.detect_test_command = fake`: a module function - // referenced (or patched) without being called - if n.kind() == "attribute" { - let is_callee = n.parent().is_some_and(|p| p.kind() == "call" && p.child_by_field_name("function").map(|f| f.id()) == Some(n.id())); - if !is_callee { - if let (Some(o), Some(attr)) = (n.child_by_field_name("object"), n.child_by_field_name("attribute")) { - if o.kind() == "identifier" { - if let Some(path) = self.aliases.get(self.text(o)).filter(|p| !p.is_empty()) { + } + + /// A bare name used as a value (`f = hidden if hide else visible`, `{"k": parse}`): a reference + /// when it is a function / class of this module or an imported name, and not a local value. + fn value_ref(&self, v: Node, locals: &HashSet, out: &mut Vec<(String, u32, u32)>) { + if v.kind() != "identifier" { + return; + } + let name = self.text(v); + if (self.toplevel.contains(name) || self.imported.contains(name)) && !locals.contains(name) { + let (l, c) = name_pos(v); + out.push((name.to_string(), l, c)); + } + } + + fn collect_calls(&self, n: Node, locals: &HashSet, out: &mut Vec<(String, u32, u32)>) { + match n.kind() { + "call" => { + if let Some(f) = n.child_by_field_name("function") { + if let Some(nm) = self.callee(f, locals) { + let (l, c) = name_pos(f); + out.push((nm, l, c)); + } + } + } + // `@ctx.call_on_close`, `@pass_context` on a nested function: the decorator is used + "decorator" => match n.named_child(0) { + Some(f) if f.kind() == "attribute" => { + if let Some(nm) = self.callee(f, locals) { + let (l, c) = name_pos(f); + out.push((nm, l, c)); + } + } + // `@property`, `@staticmethod` are builtins; a function of this project is a reference + Some(f) => self.value_ref(f, locals, out), + None => {} + }, + // `real = tt.detect_test_command`, `tt.detect_test_command = fake`, `click.parser.split`: + // a module function referenced (or patched) without being called + "attribute" => { + let outer = n.parent().is_some_and(|p| match p.kind() { + "call" => p.child_by_field_name("function").map(|f| f.id()) == Some(n.id()), + "attribute" => p.child_by_field_name("object").map(|o| o.id()) == Some(n.id()), + "decorator" => true, + _ => false, + }); + if !outer { + if let (Some(o), Some(attr)) = (n.child_by_field_name("object"), n.child_by_field_name("attribute")) { + if let Some(path) = self.module_chain(o, locals) { let (l, c) = name_pos(n); out.push((format!("{path}::{}", self.text(attr)), l, c)); } } } } - } - // functions / classes passed as values: `map(parse_line, xs)`, `key=sort_key` - if n.kind() == "argument_list" { - let mut cur = n.walk(); - for a in n.named_children(&mut cur) { - let v = if a.kind() == "keyword_argument" { a.child_by_field_name("value") } else { Some(a) }; - if let Some(v) = v.filter(|v| v.kind() == "identifier") { - let (l, c) = name_pos(v); - out.push((self.text(v).to_string(), l, c)); + // functions / classes passed as values: `map(parse_line, xs)`, `key=sort_key` + "argument_list" => { + let mut cur = n.walk(); + for a in n.named_children(&mut cur) { + let v = if a.kind() == "keyword_argument" { a.child_by_field_name("value") } else { Some(a) }; + if let Some(v) = v.filter(|v| v.kind() == "identifier") { + let (l, c) = name_pos(v); + out.push((self.text(v).to_string(), l, c)); + } + } + } + "assignment" | "pair" | "default_parameter" | "typed_default_parameter" => { + let field = if n.kind() == "assignment" { "right" } else { "value" }; + if let Some(v) = n.child_by_field_name(field) { + self.value_ref(v, locals, out); } } + "conditional_expression" | "return_statement" | "list" | "tuple" | "set" | "expression_list" => { + let mut cur = n.walk(); + for v in n.named_children(&mut cur) { + self.value_ref(v, locals, out); + } + } + _ => {} } + // nested functions (decorators, closures, callbacks) have no symbol of their own: what they + // call belongs to the function they are written in. Nested classes do have symbols. let mut cur = n.walk(); for c in n.named_children(&mut cur) { - if !matches!(c.kind(), "function_definition" | "class_definition") { - self.collect_calls(c, out); + if c.kind() != "class_definition" { + self.collect_calls(c, locals, out); } } } diff --git a/crates/gitnext-parse/src/rust.rs b/crates/gitnext-parse/src/rust.rs index 07830f1..b885cf3 100644 --- a/crates/gitnext-parse/src/rust.rs +++ b/crates/gitnext-parse/src/rust.rs @@ -1,6 +1,7 @@ //! Rust extractor: walks the tree-sitter CST and emits symbols and edges. use crate::{name_pos, CrateHint, first_sentence, hash_hex, Edge, EdgeKind, FileAnalysis, Kind, Param, Symbol}; +use std::collections::HashMap; use std::path::{Component, Path}; use tree_sitter::{Node, Parser}; @@ -16,7 +17,7 @@ pub fn analyze(rel: &Path, src: &str, krate: Option<&CrateHint>) -> anyhow::Resu None => module_path(rel), }; - let mut ex = Extractor { src: src.as_bytes(), out: FileAnalysis::default() }; + let mut ex = Extractor { src: src.as_bytes(), out: FileAnalysis::default(), vars: HashMap::new(), fields: field_types(root, src.as_bytes()), owner_ty: None }; ex.out.module_doc = inner_doc(root, ex.src); // File-level module symbol: anchor for `use` edges and the file's purpose. @@ -106,6 +107,14 @@ struct Ctx { struct Extractor<'a> { src: &'a [u8], out: FileAnalysis, + /// local variable → its type, inside the function being read (`req: &VersionReq`, + /// `let v = Version::parse(s)?`): `v.matches()` then means `Version::matches` + vars: HashMap, + /// struct of this file → its fields with a repo type (`identifier: Identifier`, `core: Core`); + /// `None` when two definitions of the struct (cfg variants) disagree. `self.core.drain()` → `Core::drain` + fields: HashMap>>, + /// name of the type whose `impl` the current function is in (`Self` in field lookups) + owner_ty: Option, } impl<'a> Extractor<'a> { @@ -224,6 +233,16 @@ impl<'a> Extractor<'a> { // trait bounds: `fn largest(…)`, `where T: Into` self.bound_uses(&sym.qualified, n); if let Some(b) = body { + self.owner_ty = ctx.owner.as_deref().map(|o| o.rsplit("::").next().unwrap_or(o).to_string()); + let in_impl = self.owner_ty.is_some(); + // `rhs: &Self` → `rhs.as_str()` is `Self::as_str`, like `self.as_str()` + self.vars = sym + .params + .iter() + .filter(|p| p.name != "self") + .filter_map(|p| Some((p.name.clone(), repo_type(&p.ty).or_else(|| (in_impl && is_self_type(&p.ty)).then(|| "Self".to_string()))?))) + .collect(); + self.let_types(b); // types named inside the body (`let x: T`, `T::new()`, `T { .. }`) self.type_uses(&sym.qualified, b); let mut calls = Vec::new(); @@ -233,6 +252,8 @@ impl<'a> Extractor<'a> { for (to, line, col) in calls { self.out.edges.push(Edge { from: sym.qualified.clone(), to, kind: EdgeKind::Calls, line, col }); } + self.vars.clear(); + self.owner_ty = None; } self.out.symbols.push(sym); } @@ -357,6 +378,29 @@ impl<'a> Extractor<'a> { sym.returns = Some(collapse(self.text(t))); self.type_uses(&sym.qualified, t); } + // `macro_rules! indexset { (..) => { $crate::IndexSet::with_capacity(..) } }`: what the rules expand to + if kind == Kind::Macro { + let mut calls = Vec::new(); + let mut cur = n.walk(); + for rule in n.named_children(&mut cur).filter(|r| r.kind() == "macro_rule") { + if let Some(right) = rule.child_by_field_name("right") { + self.collect_calls(right, &mut calls); + } + } + for (to, line, col) in calls { + self.out.edges.push(Edge { from: sym.qualified.clone(), to, kind: EdgeKind::Calls, line, col }); + } + } + // `const EMPTY: Self = Prerelease { identifier: Identifier::empty() }`: the initializer calls + if matches!(kind, Kind::Const | Kind::Static) { + if let Some(v) = n.child_by_field_name("value") { + let mut calls = Vec::new(); + self.collect_calls(v, &mut calls); + for (to, line, col) in calls { + self.out.edges.push(Edge { from: sym.qualified.clone(), to, kind: EdgeKind::Calls, line, col }); + } + } + } self.out.symbols.push(sym); } @@ -420,6 +464,45 @@ impl<'a> Extractor<'a> { } } + fn callee_name(&self, f: Node) -> Option { + match f.kind() { + "identifier" => Some(self.text(f).to_string()), + "scoped_identifier" => Some(collapse(self.text(f))), + "field_expression" => { + let field = self.text(f.child_by_field_name("field")?); + let value = f.child_by_field_name("value")?; + if value.kind() == "self" { + return Some(format!("Self::{field}")); // self.method() → own type + } + // `v.matches()` with `v: Version`; `self.core.drain()` / `rhs.pre.is_empty()`: the field's type + match self.recv_type(value) { + Some(ty) => Some(format!("{ty}::{field}")), + None => Some(format!(".{field}")), + } + } + "generic_function" => f.child_by_field_name("function").and_then(|x| self.callee_name(x)), + _ => None, + } + } + + /// Type of a method receiver, as far as this file tells: a typed local or parameter, or a + /// field (chain) of a struct defined here — `self.map.core` with `map: IndexMap` and + /// `IndexMap { core: Core }` in the same file → `Core`. `Self` stays `Self` for the index. + fn recv_type(&self, v: Node) -> Option { + match v.kind() { + "identifier" => self.vars.get(self.text(v)).cloned(), + "self" => Some("Self".to_string()), + "parenthesized_expression" | "reference_expression" => self.recv_type(v.named_child(0)?), + "field_expression" => { + let base = self.recv_type(v.child_by_field_name("value")?)?; + let base = if base == "Self" { self.owner_ty.clone()? } else { base }; + let field = self.text(v.child_by_field_name("field")?); + self.fields.get(&base)?.get(field)?.clone() + } + _ => None, + } + } + fn collect_calls(&self, n: Node, out: &mut Vec<(String, u32, u32)>) { if n.kind() == "token_tree" { // Macro bodies (vec![..], println!(..)) are unparsed token streams: @@ -429,7 +512,7 @@ impl<'a> Extractor<'a> { } if n.kind() == "call_expression" { if let Some(f) = n.child_by_field_name("function") { - if let Some(name) = callee_name(f, self.src) { + if let Some(name) = self.callee_name(f) { let (l, c) = name_pos(f); out.push((name, l, c)); } @@ -464,6 +547,7 @@ impl Extractor<'_> { let mut pos = (0u32, 0u32); let mut method = false; let mut self_recv = false; + let mut recv_ty: Option = None; let (mut prev, mut prev2) = (String::new(), String::new()); let mut cur = tt.walk(); for c in tt.children(&mut cur) { @@ -477,6 +561,7 @@ impl Extractor<'_> { } else { method = prev == "."; self_recv = method && prev2 == "self"; + recv_ty = if method { self.vars.get(prev2.as_str()).cloned() } else { None }; path = text.to_string(); } } @@ -485,6 +570,8 @@ impl Extractor<'_> { if !path.is_empty() && text.starts_with('(') { let name = if self_recv { format!("Self::{path}") + } else if let Some(t) = recv_ty.as_ref().filter(|_| method) { + format!("{t}::{path}") } else if method { format!(".{path}") } else { @@ -502,23 +589,147 @@ impl Extractor<'_> { } } -fn callee_name(f: Node, src: &[u8]) -> Option { - let t = |n: Node| n.utf8_text(src).unwrap_or("").to_string(); - match f.kind() { - "identifier" => Some(t(f)), - "scoped_identifier" => Some(collapse(&t(f))), - "field_expression" => { - let field = f.child_by_field_name("field").map(t)?; - match f.child_by_field_name("value").map(|v| v.kind()) { - Some("self") => Some(format!("Self::{field}")), // self.method() → own type - _ => Some(format!(".{field}")), + +impl Extractor<'_> { + /// `let x: T = …`, `let x = T::new(…)`, `let x = T::parse(s)?`, `let x = T { … }`. + fn let_types(&mut self, n: Node) { + if n.kind() == "let_declaration" { + let name = n.child_by_field_name("pattern").filter(|p| p.kind() == "identifier").map(|p| self.text(p).to_string()); + let ty = n + .child_by_field_name("type") + .and_then(|t| repo_type(&collapse(self.text(t)))) + .or_else(|| n.child_by_field_name("value").and_then(|v| self.value_type(v))); + if let (Some(name), Some(ty)) = (name, ty) { + self.vars.insert(name, ty); + } + } + let mut cur = n.walk(); + for c in n.named_children(&mut cur) { + if !matches!(c.kind(), "function_item" | "impl_item" | "mod_item" | "trait_item") { + self.let_types(c); + } + } + } + + fn value_type(&self, v: Node) -> Option { + match v.kind() { + "try_expression" | "reference_expression" | "parenthesized_expression" => v.named_child(0).and_then(|x| self.value_type(x)), + "struct_expression" => repo_type(&collapse(self.text(v.child_by_field_name("name")?))), + "call_expression" => { + let f = v.child_by_field_name("function")?; + match f.kind() { + // `T::parse(s).unwrap()`, `.expect(..)`, `.clone()` + "field_expression" => { + let m = self.text(f.child_by_field_name("field")?); + if matches!(m, "unwrap" | "expect" | "clone" | "to_owned" | "unwrap_or_default") { + self.value_type(f.child_by_field_name("value")?) + } else { + None + } + } + "scoped_identifier" => { + let ty = self.text(f.child_by_field_name("path")?); + let m = self.text(f.child_by_field_name("name")?); + let ctor = matches!(m, "new" | "parse" | "default" | "empty" | "builder" | "create" | "open" | "from_str") + || m.starts_with("from") + || m.starts_with("with") + || m.starts_with("try_from"); + if ctor { repo_type(ty) } else { None } + } + _ => None, + } + } + _ => None, + } + } +} + +/// A type worth tracking for method calls: `&mut a::Foo` → `Foo`; not std, not generic params. +fn repo_type(t: &str) -> Option { + let t = strip_ref(t).trim_start_matches("dyn ").trim_start_matches("impl "); + let base = t.split(['<', ' ', '+', '[']).next()?; + let last = base.rsplit("::").next()?; + let first = last.chars().next()?; + let single_letter = last.len() == 1; + if !first.is_uppercase() || single_letter || last == "Self" || PRIMITIVE_OR_STD.contains(&last) || STD_TRAITS.contains(&last) { + return None; + } + Some(last.to_string()) +} + +/// `&'a mut T` → `T`: references, lifetimes and `mut` in front of a type. +fn strip_ref(t: &str) -> &str { + let mut t = t.trim(); + loop { + let before = t; + t = t.trim_start_matches(['&', ' ']); + if let Some(rest) = t.strip_prefix('\'') { + t = rest.trim_start_matches(|c: char| c.is_alphanumeric() || c == '_'); + } + t = t.strip_prefix("mut ").unwrap_or(t); + if t == before { + return t; + } + } +} + +/// `Self`, `&Self`, `&'a mut Self`. +fn is_self_type(t: &str) -> bool { + strip_ref(t) == "Self" +} + +/// Field types of the structs (and unions) a file defines, by struct name: named fields and +/// tuple fields (`0`, `1`…). Only repo types are kept; two definitions of one name (cfg +/// variants) that disagree on a field leave it unknown. +fn field_types(root: Node, src: &[u8]) -> HashMap>> { + let mut out: HashMap>> = HashMap::new(); + let mut stack = vec![root]; + while let Some(n) = stack.pop() { + if matches!(n.kind(), "struct_item" | "union_item") { + let (Some(name), Some(body)) = (n.child_by_field_name("name"), n.child_by_field_name("body")) else { continue }; + let t = |x: Node| x.utf8_text(src).unwrap_or(""); + let mut found: Vec<(String, Option)> = Vec::new(); + let mut cur = body.walk(); + let mut idx = 0; + for f in body.named_children(&mut cur) { + if f.kind() == "field_declaration" { + if let (Some(fname), Some(ty)) = (f.child_by_field_name("name"), f.child_by_field_name("type")) { + found.push((t(fname).to_string(), repo_type(&collapse(t(ty))))); + } + } else if f.kind() != "attribute_item" && f.kind() != "visibility_modifier" && f.kind() != "line_comment" && f.kind() != "block_comment" { + found.push((idx.to_string(), repo_type(&collapse(t(f))))); + idx += 1; + } } + let entry = out.entry(t(name).to_string()).or_default(); + for (fname, ty) in found { + match entry.get(&fname) { + Some(prev) if *prev != ty => { + entry.insert(fname, None); + } + Some(_) => {} + None => { + entry.insert(fname, ty); + } + } + } + continue; + } + let mut cur = n.walk(); + for c in n.named_children(&mut cur) { + stack.push(c); } - "generic_function" => f.child_by_field_name("function").and_then(|x| callee_name(x, src)), - _ => None, } + out } +/// `impl Into`, `&dyn Display`: std traits — their methods are not repo code. +const STD_TRAITS: &[&str] = &[ + "Into", "From", "AsRef", "AsMut", "Borrow", "Fn", "FnMut", "FnOnce", "Iterator", "IntoIterator", "Display", "Debug", + "ToString", "Clone", "Default", "Hash", "Hasher", "Read", "Write", "BufRead", "Error", "Any", "Send", "Sync", "Deref", + "PartialEq", "Eq", "PartialOrd", "Ord", "Future", "Formatter", "Result", +]; + const PRIMITIVE_OR_STD: &[&str] = &[ "Self", "String", "str", "Vec", "Option", "Box", "Rc", "Arc", "HashMap", "HashSet", "BTreeMap", "BTreeSet", "VecDeque", "Path", "PathBuf", "Cow", "RefCell", "Cell", "Mutex", "RwLock", diff --git a/crates/gitnext-parse/tests/fixtures/go/store.go.expected b/crates/gitnext-parse/tests/fixtures/go/store.go.expected index b85afdf..74d678e 100644 --- a/crates/gitnext-parse/tests/fixtures/go/store.go.expected +++ b/crates/gitnext-parse/tests/fixtures/go/store.go.expected @@ -46,6 +46,6 @@ edges: L30 calls go::Store::Save -> strings::ToUpper L31 calls go::Store::Save -> github.com/gin-gonic/gin::Default L33 calls go::Store::Save -> len - L36 calls go::TestSave -> .Save L36 calls go::TestSave -> New + L36 calls go::TestSave -> New()::Save L36 uses go::TestSave -> testing::T diff --git a/crates/gitnext-parse/tests/fixtures/java/Store.java.expected b/crates/gitnext-parse/tests/fixtures/java/Store.java.expected index 40b6235..7346950 100644 --- a/crates/gitnext-parse/tests/fixtures/java/Store.java.expected +++ b/crates/gitnext-parse/tests/fixtures/java/Store.java.expected @@ -47,6 +47,6 @@ edges: L13 calls com::acme::app::Store::save -> Self::flush L13 calls com::acme::app::Store::save -> Self::helper L13 calls com::acme::app::Store::save -> Util::fmt - L18 calls com::acme::app::StoreTest::saves -> .save L18 calls com::acme::app::StoreTest::saves -> Store + L18 calls com::acme::app::StoreTest::saves -> Store::save L18 calls com::acme::app::StoreTest::saves -> org::junit::Assert::assertTrue diff --git a/crates/gitnext-parse/tests/fixtures/python/store.py.expected b/crates/gitnext-parse/tests/fixtures/python/store.py.expected index ed4afe0..680f600 100644 --- a/crates/gitnext-parse/tests/fixtures/python/store.py.expected +++ b/crates/gitnext-parse/tests/fixtures/python/store.py.expected @@ -95,6 +95,7 @@ edges: L6 imports python::store -> typing::Optional L8 imports python::store -> python::model::Task L9 imports python::store -> python::events + L15 calls python::store -> dataclass L26 uses python::store::Backend::load -> Record L29 uses python::store::Backend::save -> Record L33 inherits python::store::JsonBackend -> Backend diff --git a/crates/gitnext-parse/tests/fixtures/rust/receivers.rs b/crates/gitnext-parse/tests/fixtures/rust/receivers.rs new file mode 100644 index 0000000..201f955 --- /dev/null +++ b/crates/gitnext-parse/tests/fixtures/rust/receivers.rs @@ -0,0 +1,59 @@ +//! Receivers of method calls whose type the file tells: fields, `&Self`, macro bodies. + +pub struct Ident {} + +pub struct Meta { + id: Ident, + #[cfg(feature = "std")] + extra: Ident, + #[cfg(not(feature = "std"))] + extra: Other, +} + +pub struct Other {} + +pub struct Pair(Ident, u8); + +pub struct View<'a> { + meta: &'a mut Meta, + count: usize, +} + +impl Meta { + pub fn is_empty(&self) -> bool { + self.id.is_empty() + } + pub fn cmp_with(&self, rhs: &Self) -> bool { + rhs.as_str() == self.as_str() + } + pub fn mixed(&self) -> bool { + // cfg variants disagree on `extra`: unknown + self.extra.is_empty() + } +} + +impl Pair { + pub fn first_empty(&self) -> bool { + self.0.is_empty() + } +} + +impl<'a> View<'a> { + pub fn deep(&self) -> bool { + self.meta.id.is_empty() && self.count.is_power_of_two() + } + pub fn param(&self, other: &Meta) -> bool { + other.id.is_empty() + } +} + +#[macro_export] +macro_rules! meta { + () => { + $crate::Meta::build() + }; + ($x:expr) => {{ + let m = $crate::Meta::from_id($x); + m + }}; +} diff --git a/crates/gitnext-parse/tests/fixtures/rust/receivers.rs.expected b/crates/gitnext-parse/tests/fixtures/rust/receivers.rs.expected new file mode 100644 index 0000000..6296850 --- /dev/null +++ b/crates/gitnext-parse/tests/fixtures/rust/receivers.rs.expected @@ -0,0 +1,71 @@ +module doc: Receivers of method calls whose type the file tells: fields, `&Self`, macro bodies. +symbols: +L1-60 module crate::rust::receivers [pub] + sig: mod crate::rust::receivers + doc: Receivers of method calls whose type the file tells: fields, `&Self`, macro bodies. +L3-3 struct crate::rust::receivers::Ident [pub] + sig: pub struct Ident + parent: crate::rust::receivers +L5-11 struct crate::rust::receivers::Meta [pub] + sig: pub struct Meta + parent: crate::rust::receivers + in: id: Ident, extra: Ident, extra: Other +L13-13 struct crate::rust::receivers::Other [pub] + sig: pub struct Other + parent: crate::rust::receivers +L15-15 struct crate::rust::receivers::Pair [pub] + sig: pub struct Pair + parent: crate::rust::receivers + in: 0: Ident, 1: u8 +L17-20 struct crate::rust::receivers::View [pub] + sig: pub struct View<'a> + parent: crate::rust::receivers + in: meta: &'a mut Meta, count: usize +L23-25 method crate::rust::receivers::Meta::is_empty [pub] + sig: pub fn is_empty(&self) -> bool + parent: crate::rust::receivers::Meta + in: self: &self + out: bool +L26-28 method crate::rust::receivers::Meta::cmp_with [pub] + sig: pub fn cmp_with(&self, rhs: &Self) -> bool + parent: crate::rust::receivers::Meta + in: self: &self, rhs: &Self + out: bool +L29-32 method crate::rust::receivers::Meta::mixed [pub] + sig: pub fn mixed(&self) -> bool + parent: crate::rust::receivers::Meta + in: self: &self + out: bool +L36-38 method crate::rust::receivers::Pair::first_empty [pub] + sig: pub fn first_empty(&self) -> bool + parent: crate::rust::receivers::Pair + in: self: &self + out: bool +L42-44 method crate::rust::receivers::View::deep [pub] + sig: pub fn deep(&self) -> bool + parent: crate::rust::receivers::View + in: self: &self + out: bool +L45-47 method crate::rust::receivers::View::param [pub] + sig: pub fn param(&self, other: &Meta) -> bool + parent: crate::rust::receivers::View + in: self: &self, other: &Meta + out: bool +L51-59 macro crate::rust::receivers::meta + sig: macro_rules! meta + parent: crate::rust::receivers +edges: + L6 uses crate::rust::receivers::Meta -> Ident + L10 uses crate::rust::receivers::Meta -> Other + L15 uses crate::rust::receivers::Pair -> Ident + L18 uses crate::rust::receivers::View -> Meta + L24 calls crate::rust::receivers::Meta::is_empty -> Ident::is_empty + L27 calls crate::rust::receivers::Meta::cmp_with -> Self::as_str + L31 calls crate::rust::receivers::Meta::mixed -> .is_empty + L37 calls crate::rust::receivers::Pair::first_empty -> Ident::is_empty + L43 calls crate::rust::receivers::View::deep -> .is_power_of_two + L43 calls crate::rust::receivers::View::deep -> Ident::is_empty + L45 uses crate::rust::receivers::View::param -> Meta + L46 calls crate::rust::receivers::View::param -> Ident::is_empty + L53 calls crate::rust::receivers::meta -> Meta::build + L56 calls crate::rust::receivers::meta -> Meta::from_id diff --git a/crates/gitnext-parse/tests/fixtures/rust/shapes.rs.expected b/crates/gitnext-parse/tests/fixtures/rust/shapes.rs.expected index 60ebd34..3b3b3e8 100644 --- a/crates/gitnext-parse/tests/fixtures/rust/shapes.rs.expected +++ b/crates/gitnext-parse/tests/fixtures/rust/shapes.rs.expected @@ -139,7 +139,7 @@ edges: L82 calls crate::rust::shapes::total_area -> .area L82 calls crate::rust::shapes::total_area -> .map L82 calls crate::rust::shapes::total_area -> .sum - L82 calls crate::rust::shapes::total_area -> .values + L82 calls crate::rust::shapes::total_area -> Registry::values L86 uses crate::rust::shapes::largest -> Shape L86 uses crate::rust::shapes::largest -> Sized L87 calls crate::rust::shapes::largest -> .area diff --git a/crates/gitnext-parse/tests/fixtures/ts/store.ts.expected b/crates/gitnext-parse/tests/fixtures/ts/store.ts.expected index 820ebb2..c691209 100644 --- a/crates/gitnext-parse/tests/fixtures/ts/store.ts.expected +++ b/crates/gitnext-parse/tests/fixtures/ts/store.ts.expected @@ -56,14 +56,14 @@ edges: L10 calls ts::store::Store::save -> Self::flush L10 calls ts::store::Store::save -> node:fs::writeFileSync L10 calls ts::store::Store::save -> ts::util::fmt::fmt - L16 calls ts::store::load -> .save L16 calls ts::store::load -> Store + L16 calls ts::store::load -> Store::save L16 uses ts::store::load -> Opts L16 uses ts::store::load -> Store - L18 calls ts::store -> .then L18 calls ts::store -> axios::get - L19 calls ts::store -> .toBeTruthy + L18 calls ts::store -> axios::get()::then L19 calls ts::store -> describe L19 calls ts::store -> expect + L19 calls ts::store -> expect()::toBeTruthy L19 calls ts::store -> it L19 calls ts::store -> load diff --git a/crates/gitnext-tui/Cargo.toml b/crates/gitnext-tui/Cargo.toml index eeffd53..775fa69 100644 --- a/crates/gitnext-tui/Cargo.toml +++ b/crates/gitnext-tui/Cargo.toml @@ -6,8 +6,9 @@ license.workspace = true [dependencies] anyhow = "1.0.104" -gitnext-core = { version = "0.2.0", path = "../gitnext-core" } -gitnext-index = { version = "0.2.0", path = "../gitnext-index" } -gitnext-ops = { version = "0.2.0", path = "../gitnext-ops" } -gitnext-parse = { version = "0.2.0", path = "../gitnext-parse" } +gitnext-core = { version = "0.3.0", path = "../gitnext-core" } +gitnext-index = { version = "0.3.0", path = "../gitnext-index" } +gitnext-ops = { version = "0.3.0", path = "../gitnext-ops" } +gitnext-parse = { version = "0.3.0", path = "../gitnext-parse" } ratatui = "0.30.2" +unicode-width = "0.2.3" diff --git a/crates/gitnext-tui/src/git.rs b/crates/gitnext-tui/src/git.rs index 0a1052f..0132e10 100644 --- a/crates/gitnext-tui/src/git.rs +++ b/crates/gitnext-tui/src/git.rs @@ -279,7 +279,8 @@ impl App<'_> { } pub(crate) fn draw_changes(&self, f: &mut Frame, sel: usize) { - let area = popup(f.area(), 90, 90); + // a screen of its own: nothing of the panes behind it shows through + let area = screen_area(f.area()); f.render_widget(Clear, area); let Some(cv) = &self.cv else { return }; let [head, body] = Layout::vertical([Constraint::Length(2), Constraint::Min(1)]).areas(area.inner(ratatui::layout::Margin { horizontal: 1, vertical: 1 })); @@ -379,7 +380,7 @@ impl App<'_> { } pub(crate) fn draw_split(&self, f: &mut Frame, title: &str, rows: &[DiffRow], scroll: u16) { - let area = popup(f.area(), 96, 92); + let area = screen_area(f.area()); f.render_widget(Clear, area); f.render_widget(pane_block(&format!("{title}· esc back "), true), area); let inner = area.inner(ratatui::layout::Margin { horizontal: 1, vertical: 1 }); diff --git a/crates/gitnext-tui/src/lib.rs b/crates/gitnext-tui/src/lib.rs index 554e418..6efd655 100644 --- a/crates/gitnext-tui/src/lib.rs +++ b/crates/gitnext-tui/src/lib.rs @@ -81,6 +81,8 @@ struct App<'w> { agent_marks: HashMap, status: Vec, changed: HashSet, + /// Fully staged: everything changed in the file is in the next commit. + staged: HashSet, branch: String, repo_name: String, expanded: HashSet, @@ -117,6 +119,7 @@ impl<'w> App<'w> { agent_marks: gitnext_ops::journal::last_session_marks(&gitnext_ops::journal::load(&ws.root)), status: vec![], changed: HashSet::new(), + staged: HashSet::new(), branch: String::new(), repo_name, expanded, @@ -160,6 +163,7 @@ impl<'w> App<'w> { self.branch = repo.branch(); self.status = repo.status().unwrap_or_default(); self.changed = self.status.iter().map(|e| e.path.clone()).collect(); + self.staged = self.status.iter().filter(|e| e.staged.is_some() && e.unstaged.is_none()).map(|e| e.path.clone()).collect(); } else { self.branch = "(no git)".into(); } @@ -416,7 +420,9 @@ impl<'w> App<'w> { let links = self.current_symbol().map(|i| self.symbol_detail(i).1).unwrap_or_default(); if !links.is_empty() && delta.abs() == 1 { self.link_sel = step(self.link_sel, links.len()); - let line = links[self.link_sel].0 as u16; + let lines = self.current_symbol().map(|i| self.symbol_detail(i).0).unwrap_or_default(); + let (_, rows) = wrap_hanging(lines, self.detail_width as usize); + let line = rows.get(links[self.link_sel].0).copied().unwrap_or(links[self.link_sel].0) as u16; let h = self.detail_height.saturating_sub(3); if line < self.detail_scroll || line >= self.detail_scroll + h { self.detail_scroll = line.saturating_sub(h / 3); @@ -685,12 +691,10 @@ impl<'w> App<'w> { Mode::Split { title, rows, scroll, .. } => self.draw_split(f, title, rows, *scroll), Mode::Timeline { entries, sel } => self.draw_timeline(f, entries, *sel), Mode::Page { title, lines, scroll } => { - let area = popup(f.area(), 84, 86); + let area = screen_area(f.area()); f.render_widget(Clear, area); - let p = Paragraph::new(Text::from(lines.clone())) - .block(pane_block(title, true)) - .wrap(Wrap { trim: false }) - .scroll((*scroll, 0)); + let (lines, _) = wrap_hanging(lines.clone(), area.width.saturating_sub(2) as usize); + let p = Paragraph::new(Text::from(lines)).block(pane_block(title, true)).scroll((*scroll, 0)); f.render_widget(p, area); } } @@ -727,21 +731,30 @@ impl<'w> App<'w> { Some((m, false)) => Line::from(Span::styled(format!(" {m}"), Style::new().fg(Color::Green))), None => { let keys: &[(&str, &str)] = match self.mode { - Mode::Changes { .. } => &[("space", "stage / unstage file or function"), ("enter", "before/after"), ("a", "stage all"), ("u", "unstage all"), ("c", "commit"), ("U", "undo commit"), ("esc", "close")], + Mode::Changes { .. } => &[("space", "stage file / function"), ("enter", "before/after"), ("c", "commit"), ("U", "undo commit"), ("esc", "close")], Mode::Commit { .. } => &[("enter", "commit"), ("ctrl-u", "clear"), ("ctrl-a", "toggle stage all"), ("esc", "cancel")], Mode::Split { .. } => &[("jk", "scroll"), ("esc", "back")], + Mode::Page { .. } => &[("jk", "scroll"), ("pgup/pgdn", "page"), ("any other key", "close")], Mode::Timeline { .. } => &[("jk", "move"), ("enter", "go back to this point"), ("esc", "close")], Mode::Palette { .. } => &[("type", "filter"), ("enter", "run"), ("esc", "close")], Mode::Confirm { .. } => &[("y", "yes"), ("n", "no")], Mode::Search { .. } => &[("↑↓", "select"), ("enter", "jump"), ("esc", "cancel")], - _ if self.focus == Pane::Detail => &[("jk", "links"), ("enter", "jump"), ("b", "back"), ("pgup/pgdn", "scroll"), ("h", "symbols"), ("/", "search"), ("q", "quit")], - _ => &[("ctrl-p", "all commands"), ("tab", "pane"), ("/", "search"), ("s", "changes"), ("c", "commit"), ("B", "branches"), ("U", "undo"), ("o", "overview"), ("a", "agent"), ("q", "quit")], + _ if self.focus == Pane::Detail => &[("jk", "links"), ("enter", "jump"), ("b", "back"), ("/", "search"), ("ctrl-p", "all")], + _ if self.focus == Pane::Symbols => &[("enter", "details"), ("/", "search"), ("s", "changes"), ("c", "commit"), ("ctrl-p", "all")], + _ => &[("enter", "open"), ("/", "search"), ("s", "changes"), ("o", "overview"), ("ctrl-p", "all")], }; let mut spans = vec![Span::raw(" ")]; for (k, v) in keys { spans.push(Span::styled(*k, Style::new().fg(ACCENT))); spans.push(Span::styled(format!(" {v} "), Style::new().fg(DIM))); } + // the tree marks, where they are visible + if matches!(self.mode, Mode::Normal) && self.focus == Pane::Files && !self.changed.is_empty() { + spans.push(Span::styled("+", Style::new().fg(Color::Green))); + spans.push(Span::styled(" staged ", Style::new().fg(DIM))); + spans.push(Span::styled("•", Style::new().fg(Color::Yellow))); + spans.push(Span::styled(" changed", Style::new().fg(DIM))); + } Line::from(spans) } }; @@ -763,7 +776,12 @@ impl<'w> App<'w> { let name_style = if r.is_dir { Style::new().bold() } else { Style::new() }; spans.push(Span::styled(r.name.clone(), name_style)); if changed { - spans.push(Span::styled(" ●", Style::new().fg(Color::Yellow))); + // + staged (goes into the next commit) · • changed, not staged + if !r.is_dir && self.staged.contains(&r.path) { + spans.push(Span::styled(" +", Style::new().fg(Color::Green))); + } else { + spans.push(Span::styled(" •", Style::new().fg(Color::Yellow))); + } } ListItem::new(Line::from(spans)) }) @@ -781,11 +799,13 @@ impl<'w> App<'w> { .map(|&i| { let s = &self.g.syms[i].sym; let nested = s.kind == Kind::Method || s.parent.as_deref().is_some_and(|p| p.contains("::") && self.g.syms.iter().any(|x| x.sym.qualified == p && x.sym.kind != Kind::Module)); + // one kind column for every row; members are indented under their type by name let indent = if nested { " " } else { "" }; let style = if s.is_public() { Style::new() } else { Style::new().fg(DIM) }; + let style = if s.kind.is_type() { style.bold() } else { style }; let mut spans = vec![ - Span::raw(indent), Span::styled(format!("{:<7}", views::kind_word(s.kind)), Style::new().fg(DIM)), + Span::raw(indent), Span::styled(s.name.clone(), style), ]; match self.agent_marks.get(&s.qualified) { @@ -804,7 +824,7 @@ impl<'w> App<'w> { } fn draw_detail(&self, f: &mut Frame, area: Rect) { - let (title, text) = if let Some(i) = self.current_symbol() { + if let Some(i) = self.current_symbol() { let (mut lines, links) = self.symbol_detail(i); if self.focus == Pane::Detail { if let Some(&(li, _)) = links.get(self.link_sel) { @@ -814,8 +834,13 @@ impl<'w> App<'w> { } } let title = if self.history.is_empty() { " detail ".to_string() } else { format!(" detail · b back ({}) ", self.history.len()) }; - (title, Text::from(lines)) - } else if let Some(r) = self.selected_row() { + // wrapped here, not by the Paragraph: continuation lines keep the indent + let (lines, _) = wrap_hanging(lines, area.width.saturating_sub(2) as usize); + let p = Paragraph::new(Text::from(lines)).block(pane_block(&title, self.focus == Pane::Detail)).scroll((self.detail_scroll, 0)); + f.render_widget(p, area); + return; + } + let (title, text) = if let Some(r) = self.selected_row() { if r.is_dir { (" map ".to_string(), self.dir_detail(&r.path)) } else { @@ -824,10 +849,8 @@ impl<'w> App<'w> { } else { (" detail ".to_string(), Text::from("empty repository — add some files".fg(DIM))) }; - let p = Paragraph::new(text) - .block(pane_block(&title, self.focus == Pane::Detail)) - .wrap(Wrap { trim: false }) - .scroll((self.detail_scroll, 0)); + let (lines, _) = wrap_hanging(text.lines, area.width.saturating_sub(2) as usize); + let p = Paragraph::new(Text::from(lines)).block(pane_block(&title, self.focus == Pane::Detail)).scroll((self.detail_scroll, 0)); f.render_widget(p, area); } @@ -1170,6 +1193,93 @@ fn hl(focused: bool) -> Style { } } +/// Wrap lines to `width` columns. A continuation keeps the line's indent (its +/// leading spaces, a line-number gutter and the code's own indentation) and +/// starts with `↪`, so wrapped signatures and code stay readable. Returns the +/// lines and, for each input line, the index of its first output row. +fn wrap_hanging(lines: Vec>, width: usize) -> (Vec>, Vec) { + use unicode_width::UnicodeWidthChar; + let mut out = Vec::with_capacity(lines.len()); + let mut rows = Vec::with_capacity(lines.len()); + for line in lines { + rows.push(out.len()); + let total: usize = line.spans.iter().map(|s| s.width()).sum(); + if width < 12 || total <= width { + out.push(line); + continue; + } + let line_style = line.style; + // (char, style) cells + let cells: Vec<(char, Style)> = line.spans.iter().flat_map(|s| s.content.chars().map(move |c| (c, s.style))).collect(); + // hanging indent: leading spaces, an optional line-number gutter, then code indentation + let text: String = cells.iter().map(|c| c.0).collect(); + let mut indent = text.len() - text.trim_start().len(); + let rest = &text[indent..]; + let digits = rest.chars().take_while(|c| c.is_ascii_digit()).count(); + if digits > 0 && rest[digits..].starts_with(' ') { + indent += digits; + indent += text[indent..].len() - text[indent..].trim_start().len(); + } + let indent = indent.min(width / 2); + let mut start = 0; + let mut first = true; + while start < cells.len() { + let avail = if first { width } else { width.saturating_sub(indent + 2) }; + // take cells up to `avail` columns + let (mut end, mut w) = (start, 0); + while end < cells.len() { + let cw = cells[end].0.width().unwrap_or(0); + if w + cw > avail { + break; + } + w += cw; + end += 1; + } + // break after the last space in the chunk when the line continues + if end < cells.len() { + if let Some(sp) = (start + 1..end).rev().find(|&k| cells[k].0 == ' ') { + if sp > start + avail / 3 { + end = sp + 1; + } + } + } + if end == start { + end = start + 1; + } + let mut spans: Vec> = Vec::new(); + if !first { + spans.push(Span::raw(" ".repeat(indent))); + spans.push(Span::styled("↪ ", Style::new().fg(DIM))); + } + let mut buf = String::new(); + let mut cur = cells[start].1; + let skip_lead = !first; + for (k, &(c, st)) in cells[start..end].iter().enumerate() { + if skip_lead && k == 0 && c == ' ' { + continue; + } + if st != cur && !buf.is_empty() { + spans.push(Span::styled(std::mem::take(&mut buf), cur)); + } + cur = st; + buf.push(c); + } + if !buf.is_empty() { + spans.push(Span::styled(buf, cur)); + } + out.push(Line::from(spans).style(line_style)); + start = end; + first = false; + } + } + (out, rows) +} + +/// Everything between the top bar and the key hints: for screens that replace the panes. +fn screen_area(area: Rect) -> Rect { + Rect { x: area.x, y: area.y + 1, width: area.width, height: area.height.saturating_sub(2) } +} + fn popup(area: Rect, pw: u16, ph: u16) -> Rect { let w = area.width * pw / 100; let h = area.height * ph / 100; @@ -1188,6 +1298,8 @@ mod tests { let root = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."); let ws = Workspace::open(&root).unwrap(); let mut app = App::new(&ws).unwrap(); + // the first-run welcome page covers the panes: close it like a user would + app.on_key(KeyEvent::new(KeyCode::Esc, KeyModifiers::NONE)); let mut term = Terminal::new(TestBackend::new(140, 40)).unwrap(); term.draw(|f| app.draw(f)).unwrap(); let buf = format!("{:?}", term.backend().buffer()); @@ -1216,6 +1328,25 @@ mod snapshot { out } + #[test] + fn wrapped_lines_keep_their_indent() { + let lines = vec![ + Line::from(" takes path impl AsRef and some more words that do not fit"), + Line::from("short"), + Line::from(" 19 pub fn open(path: impl AsRef) -> Result {"), + ]; + let (out, rows) = wrap_hanging(lines, 30); + let text: Vec = out.iter().map(|l| l.spans.iter().map(|s| s.content.as_ref()).collect()).collect(); + assert!(text.len() > 3, "{text:?}"); + assert!(text.iter().all(|t| unicode_width::UnicodeWidthStr::width(t.as_str()) <= 30), "{text:?}"); + // continuation of the first line: its 2-space indent, then the mark + assert!(text[1].starts_with(" ↪ "), "{text:?}"); + // the code line continues under its code, past the line-number gutter + let code = rows[2]; + assert!(text[code + 1].starts_with(&format!("{}↪ ", " ".repeat(10))), "{text:?}"); + assert_eq!(text[rows[1]], "short"); + } + #[test] #[ignore] fn print_screens() { diff --git a/docs/GUIDE.ru.md b/docs/GUIDE.ru.md index 261b32d..44a19fc 100644 --- a/docs/GUIDE.ru.md +++ b/docs/GUIDE.ru.md @@ -108,10 +108,12 @@ gitnext brief # «на чём остановились»: в Для моделей на 3–14B с контекстом 8–32k: -- `gitnext mcp --profile lite` — три инструмента, у каждого только строковые параметры (весь список ~1.2 KB): - - `look(what)` — один вход для всего чтения: файл или папка → функции и классы с номерами строк; имя функции или класса (`parse_date`, `Task.reopen`, даже `class Store`) → её код и кто её вызывает; текст ошибки или traceback → место, где она случилась; любые слова → где они встречаются; +- `gitnext mcp --profile lite` — пять инструментов, у каждого только строковые параметры (весь список меньше 2 KB): + - `look(what)` — один вход для всего чтения: файл или папка → функции и классы с номерами строк; имя функции или класса (`parse_date`, `Task.reopen`, даже `class Store`) → код, кто вызывает, тесты; текст ошибки → где она в коде; - `replace(symbol, code)` — заменить функцию целиком; - - `add_after(symbol, code)` — добавить код после функции. + - `add_after(symbol, code)` — добавить код после функции; + - `rename(symbol, new_name)` — переименовать везде: определение, вызовы, импорты, тесты; + - `check(test?)` — тест падает: с именем теста запускает его и показывает сбой и код, который чинить; после своей правки — без аргументов: «всё в порядке» или что упало. Ответ ограничен 1500 токенами (`GITNEXT_MCP_MAX_TOKENS`), в конце каждого ответа — подсказка, что вызвать дальше. - `gitnext setup loca` переводит блок gitnext в `AGENTS.md` в компактный вид (~0.9 KB вместо ~3.5 KB: области в порядке зависимостей и главные символы) — loca кладёт этот файл в системный промпт, а у неё лимит 6000 символов. MCP-инструменты по умолчанию не подключаются (см. замеры ниже); `gitnext setup loca --tools` добавит их в `.loca/config.json` и примеры вызовов в `LOCA.md`. - `explain` умеет работать с любым OpenAI-совместимым сервером: `GITNEXT_OPENAI_BASE=http://127.0.0.1:8080/v1 gitnext explain` (llama-server, LM Studio, vLLM). Блоки `` из ответа вырезаются. @@ -139,6 +141,15 @@ python3 integrations/loca/bench_gitnext.py --loca ~/Developer/loca \ - в остальных задачах разница меньше разброса между одинаковыми прогонами (до 2×); нужны повторы (`--repeat 3`); - за 14 прогонов модель ни разу не вызвала инструменты gitnext — ни когда они были за `load_tools`, ни когда стояли прямо в её списке (`mcp-core`, патч `integrations/loca/core_tools.patch` для loca). У loca есть свои `repo_map` и `read_symbol`, и 4B держится за них. Поэтому `setup loca` по умолчанию подключает только карту, а инструменты gitnext нужнее агентам без своей навигации по коду: Claude Code, Cursor, Codex. +**Новые замеры (ноябрь 2026)** — простой агент `eval/agent.py` с настоящим вызовом инструментов, без loca, на чужих проектах (click, semver); судят компилятор и тесты проекта: + +| | обычные инструменты | с gitnext | +|---|---:|---:| +| 24 задания (найти, кто вызывает, переименовать, починить) | 4 | 15; 17, если требовать сначала посмотреть код | +| 18 заданий без «починить»: одиннадцать инструментов / пять (`lite`) | | 14 / 17 | + +Здесь модель инструменты gitnext вызывает. Отличие от прошлого замера: не loca, а простой цикл с коротким списком инструментов, который понимает и вызовы, написанные моделью текстом. Подробно — `eval/results/HISTORY.md`, раздел про замеры агента. + ## Агенту: найти → понять → поправить ```sh @@ -262,7 +273,7 @@ Claude Code подхватит сервер при запуске в этой п | `gitnext rename [--dry-run]` | переименовать во всех однозначных местах, предупредить о переопределениях | | `gitnext overview` · `activity` · `hotspots` · `dead` · `cycles` · `entrypoints` | понимание проекта | | `gitnext history ` · `changelog a..b` · `since ` | семантическая история | -| `gitnext locate` (stdin) · `tests-for ` | ошибка → код; тесты и команда запуска | +| `gitnext locate` (stdin) · `tests-for [--all]` | ошибка → код; 10 тестов, которые упадут вероятнее всего, команда на них и на весь тестовый файл (`--all` — все тесты поимённо) | | `gitnext explain [path] [--dry-run]` · `annotate "текст"` | описания для кода без документации (`.gitnext/notes.tsv`) | | `gitnext lsp [--lang rust\|python\|c]` | точный граф: неоднозначные вызовы через rust-analyzer / pyright / clangd | | `gitnext journal [-n 3]` | журнал агента | diff --git a/docs/images/agent.ru.svg b/docs/images/agent.ru.svg new file mode 100644 index 0000000..da74b8b --- /dev/null +++ b/docs/images/agent.ru.svg @@ -0,0 +1,33 @@ + +Задания, решённые локальной моделью на 4B: с обычными инструментами 4 из 24, с gitnext 17 из 24 + +Локальная модель на 4B в настоящих проектах: решено заданий +Qwen 3.5 4B на llama.cpp · click (Python) и semver (Rust) · по 6 заданий каждого вида · судят компилятор и тесты самих проектов +обычные инструменты: читать, искать, править, запускать +та же модель с инструментами gitnext + +Найти, где функция + +4 из 6 + +6 из 6 +Кто вызывает функцию + +0 из 6 + +6 из 6 +Переименовать везде +проект должен собираться + +0 из 6 + +5 из 6 +Починить упавший тест +подсаженная ошибка + +0 из 6 + +0 из 6 +24 задания: с обычными инструментами решено 4, с gitnext — 17 (15, если от модели не требовать сначала посмотреть код). +Починка ошибки пока не решена: здесь 0 из 6; в более позднем замере на click 3 из 12 — когда gitnext why узнал, что на деле запускает упавший тест. + diff --git a/docs/images/agent.svg b/docs/images/agent.svg new file mode 100644 index 0000000..ca61fbb --- /dev/null +++ b/docs/images/agent.svg @@ -0,0 +1,33 @@ + +Tasks solved by a 4B local model: with plain tools 4 of 24, with gitnext tools 17 of 24 + +A 4B local model on real projects: tasks solved +Qwen 3.5 4B on llama.cpp · click (Python) and semver (Rust) · 6 tasks of each kind · judged by the projects' own compilers and tests +plain tools: read, grep, edit, run +the same model with gitnext tools + +Find where a function is + +4 of 6 + +6 of 6 +Who calls this function + +0 of 6 + +6 of 6 +Rename it everywhere +the project must still build + +0 of 6 + +5 of 6 +Fix a failing test +a seeded bug + +0 of 6 + +0 of 6 +24 tasks: 4 solved with plain tools, 17 with gitnext (15 when the model is not asked to look before it answers). +Fixing a bug is the open one: 0 of 6 here; 3 of 12 on click in a later run, once gitnext why knew what the failing test really runs. + diff --git a/docs/images/make_charts.py b/docs/images/make_charts.py new file mode 100644 index 0000000..093c76a --- /dev/null +++ b/docs/images/make_charts.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python3 +"""The two result charts of the README (English and Russian): docs/images/agent*.svg, why*.svg. + + python3 docs/images/make_charts.py + +Numbers: eval/results/HISTORY.md (the agent runs, `why` with the learned map). Two colours, the +same meaning in both charts: orange — without the thing shown, blue — with it. Every bar has its +value next to it, so nothing is told by colour alone. +""" +from pathlib import Path +from xml.sax.saxutils import escape + +HERE = Path(__file__).resolve().parent +FONT = "-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif" +SURFACE, BORDER, INK, MUTED = "#fbfcfa", "#d5dad3", "#1c2433", "#5e6b78" +WITHOUT, WITH = "#eb6834", "#2a78d6" +X0, SPAN, THICK, GAP, PITCH = 330, 470, 18, 2, 64 + + +def bar(x: float, y: float, w: float, color: str) -> str: + """Square at the baseline, 4px round at the data end.""" + if w <= 0: + return "" + r = min(4, w) + return f'' + + +def chart(path: Path, title: str, subtitle: str, legend: tuple[str, str], rows: list, notes: list[str], alt: str) -> None: + top = 122 + height = top + PITCH * len(rows) + 14 + 20 * len(notes) + 14 + o = [f'', + f'{escape(alt)}', + f'', + f'{escape(title)}', + f'{escape(subtitle)}'] + # legend: a swatch and its name, twice + x = 28 + for color, name in zip((WITHOUT, WITH), legend): + o.append(f'{escape(name)}') + x += 18 + 7.2 * len(name) + 26 + # one hairline: the baseline every bar grows from + y_end = top + PITCH * len(rows) - 14 + o.append(f'') + for k, (name, sub, a, b) in enumerate(rows): + y = top + PITCH * k + o.append(f'{escape(name)}') + if sub: + o.append(f'{escape(sub)}') + for j, ((share, label), color) in enumerate(((a, WITHOUT), (b, WITH))): + yy = y + j * (THICK + GAP) + w = SPAN * share + o.append(bar(X0, yy, w, color)) + o.append(f'{escape(label)}') + y = top + PITCH * len(rows) + 14 + for n in notes: + o.append(f'{escape(n)}') + y += 20 + o.append("") + path.write_text("\n".join(o) + "\n") + + +def of6(n: int, word: str = "of") -> tuple[float, str]: + return n / 6, f"{n} {word} 6" + + +def pct(n: int, d: int, word: str = "of") -> tuple[float, str]: + return n / d, f"{round(100 * n / d)}% · {n} {word} {d}" + + +AGENT = [(4, 6), (0, 6), (0, 5), (0, 0)] # find, who calls, rename, fix: plain tools, with gitnext +WHY = [(1, 18, 20), (6, 14, 17), (3, 14, 20), (10, 46, 57)] # python, go, rust, all: graph, map, bugs + +chart(HERE / "agent.svg", "A 4B local model on real projects: tasks solved", + "Qwen 3.5 4B on llama.cpp · click (Python) and semver (Rust) · 6 tasks of each kind · judged by the projects' own compilers and tests", + ("plain tools: read, grep, edit, run", "the same model with gitnext tools"), + [(n, s, of6(a), of6(b)) for (n, s), (a, b) in zip([("Find where a function is", ""), ("Who calls this function", ""), ("Rename it everywhere", "the project must still build"), ("Fix a failing test", "a seeded bug")], AGENT)], + ["24 tasks: 4 solved with plain tools, 17 with gitnext (15 when the model is not asked to look before it answers).", + "Fixing a bug is the open one: 0 of 6 here; 3 of 12 on click in a later run, once gitnext why knew what the failing test really runs."], + "Tasks solved by a 4B local model: with plain tools 4 of 24, with gitnext tools 17 of 24") +chart(HERE / "agent.ru.svg", "Локальная модель на 4B в настоящих проектах: решено заданий", + "Qwen 3.5 4B на llama.cpp · click (Python) и semver (Rust) · по 6 заданий каждого вида · судят компилятор и тесты самих проектов", + ("обычные инструменты: читать, искать, править, запускать", "та же модель с инструментами gitnext"), + [(n, s, of6(a, "из"), of6(b, "из")) for (n, s), (a, b) in zip([("Найти, где функция", ""), ("Кто вызывает функцию", ""), ("Переименовать везде", "проект должен собираться"), ("Починить упавший тест", "подсаженная ошибка")], AGENT)], + ["24 задания: с обычными инструментами решено 4, с gitnext — 17 (15, если от модели не требовать сначала посмотреть код).", + "Починка ошибки пока не решена: здесь 0 из 6; в более позднем замере на click 3 из 12 — когда gitnext why узнал, что на деле запускает упавший тест."], + "Задания, решённые локальной моделью на 4B: с обычными инструментами 4 из 24, с gitnext 17 из 24") +chart(HERE / "why.svg", "A test fails: is the function at fault first in the list?", + "57 seeded bugs in 6 projects: one operator changed inside a function, then gitnext why is asked", + ("from the call graph alone", "after gitnext learn-tests (one test run with coverage)"), + [(n, s, pct(a, d), pct(b, d)) for (n, s), (a, b, d) in zip([("Python", "click, sqlparse"), ("Go", "cobra, chi"), ("Rust", "semver, indexmap"), ("All six projects", "")], WHY)], + ["With the map, why lists what the test really ran, puts the code changed since the tests last passed on top, and shows the changed lines.", + "Reproduce: python3 eval/why_rank.py --learn --variants static,default — tables in eval/results/why-rank*.md"], + "Share of seeded bugs where gitnext why names the function at fault first: 18% from the call graph, 81% with the learned coverage map") +chart(HERE / "why.ru.svg", "Тест упал: стоит ли виновная функция первой в списке?", + "57 подсаженных ошибок в 6 проектах: в функции меняется один оператор, затем спрашиваем gitnext why <упавший тест>", + ("только по графу вызовов", "после gitnext learn-tests (один прогон тестов с покрытием)"), + [(n, s, pct(a, d, "из"), pct(b, d, "из")) for (n, s), (a, b, d) in zip([("Python", "click, sqlparse"), ("Go", "cobra, chi"), ("Rust", "semver, indexmap"), ("Все шесть проектов", "")], WHY)], + ["С картой why показывает то, что тест на деле запускал, ставит первым код, изменённый с тех пор, как тесты проходили, и сами изменённые строки.", + "Воспроизвести: python3 eval/why_rank.py --learn --variants static,default — таблицы в eval/results/why-rank*.md"], + "Доля подсаженных ошибок, где gitnext why называет виновную функцию первой: 18% по графу вызовов, 81% с картой покрытия") +print("written:", ", ".join(p.name for p in sorted(HERE.glob("*.svg")) if p.name.startswith(("agent", "why")))) diff --git a/docs/images/tui-changes.svg b/docs/images/tui-changes.svg index 5132751..cabacbf 100644 --- a/docs/images/tui-changes.svg +++ b/docs/images/tui-changes.svg @@ -9,97 +9,65 @@ · 9 changed 30 code files · 146 functions and types ? help -╭ file╭ changes · main ───────────────────────────────────────────────────────────────────────────────────────────────────╮ -──────╮ +╭ changes · main ────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ -▸ cra -│ -1 file ready to commit, 1 file changed. -│ -│ +1 file ready to commit, 1 file changed. +│ │ -▸ -nat -│ -suggested message: -core: add Task::reopen; update Task::is_done -│ -│ +suggested message: +core: add Task::reopen; update Task::is_done +│ │ -▸ -py -│ -Ready to commit (1) - these go into the next commit -│ -│ +Ready to commit (1) + these go into the next commit +│ │ -▸ -scr -│ -modified -crates/core/src/model.rs - 2 symbols -│ -│ + modified crates/core/src/model.rs 2 symbols +│ │ -AGE -│ - + method Task::reopen added -│ -sk tr… -│ ++ +method +Task::reopen + added +│ │ -Car -│ -• -method -Task::is_done - changed -│ -del, … -│ +• +method +Task::is_done + changed +│ │ -Car -│ -Changed, not staged (1) - stage a file or a single function to include it -│ -│ +Changed, not staged (1) + stage a file or a single function to include it +│ │ -REA -│ -modified -py/taskflow_report/stats.py - 1 symbol -│ -│ +modified +py/taskflow_report/stats.py + 1 symbol +│ │ -TES -│ -• -function -velocity_per_day - renamed -│ -│ +• +function +velocity_per_day + renamed +│ │ -│ -│ -│ +│ │ -│ -│ -│ +│ │ -│ -│ -│ +│ │ -│ -│ -│ -╰─────╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ -──────╯ - staged Task::reopen -AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTphNjgwNmU5Zi03YWM4LTQwYWEtOTQyOC1jYTE5NDhkNmY3ZDAAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaKAtytc9oyVpiz8HoCJs3ewAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDpiNWI2MzZkMS04NzdjLTRkZWItOTMyOS1iN2ZiOTRhMTBkODVscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNoCV9BGAF0jloHmZKxJOM9+wAAAZljYm9yomdhY3Rpb25zgqJmYWN0aW9ua2MycGEub3BlbmVkanBhcmFtZXRlcnOha2luZ3JlZGllbnRzgaJjdXJseC1zZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmluZ3JlZGllbnQudjNkaGFzaFggYduz/Bj3yCv7ODJEP3u3H9G9ZG7mS5+/GslK78BiiuWkZmFjdGlvbngdY29tLmFudGhyb3BpYy5jbGF1ZGUucHJvdmlkZWRqcGFyYW1ldGVyc6F4H2NvbS5hbnRocm9waWMub3JpZ2luLWNvbmZpZGVuY2VndW5rbm93bmtkZXNjcmlwdGlvbnhmQ2xhdWRlIHByb3ZpZGVkIHRoaXMgZmlsZSBhdCB0aGUgcmVxdWVzdCBvZiBhIHVzZXIgYW5kIG1heSBoYXZlIGNyZWF0ZWQgb3IgbW9kaWZpZWQgdGhlIGZpbGUgY29udGVudHMubXNvZnR3YXJlQWdlbnShZG5hbWVmQ2xhdWRlcmFsbEFjdGlvbnNJbmNsdWRlZPUAAADIanVtYgAAAEBqdW1kY2JvcgARABCAAACqADibcRNjMnBhLmhhc2guZGF0YQAAAAAYYzJzaO2Kx6N/hI5Ie63tvhV0/ZEAAACAY2JvcqVjYWxnZnNoYTI1NmNwYWRMAAAAAAAAAAAAAAAAZGhhc2hYIC1BQDXjxZ4zNRbOzbs8NwgNV16hT+VYB+5i8SSNPz0CZG5hbWVuanVtYmYgbWFuaWZlc3RqZXhjbHVzaW9uc4GiZXN0YXJ0GTiXZmxlbmd0aBkeBAAAAj5qdW1iAAAAJ2p1bWRjMmNsABEAEIAAAKoAOJtxA2MycGEuY2xhaW0udjIAAAACD2Nib3KlY2FsZ2ZzaGEyNTZpc2lnbmF0dXJleE1zZWxmI2p1bWJmPS9jMnBhL3VybjpjMnBhOmE2ODA2ZTlmLTdhYzgtNDBhYS05NDI4LWNhMTk0OGQ2ZjdkMC9jMnBhLnNpZ25hdHVyZWppbnN0YW5jZUlEeCx4bXA6aWlkOjE2Njk4Njg4LWI1OGUtNGViYy04NjE2LTIwMGNkZjg5YjUwOHJjcmVhdGVkX2Fzc2VydGlvbnODomN1cmx4LXNlbGYjanVtYmY9YzJwYS5hc3NlcnRpb25zL2MycGEuaW5ncmVkaWVudC52M2RoYXNoWCBh27P8GPfIK/s4MkQ/e7cf0b1kbuZLn78ayUrvwGKK5aJjdXJseCpzZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmFjdGlvbnMudjJkaGFzaFggiiBQhyNtutaEtiTWsvSqb5c6wOMagKC/iQw/AhDFZiyiY3VybHgpc2VsZiNqdW1iZj1jMnBhLmFzc2VydGlvbnMvYzJwYS5oYXNoLmRhdGFkaGFzaFggfvoOv5FwMfWN2frAxzbjrLPDQ5/sKBnThI5cAFIECRh0Y2xhaW1fZ2VuZXJhdG9yX2luZm+jZG5hbWVvQW50aHJvcGljIEZpbGVzZ3ZlcnNpb25lMS4wLjBrc3BlY1ZlcnNpb25lMi40LjAAABA4anVtYgAAAChqdW1kYzJjcwARABCAAACqADibcQNjMnBhLnNpZ25hdHVyZQAAABAIY2JvctKEWQISogEmGCFZAgowggIGMIIBjaADAgECAhRA5aAK7sI50L64g/oGQgU9Z1UTADAKBggqhkjOPQQDAzBJMRcwFQYDVQQKEw5BbnRocm9waWMsIFBCQzEuMCwGA1UEAxMlQW50aHJvcGljIENvbnRlbnQgQ3JlZGVudGlhbHMgUm9vdCBDQTAeFw0yNjA4MDcxODQzNTZaFw0yODA4MDYxOTQzNTZaMEQxFzAVBgNVBAoTDkFudGhyb3BpYywgUEJDMSkwJwYDVQQDEyBBbnRocm9waWMgQ2xhdWRlIENvbnRlbnQgU2lnbmluZzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJh6CmvLUBgFFNU0vUKlOVtE6djd17L5SuwX0LemFisBM3dkd/3cyjxFA3Qo5S46fX0/ihY0VZ7mfb9KF703t5OjWDBWMA4GA1UdDwEB/wQEAwIHgDAVBgNVHSUEDjAMBgorBgEEAYPoXgIBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUzlHiBIFOZFsj+OPEz5o+nMHXXMIwCgYIKoZIzj0EAwMDZwAwZAIwMXMdFJ4BetLLVY7ORuE9noqbbAZOZn/aArXyTwFAZfKrPzxF2vPoJNf1+UCdg1XGAjBwX1zd9WGqYkqmL5SFqw1QySjr1zJfpJM9+1rdDwSPLMOPOjKuiXjoU/pUUeG9RwmhY3BhZFkNngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQPNq2OOrP2uHCiujDZPgqHMF2FAaTbHLYM7GqLVmgw5rMFSuX6NiflF/WEae6HSNbEmlBN8DjwOul4YyTH7vl3k= +│ +╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +space + stage file / function +enter + before/after +c + commit +U + undo commit +esc + close +AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTowMjExZGZjNS03ODMyLTQwOWMtYjQwMy01YWFhYjkzNDdiMTIAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaJt/dW+CNWT0c1pUmjC2OYMAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDpmZGU5MDY1Zi02YzJhLTQ2NzUtYWI3Zi0wODdlNjdkMjZhYmNscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNonbvEhPVNncNyxMz2w24rwwAAAZljYm9yomdhY3Rpb25zgqJmYWN0aW9ua2MycGEub3BlbmVkanBhcmFtZXRlcnOha2luZ3JlZGllbnRzgaJjdXJseC1zZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmluZ3JlZGllbnQudjNkaGFzaFgg+z1hwtAEx8nz9Eh4+uh0dbpg7sDYLi7c7GyNmCFLYMGkZmFjdGlvbngdY29tLmFudGhyb3BpYy5jbGF1ZGUucHJvdmlkZWRqcGFyYW1ldGVyc6F4H2NvbS5hbnRocm9waWMub3JpZ2luLWNvbmZpZGVuY2VndW5rbm93bmtkZXNjcmlwdGlvbnhmQ2xhdWRlIHByb3ZpZGVkIHRoaXMgZmlsZSBhdCB0aGUgcmVxdWVzdCBvZiBhIHVzZXIgYW5kIG1heSBoYXZlIGNyZWF0ZWQgb3IgbW9kaWZpZWQgdGhlIGZpbGUgY29udGVudHMubXNvZnR3YXJlQWdlbnShZG5hbWVmQ2xhdWRlcmFsbEFjdGlvbnNJbmNsdWRlZPUAAADIanVtYgAAAEBqdW1kY2JvcgARABCAAACqADibcRNjMnBhLmhhc2guZGF0YQAAAAAYYzJzaKS35m87b9Ro0CV4Sn9xVeIAAACAY2JvcqVjYWxnZnNoYTI1NmNwYWRMAAAAAAAAAAAAAAAAZGhhc2hYIAmoCPvj+g14sLGn4PHvCAzJupS+2495Te9ZOPmzeaWQZG5hbWVuanVtYmYgbWFuaWZlc3RqZXhjbHVzaW9uc4GiZXN0YXJ0GSkCZmxlbmd0aBkeBAAAAj5qdW1iAAAAJ2p1bWRjMmNsABEAEIAAAKoAOJtxA2MycGEuY2xhaW0udjIAAAACD2Nib3KlY2FsZ2ZzaGEyNTZpc2lnbmF0dXJleE1zZWxmI2p1bWJmPS9jMnBhL3VybjpjMnBhOjAyMTFkZmM1LTc4MzItNDA5Yy1iNDAzLTVhYWFiOTM0N2IxMi9jMnBhLnNpZ25hdHVyZWppbnN0YW5jZUlEeCx4bXA6aWlkOmZlZWVhMmIyLTQ5N2MtNDkyNS1iMzBmLWFlNzU0NmI1Y2MwZXJjcmVhdGVkX2Fzc2VydGlvbnODomN1cmx4LXNlbGYjanVtYmY9YzJwYS5hc3NlcnRpb25zL2MycGEuaW5ncmVkaWVudC52M2RoYXNoWCD7PWHC0ATHyfP0SHj66HR1umDuwNguLtzsbI2YIUtgwaJjdXJseCpzZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmFjdGlvbnMudjJkaGFzaFgg4AX7I2WYOCbrl5qMc07vibtX1xf+7Ru45UqeEzylxeWiY3VybHgpc2VsZiNqdW1iZj1jMnBhLmFzc2VydGlvbnMvYzJwYS5oYXNoLmRhdGFkaGFzaFggkZlk8N9w5EYousbINw5XfFXA/zcqbXIAaXJqgM7+XjZ0Y2xhaW1fZ2VuZXJhdG9yX2luZm+jZG5hbWVvQW50aHJvcGljIEZpbGVzZ3ZlcnNpb25lMS4wLjBrc3BlY1ZlcnNpb25lMi40LjAAABA4anVtYgAAAChqdW1kYzJjcwARABCAAACqADibcQNjMnBhLnNpZ25hdHVyZQAAABAIY2JvctKEWQISogEmGCFZAgowggIGMIIBjaADAgECAhRA5aAK7sI50L64g/oGQgU9Z1UTADAKBggqhkjOPQQDAzBJMRcwFQYDVQQKEw5BbnRocm9waWMsIFBCQzEuMCwGA1UEAxMlQW50aHJvcGljIENvbnRlbnQgQ3JlZGVudGlhbHMgUm9vdCBDQTAeFw0yNjA4MDcxODQzNTZaFw0yODA4MDYxOTQzNTZaMEQxFzAVBgNVBAoTDkFudGhyb3BpYywgUEJDMSkwJwYDVQQDEyBBbnRocm9waWMgQ2xhdWRlIENvbnRlbnQgU2lnbmluZzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJh6CmvLUBgFFNU0vUKlOVtE6djd17L5SuwX0LemFisBM3dkd/3cyjxFA3Qo5S46fX0/ihY0VZ7mfb9KF703t5OjWDBWMA4GA1UdDwEB/wQEAwIHgDAVBgNVHSUEDjAMBgorBgEEAYPoXgIBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUzlHiBIFOZFsj+OPEz5o+nMHXXMIwCgYIKoZIzj0EAwMDZwAwZAIwMXMdFJ4BetLLVY7ORuE9noqbbAZOZn/aArXyTwFAZfKrPzxF2vPoJNf1+UCdg1XGAjBwX1zd9WGqYkqmL5SFqw1QySjr1zJfpJM9+1rdDwSPLMOPOjKuiXjoU/pUUeG9RwmhY3BhZFkNngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQAAx71EKkGKmWYukCRCokLoYDktloDi1vamFcy9HGm9zNTzRnwilfElI0RNch8SGNUXTROdLmD3oNVDdChTXXOY= diff --git a/docs/images/tui-overview.svg b/docs/images/tui-overview.svg index 70eec0a..56bf530 100644 --- a/docs/images/tui-overview.svg +++ b/docs/images/tui-overview.svg @@ -9,169 +9,87 @@ · 9 changed 30 code files · 146 functions and types ? help -╭ files ─────────────────────────╮ -╭ - symbols -─────────────────────────╮╭ - map -─────────────────────────────────────────────────────╮ +╭ overview · any key to close ───────────────────────────────────────────────────────────────────────────────────────────────────╮ │ -▸ crates -╭ overview · any key to close ──────────────────────────────────────────────────────────────────────────────╮ -│ +tp · 30 code files (c 2, cpp 6, python 9, rust 13) · 146 functions and types · 10 tests · ≈7.4k tokens of source +│ │ -▸ -native -│ -tp · 30 code files (c 2, cpp 6, python 9, rust 13) · 146 functions and types · 10 tests · ≈7.4k tokens of -│ -│ +│ │ -▸ -py - ● -│ -source -│ -│ +areas: +│ │ -▸ -scripts -│ -│ -│ + crates/cli (3 code files) + — taskflow — a tiny command-line task tracker. +│ │ -AGENTS. -│ -areas: -│ -e task tr… -│ + crates/core (10 code files) + — Core library of taskflow: task model, pluggable storage and queries. +│ │ -Cargo.l -│ - crates/cli (3 code files) - — taskflow — a tiny command-line task tracker. -│ -k model, … -│ + native (8 code files) + — ≈ types Item, Queue, PriorityQueue, FifoQueue; functions crc32_buf, drain, crc32_buf, crc32_file +│ │ -Cargo.t -│ - crates/core (10 code files) - — Core library of taskflow: task model, pluggable storage and queries. -│ -│ + py (2 code files) +│ │ -README. -│ - native (8 code files) - — ≈ types Item, Queue, PriorityQueue, FifoQueue; functions crc32_buf, drain, -│ -│ + py/taskflow_report (7 code files) + — ≈ types Task, MarkdownFormatter, TextFormatter, App; functions load_tasks, summarize, +│ │ -TESTING -│ -crc32_buf, crc32_file -│ -│ +↪ by_tag, burndown +│ │ -│ - py (2 code files) -│ -│ +│ │ -│ - py/taskflow_report (7 code files) - — ≈ types Task, MarkdownFormatter, TextFormatter, App; functions -│ -│ +entry points: +│ │ -│ -load_tasks, summarize, by_tag, burndown -│ -│ + main taskflow::main crates/cli/src/main.rs:8 +│ │ -│ -│ -│ + main main native/main.cpp:8 +│ │ -│ -entry points: -│ -│ + main report::main py/taskflow_report/report.py:76 +│ │ -│ - main taskflow::main crates/cli/src/main.rs:8 -│ -│ + route list_tasks (ROUTE /tasks) py/taskflow_report/web.py:33 +│ │ -│ - main main native/main.cpp:8 -│ -│ + route summary (GET /summary) py/taskflow_report/web.py:38 +│ │ -│ - main report::main py/taskflow_report/report.py:76 -│ -│ + route web::stats (GET /stats) py/taskflow_report/web.py:43 +│ │ -│ - route list_tasks (ROUTE /tasks) py/taskflow_report/web.py:33 -│ -│ +│ │ -│ - route summary (GET /summary) py/taskflow_report/web.py:38 -│ -│ +standard library: pathlib 1 +│ │ -│ - route web::stats (GET /stats) py/taskflow_report/web.py:43 -│ -│ +│ │ -│ -│ -│ +layers (each uses only the ones below it): +│ │ -│ -layers (each uses only the ones below it): -│ -│ + top crates/cli uses → crates/core (29) +│ │ -│ - top crates/cli uses → crates/core (29) -│ -│ + foundation crates/core +│ │ -╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯ -│ + native +│ │ -│ -│ -││ -│ -╰────────────────────────────────╯ -╰──────────────────────────────────╯╰──────────────────────────────────────────────────────────╯ -ctrl-p - all commands -tab - pane -/ - search -s - changes -c - commit -B - branches -U - undo -o - overview -a - agent -q - quit -AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTozNGNiM2EyNi01YzJmLTQxOTAtOWY1ZC1lYzA5MmEyZmJmYTIAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaKSuX0Ew5kYDCA2KB0Uk4twAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDo0YjUwOGRjMi0xZmVjLTQ3NGItYWU2Ni0yNDk0ZGNjOTU2ODVscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNo+nUiHxT8mAP9Hvotxdh71wAAAZljYm9yomdhY3Rpb25zgqJmYWN0aW9ua2MycGEub3BlbmVkanBhcmFtZXRlcnOha2luZ3JlZGllbnRzgaJjdXJseC1zZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmluZ3JlZGllbnQudjNkaGFzaFggA+P1lHoT9QrVl+hWBOyNeOo37A73io+6FCSHNBq85NCkZmFjdGlvbngdY29tLmFudGhyb3BpYy5jbGF1ZGUucHJvdmlkZWRqcGFyYW1ldGVyc6F4H2NvbS5hbnRocm9waWMub3JpZ2luLWNvbmZpZGVuY2VndW5rbm93bmtkZXNjcmlwdGlvbnhmQ2xhdWRlIHByb3ZpZGVkIHRoaXMgZmlsZSBhdCB0aGUgcmVxdWVzdCBvZiBhIHVzZXIgYW5kIG1heSBoYXZlIGNyZWF0ZWQgb3IgbW9kaWZpZWQgdGhlIGZpbGUgY29udGVudHMubXNvZnR3YXJlQWdlbnShZG5hbWVmQ2xhdWRlcmFsbEFjdGlvbnNJbmNsdWRlZPUAAADIanVtYgAAAEBqdW1kY2JvcgARABCAAACqADibcRNjMnBhLmhhc2guZGF0YQAAAAAYYzJzaOau68PTvSZF1YYNLn6XEXMAAACAY2JvcqVjYWxnZnNoYTI1NmNwYWRMAAAAAAAAAAAAAAAAZGhhc2hYIDNRVj5rZLTqDjYLH1xh0E7kbKeYitDcQbPDTtGmXcCvZG5hbWVuanVtYmYgbWFuaWZlc3RqZXhjbHVzaW9uc4GiZXN0YXJ0GWDIZmxlbmd0aBkeBAAAAj5qdW1iAAAAJ2p1bWRjMmNsABEAEIAAAKoAOJtxA2MycGEuY2xhaW0udjIAAAACD2Nib3KlY2FsZ2ZzaGEyNTZpc2lnbmF0dXJleE1zZWxmI2p1bWJmPS9jMnBhL3VybjpjMnBhOjM0Y2IzYTI2LTVjMmYtNDE5MC05ZjVkLWVjMDkyYTJmYmZhMi9jMnBhLnNpZ25hdHVyZWppbnN0YW5jZUlEeCx4bXA6aWlkOmEyMDM3YTFmLWNhNzUtNDgzYi04ZDY4LTNkMTNlYmFiMGVlYnJjcmVhdGVkX2Fzc2VydGlvbnODomN1cmx4LXNlbGYjanVtYmY9YzJwYS5hc3NlcnRpb25zL2MycGEuaW5ncmVkaWVudC52M2RoYXNoWCAD4/WUehP1CtWX6FYE7I146jfsDveKj7oUJIc0Grzk0KJjdXJseCpzZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmFjdGlvbnMudjJkaGFzaFggR8a2jvqptPnEk6d9xV0UPd1FUigI9t4lQiPHjOLscNmiY3VybHgpc2VsZiNqdW1iZj1jMnBhLmFzc2VydGlvbnMvYzJwYS5oYXNoLmRhdGFkaGFzaFgg6UEVjZdiN3Pya5L9VU98N9pdQ1OxHYL1TYbZrbC6syd0Y2xhaW1fZ2VuZXJhdG9yX2luZm+jZG5hbWVvQW50aHJvcGljIEZpbGVzZ3ZlcnNpb25lMS4wLjBrc3BlY1ZlcnNpb25lMi40LjAAABA4anVtYgAAAChqdW1kYzJjcwARABCAAACqADibcQNjMnBhLnNpZ25hdHVyZQAAABAIY2JvctKEWQISogEmGCFZAgowggIGMIIBjaADAgECAhRA5aAK7sI50L64g/oGQgU9Z1UTADAKBggqhkjOPQQDAzBJMRcwFQYDVQQKEw5BbnRocm9waWMsIFBCQzEuMCwGA1UEAxMlQW50aHJvcGljIENvbnRlbnQgQ3JlZGVudGlhbHMgUm9vdCBDQTAeFw0yNjA4MDcxODQzNTZaFw0yODA4MDYxOTQzNTZaMEQxFzAVBgNVBAoTDkFudGhyb3BpYywgUEJDMSkwJwYDVQQDEyBBbnRocm9waWMgQ2xhdWRlIENvbnRlbnQgU2lnbmluZzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJh6CmvLUBgFFNU0vUKlOVtE6djd17L5SuwX0LemFisBM3dkd/3cyjxFA3Qo5S46fX0/ihY0VZ7mfb9KF703t5OjWDBWMA4GA1UdDwEB/wQEAwIHgDAVBgNVHSUEDjAMBgorBgEEAYPoXgIBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUzlHiBIFOZFsj+OPEz5o+nMHXXMIwCgYIKoZIzj0EAwMDZwAwZAIwMXMdFJ4BetLLVY7ORuE9noqbbAZOZn/aArXyTwFAZfKrPzxF2vPoJNf1+UCdg1XGAjBwX1zd9WGqYkqmL5SFqw1QySjr1zJfpJM9+1rdDwSPLMOPOjKuiXjoU/pUUeG9RwmhY3BhZFkNngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQHvoT2DF182cZufrM9LUJqYILYdl1dBrPR/BPjeHjitprGhi9L44VoamW/9dXri9J79riALwtxV+F39d4q8jsbo= + py +│ +╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +jk + scroll +pgup/pgdn + page +any other key + close +AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTo5ZTU2ZGRhNS0zNTUzLTQ1NDUtOTIxNi03MzJhNjQ3M2YzNjgAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaKkDDQMUwrJKA20OVEg5u4EAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDoxMmIzYjk2Yi01ZWM1LTQ0YWEtYTJkMS03YTdhMDA2ZmQ5YTVscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNowUSmpyxbtne8LivNwpSrmgAAAZljYm9yomdhY3Rpb25zgqJmYWN0aW9ua2MycGEub3BlbmVkanBhcmFtZXRlcnOha2luZ3JlZGllbnRzgaJjdXJseC1zZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmluZ3JlZGllbnQudjNkaGFzaFggU5aNUH/nDSJI3+87AL+Y+DXQncq8JScO8M4pIzVPjB2kZmFjdGlvbngdY29tLmFudGhyb3BpYy5jbGF1ZGUucHJvdmlkZWRqcGFyYW1ldGVyc6F4H2NvbS5hbnRocm9waWMub3JpZ2luLWNvbmZpZGVuY2VndW5rbm93bmtkZXNjcmlwdGlvbnhmQ2xhdWRlIHByb3ZpZGVkIHRoaXMgZmlsZSBhdCB0aGUgcmVxdWVzdCBvZiBhIHVzZXIgYW5kIG1heSBoYXZlIGNyZWF0ZWQgb3IgbW9kaWZpZWQgdGhlIGZpbGUgY29udGVudHMubXNvZnR3YXJlQWdlbnShZG5hbWVmQ2xhdWRlcmFsbEFjdGlvbnNJbmNsdWRlZPUAAADIanVtYgAAAEBqdW1kY2JvcgARABCAAACqADibcRNjMnBhLmhhc2guZGF0YQAAAAAYYzJzaBFwya76gpEpcM2T945/A/8AAACAY2JvcqVjYWxnZnNoYTI1NmNwYWRMAAAAAAAAAAAAAAAAZGhhc2hYICCL9vlyaQpK9o60BsVa3nrmx4JNGfTMgCcBuWcXAA2WZG5hbWVuanVtYmYgbWFuaWZlc3RqZXhjbHVzaW9uc4GiZXN0YXJ0GTkMZmxlbmd0aBkeBAAAAj5qdW1iAAAAJ2p1bWRjMmNsABEAEIAAAKoAOJtxA2MycGEuY2xhaW0udjIAAAACD2Nib3KlY2FsZ2ZzaGEyNTZpc2lnbmF0dXJleE1zZWxmI2p1bWJmPS9jMnBhL3VybjpjMnBhOjllNTZkZGE1LTM1NTMtNDU0NS05MjE2LTczMmE2NDczZjM2OC9jMnBhLnNpZ25hdHVyZWppbnN0YW5jZUlEeCx4bXA6aWlkOjU0ZjFjZWRlLTA3OWYtNDk2NS04NDFhLTQ0NGU2MzA3M2UxMnJjcmVhdGVkX2Fzc2VydGlvbnODomN1cmx4LXNlbGYjanVtYmY9YzJwYS5hc3NlcnRpb25zL2MycGEuaW5ncmVkaWVudC52M2RoYXNoWCBTlo1Qf+cNIkjf7zsAv5j4NdCdyrwlJw7wzikjNU+MHaJjdXJseCpzZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmFjdGlvbnMudjJkaGFzaFgg916tvM6kFCLArxEi+T30wiEmW8wMSDaqEyw0TCgvtG6iY3VybHgpc2VsZiNqdW1iZj1jMnBhLmFzc2VydGlvbnMvYzJwYS5oYXNoLmRhdGFkaGFzaFggviWLmA1G5g74KPkQ+C99eUf/Qqi0Hy3SHe604cKnvLF0Y2xhaW1fZ2VuZXJhdG9yX2luZm+jZG5hbWVvQW50aHJvcGljIEZpbGVzZ3ZlcnNpb25lMS4wLjBrc3BlY1ZlcnNpb25lMi40LjAAABA4anVtYgAAAChqdW1kYzJjcwARABCAAACqADibcQNjMnBhLnNpZ25hdHVyZQAAABAIY2JvctKEWQISogEmGCFZAgowggIGMIIBjaADAgECAhRA5aAK7sI50L64g/oGQgU9Z1UTADAKBggqhkjOPQQDAzBJMRcwFQYDVQQKEw5BbnRocm9waWMsIFBCQzEuMCwGA1UEAxMlQW50aHJvcGljIENvbnRlbnQgQ3JlZGVudGlhbHMgUm9vdCBDQTAeFw0yNjA4MDcxODQzNTZaFw0yODA4MDYxOTQzNTZaMEQxFzAVBgNVBAoTDkFudGhyb3BpYywgUEJDMSkwJwYDVQQDEyBBbnRocm9waWMgQ2xhdWRlIENvbnRlbnQgU2lnbmluZzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJh6CmvLUBgFFNU0vUKlOVtE6djd17L5SuwX0LemFisBM3dkd/3cyjxFA3Qo5S46fX0/ihY0VZ7mfb9KF703t5OjWDBWMA4GA1UdDwEB/wQEAwIHgDAVBgNVHSUEDjAMBgorBgEEAYPoXgIBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUzlHiBIFOZFsj+OPEz5o+nMHXXMIwCgYIKoZIzj0EAwMDZwAwZAIwMXMdFJ4BetLLVY7ORuE9noqbbAZOZn/aArXyTwFAZfKrPzxF2vPoJNf1+UCdg1XGAjBwX1zd9WGqYkqmL5SFqw1QySjr1zJfpJM9+1rdDwSPLMOPOjKuiXjoU/pUUeG9RwmhY3BhZFkNngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQLz731QVZ4RXLFnjhO8cnPFRvXqRa6TFGhSMGj34FCQAW5nUqnO1MamZ1i73x/gJtDTd01+WhqtK5mCdpej5wZQ= diff --git a/docs/images/tui-symbol.svg b/docs/images/tui-symbol.svg index 596c147..df0ca91 100644 --- a/docs/images/tui-symbol.svg +++ b/docs/images/tui-symbol.svg @@ -18,11 +18,11 @@ ──────────────────────────────────────────────────╮ │▾ crates - ● + • │ │ struct -FileStore +FileStore │ │fn FileStore::open @@ -32,29 +32,29 @@ cli │ │ - fn open +fn open │ │crates/core/src/storage/file.rs · lines 19–28 │ │ ▾ core - ● + • │ │ -fn -save +fn + save │ │ │ │ ▾ src - ● + • │ │ -fn -get +fn + get │ │ Open (or create) a task file. @@ -64,8 +64,8 @@ storage │ │ -fn -all +fn + all │ │ │ @@ -73,8 +73,8 @@ file.rs │ │ -fn -delete +fn + delete │ │ takes path @@ -84,8 +84,8 @@ memory.rs │ │ -fn -flush +fn + flush │ │ returns → Result<Self> @@ -94,10 +94,10 @@ mod.rs │ │ -fn -is_dirty +fn + is_dirty │ -│ signature pub fn open(path: impl AsRef<Path>) -> +│ signature pub fn open(path: impl AsRef<Path>) -> │ │ error.rs @@ -105,7 +105,8 @@ │ fn format_line │ -│Result<Self> +│ +↪ Result<Self> │ │ export.rs @@ -126,7 +127,7 @@ │ │ model.rs - ● + + │ │ │ @@ -173,15 +174,16 @@ │ │ │ -│ outside this repo: .as_ref, .into, .kind, .to_path_buf, +│ other outside calls: .as_ref, .into, .kind, │ │▸ py - ● + • │ │ │ -│Err, Ok, String::new, std::fs::read_to_string +│ +↪ .to_path_buf, Err, Ok, String::new, │ │▸ scripts @@ -189,15 +191,15 @@ │ │ │ +↪ std::fs::read_to_string │ │ AGENTS.md - ● + • │ │ │ │ -→ uses types 2 │ │ Cargo.lock @@ -205,8 +207,7 @@ │ │ │ - Result -error.rs:17 +→ uses types 2 │ │ Cargo.toml @@ -214,8 +215,8 @@ │ │ │ - FileStore -file.rs:11 + Result +error.rs:17 │ │ README.md @@ -223,81 +224,71 @@ │ │ │ + FileStore +file.rs:11 │ │ TESTING.md │ │ │ -│code +│ │ │ │ │ │ -│ 19 -pub -fn -open -(path: -impl -AsRef -< -Path ->) -> +│code │ │ │ │ │ -│ -Result -< -Self -> { +│ 19 +pub +fn +open +(path: +impl +AsRef +< +Path +>) -> │ │ │ │ │ -│ 20 -let - path = path. -as_ref -(). -to_path_buf -(); +│ +↪ +Result +< +Self +> { │ │ │ │ │ -│ 21 +│ 20 let - text = -match + path = path. +as_ref +(). +to_path_buf +(); │ ╰────────────────────────────────╯ ╰──────────────────────────────────╯ ╰──────────────────────────────────────────────────────────╯ -ctrl-p - all commands -tab - pane -/ - search -s - changes -c - commit -B - branches -U - undo -o - overview -a - agent -q - quit -AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTpkMWE5M2QxNi1mZGM2LTRhY2ItOTMxMy1iYjYwNTMzYjBkMWMAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaD34ELfMuNCMi6nDItscQ+sAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDpmOTM0ZjQyYS1jNzM0LTQ1ZmQtYWZiZC1iNWYxMGQwNTM4NGNscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNo+tOTMSsSzw5OiZO8b7tPDQAAAZljYm9yomdhY3Rpb25zgqJmYWN0aW9ua2MycGEub3BlbmVkanBhcmFtZXRlcnOha2luZ3JlZGllbnRzgaJjdXJseC1zZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmluZ3JlZGllbnQudjNkaGFzaFggoJ5IBjWm2Et+RvqRetCgf1LjqTgk8OM19zxzV7Ecp4ukZmFjdGlvbngdY29tLmFudGhyb3BpYy5jbGF1ZGUucHJvdmlkZWRqcGFyYW1ldGVyc6F4H2NvbS5hbnRocm9waWMub3JpZ2luLWNvbmZpZGVuY2VndW5rbm93bmtkZXNjcmlwdGlvbnhmQ2xhdWRlIHByb3ZpZGVkIHRoaXMgZmlsZSBhdCB0aGUgcmVxdWVzdCBvZiBhIHVzZXIgYW5kIG1heSBoYXZlIGNyZWF0ZWQgb3IgbW9kaWZpZWQgdGhlIGZpbGUgY29udGVudHMubXNvZnR3YXJlQWdlbnShZG5hbWVmQ2xhdWRlcmFsbEFjdGlvbnNJbmNsdWRlZPUAAADIanVtYgAAAEBqdW1kY2JvcgARABCAAACqADibcRNjMnBhLmhhc2guZGF0YQAAAAAYYzJzaJmmZZzPn0MrgLooPZkotgQAAACAY2JvcqVjYWxnZnNoYTI1NmNwYWRMAAAAAAAAAAAAAAAAZGhhc2hYIBFIZhigqjBXQZovuO7d0zMlRruAlOTs6ggD7AyX63nXZG5hbWVuanVtYmYgbWFuaWZlc3RqZXhjbHVzaW9uc4GiZXN0YXJ0GZrNZmxlbmd0aBkeBAAAAj5qdW1iAAAAJ2p1bWRjMmNsABEAEIAAAKoAOJtxA2MycGEuY2xhaW0udjIAAAACD2Nib3KlY2FsZ2ZzaGEyNTZpc2lnbmF0dXJleE1zZWxmI2p1bWJmPS9jMnBhL3VybjpjMnBhOmQxYTkzZDE2LWZkYzYtNGFjYi05MzEzLWJiNjA1MzNiMGQxYy9jMnBhLnNpZ25hdHVyZWppbnN0YW5jZUlEeCx4bXA6aWlkOmIyNTMwMWZjLWM3ZGEtNDdkZi1iNzM5LWNlZDBjN2QyNjkzNHJjcmVhdGVkX2Fzc2VydGlvbnODomN1cmx4LXNlbGYjanVtYmY9YzJwYS5hc3NlcnRpb25zL2MycGEuaW5ncmVkaWVudC52M2RoYXNoWCCgnkgGNabYS35G+pF60KB/UuOpOCTw4zX3PHNXsRyni6JjdXJseCpzZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmFjdGlvbnMudjJkaGFzaFggQu+cCKxICuta0U9Q1Wn7+GP8YL1W45DtT1hK2/S03YuiY3VybHgpc2VsZiNqdW1iZj1jMnBhLmFzc2VydGlvbnMvYzJwYS5oYXNoLmRhdGFkaGFzaFggYg/cMWvR61DrI78VWCVKPuvWMXuWVX71Gn9KRsFZ7vx0Y2xhaW1fZ2VuZXJhdG9yX2luZm+jZG5hbWVvQW50aHJvcGljIEZpbGVzZ3ZlcnNpb25lMS4wLjBrc3BlY1ZlcnNpb25lMi40LjAAABA4anVtYgAAAChqdW1kYzJjcwARABCAAACqADibcQNjMnBhLnNpZ25hdHVyZQAAABAIY2JvctKEWQISogEmGCFZAgowggIGMIIBjaADAgECAhRA5aAK7sI50L64g/oGQgU9Z1UTADAKBggqhkjOPQQDAzBJMRcwFQYDVQQKEw5BbnRocm9waWMsIFBCQzEuMCwGA1UEAxMlQW50aHJvcGljIENvbnRlbnQgQ3JlZGVudGlhbHMgUm9vdCBDQTAeFw0yNjA4MDcxODQzNTZaFw0yODA4MDYxOTQzNTZaMEQxFzAVBgNVBAoTDkFudGhyb3BpYywgUEJDMSkwJwYDVQQDEyBBbnRocm9waWMgQ2xhdWRlIENvbnRlbnQgU2lnbmluZzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJh6CmvLUBgFFNU0vUKlOVtE6djd17L5SuwX0LemFisBM3dkd/3cyjxFA3Qo5S46fX0/ihY0VZ7mfb9KF703t5OjWDBWMA4GA1UdDwEB/wQEAwIHgDAVBgNVHSUEDjAMBgorBgEEAYPoXgIBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUzlHiBIFOZFsj+OPEz5o+nMHXXMIwCgYIKoZIzj0EAwMDZwAwZAIwMXMdFJ4BetLLVY7ORuE9noqbbAZOZn/aArXyTwFAZfKrPzxF2vPoJNf1+UCdg1XGAjBwX1zd9WGqYkqmL5SFqw1QySjr1zJfpJM9+1rdDwSPLMOPOjKuiXjoU/pUUeG9RwmhY3BhZFkNngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQGlWu02tYFa8swz/QdIu9ArFUehGqmM4U3SmJoSXPF3rOCOE/U9vtJj0I4cXIBxrOsH8Mjz90u3d+wXPjTjaVqo= +enter + details +/ + search +s + changes +c + commit +ctrl-p + all +AAAWgmp1bWIAAAAeanVtZGMycGEAEQAQgAAAqgA4m3EDYzJwYQAAABZcanVtYgAAAEdqdW1kYzJtYQARABCAAACqADibcQN1cm46YzJwYTpkZGJhNTM0ZS02M2FjLTQ5ZWMtYWY4OS00MzlhNTQ5Y2M4ZmIAAAADl2p1bWIAAAApanVtZGMyYXMAEQAQgAAAqgA4m3EDYzJwYS5hc3NlcnRpb25zAAAAALxqdW1iAAAARGp1bWRjYm9yABEAEIAAAKoAOJtxE2MycGEuaW5ncmVkaWVudC52MwAAAAAYYzJzaPc4acqDElQRdD1SyOmRLsYAAABwY2JvcqNpZGM6Zm9ybWF0bWltYWdlL3N2Zyt4bWxqaW5zdGFuY2VJRHgseG1wOmlpZDoxMzI4N2I1Yy1kMTE0LTRjNzItOTJiYi04ZWJlNTFhYTQzODRscmVsYXRpb25zaGlwaHBhcmVudE9mAAAB4mp1bWIAAABBanVtZGNib3IAEQAQgAAAqgA4m3ETYzJwYS5hY3Rpb25zLnYyAAAAABhjMnNoXsoC6pTf9zm8cLpLGzLUmQAAAZljYm9yomdhY3Rpb25zgqJmYWN0aW9ua2MycGEub3BlbmVkanBhcmFtZXRlcnOha2luZ3JlZGllbnRzgaJjdXJseC1zZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmluZ3JlZGllbnQudjNkaGFzaFggR2noVzE27lpDeWr34UAvMrNS6F8Dnv4RtqzgoFCQvj2kZmFjdGlvbngdY29tLmFudGhyb3BpYy5jbGF1ZGUucHJvdmlkZWRqcGFyYW1ldGVyc6F4H2NvbS5hbnRocm9waWMub3JpZ2luLWNvbmZpZGVuY2VndW5rbm93bmtkZXNjcmlwdGlvbnhmQ2xhdWRlIHByb3ZpZGVkIHRoaXMgZmlsZSBhdCB0aGUgcmVxdWVzdCBvZiBhIHVzZXIgYW5kIG1heSBoYXZlIGNyZWF0ZWQgb3IgbW9kaWZpZWQgdGhlIGZpbGUgY29udGVudHMubXNvZnR3YXJlQWdlbnShZG5hbWVmQ2xhdWRlcmFsbEFjdGlvbnNJbmNsdWRlZPUAAADIanVtYgAAAEBqdW1kY2JvcgARABCAAACqADibcRNjMnBhLmhhc2guZGF0YQAAAAAYYzJzaIoTzhrERT5043btmlLCTxMAAACAY2JvcqVjYWxnZnNoYTI1NmNwYWRMAAAAAAAAAAAAAAAAZGhhc2hYIMGCSUPCvJ/pf08GRTqnv7XBntQegkrmsSWcnL4vElKAZG5hbWVuanVtYmYgbWFuaWZlc3RqZXhjbHVzaW9uc4GiZXN0YXJ0GZZWZmxlbmd0aBkeBAAAAj5qdW1iAAAAJ2p1bWRjMmNsABEAEIAAAKoAOJtxA2MycGEuY2xhaW0udjIAAAACD2Nib3KlY2FsZ2ZzaGEyNTZpc2lnbmF0dXJleE1zZWxmI2p1bWJmPS9jMnBhL3VybjpjMnBhOmRkYmE1MzRlLTYzYWMtNDllYy1hZjg5LTQzOWE1NDljYzhmYi9jMnBhLnNpZ25hdHVyZWppbnN0YW5jZUlEeCx4bXA6aWlkOjdlN2QyZmYwLWM2YjYtNDA3My05NjU2LTFmMjVmYmViN2JkN3JjcmVhdGVkX2Fzc2VydGlvbnODomN1cmx4LXNlbGYjanVtYmY9YzJwYS5hc3NlcnRpb25zL2MycGEuaW5ncmVkaWVudC52M2RoYXNoWCBHaehXMTbuWkN5avfhQC8ys1LoXwOe/hG2rOCgUJC+PaJjdXJseCpzZWxmI2p1bWJmPWMycGEuYXNzZXJ0aW9ucy9jMnBhLmFjdGlvbnMudjJkaGFzaFggPBY658gGWEQfyn3+Z8cEDL9BlqByx24PgjX+l8S1MLWiY3VybHgpc2VsZiNqdW1iZj1jMnBhLmFzc2VydGlvbnMvYzJwYS5oYXNoLmRhdGFkaGFzaFggA2H3Xkoju03v7k4xXSfLO/2GnsIRLqnQYc0iA8SfgK90Y2xhaW1fZ2VuZXJhdG9yX2luZm+jZG5hbWVvQW50aHJvcGljIEZpbGVzZ3ZlcnNpb25lMS4wLjBrc3BlY1ZlcnNpb25lMi40LjAAABA4anVtYgAAAChqdW1kYzJjcwARABCAAACqADibcQNjMnBhLnNpZ25hdHVyZQAAABAIY2JvctKEWQISogEmGCFZAgowggIGMIIBjaADAgECAhRA5aAK7sI50L64g/oGQgU9Z1UTADAKBggqhkjOPQQDAzBJMRcwFQYDVQQKEw5BbnRocm9waWMsIFBCQzEuMCwGA1UEAxMlQW50aHJvcGljIENvbnRlbnQgQ3JlZGVudGlhbHMgUm9vdCBDQTAeFw0yNjA4MDcxODQzNTZaFw0yODA4MDYxOTQzNTZaMEQxFzAVBgNVBAoTDkFudGhyb3BpYywgUEJDMSkwJwYDVQQDEyBBbnRocm9waWMgQ2xhdWRlIENvbnRlbnQgU2lnbmluZzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJh6CmvLUBgFFNU0vUKlOVtE6djd17L5SuwX0LemFisBM3dkd/3cyjxFA3Qo5S46fX0/ihY0VZ7mfb9KF703t5OjWDBWMA4GA1UdDwEB/wQEAwIHgDAVBgNVHSUEDjAMBgorBgEEAYPoXgIBMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUzlHiBIFOZFsj+OPEz5o+nMHXXMIwCgYIKoZIzj0EAwMDZwAwZAIwMXMdFJ4BetLLVY7ORuE9noqbbAZOZn/aArXyTwFAZfKrPzxF2vPoJNf1+UCdg1XGAjBwX1zd9WGqYkqmL5SFqw1QySjr1zJfpJM9+1rdDwSPLMOPOjKuiXjoU/pUUeG9RwmhY3BhZFkNngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPZYQA7OVn+IMKm8hWgUQuAZs0R8afeuSTKAzSUJTpWJDGnVHa8Cky1idKfo33sS2na7Dm8fDrFz4acvZptMb++2Nfc= diff --git a/docs/images/why.ru.svg b/docs/images/why.ru.svg new file mode 100644 index 0000000..365ca76 --- /dev/null +++ b/docs/images/why.ru.svg @@ -0,0 +1,34 @@ + +Доля подсаженных ошибок, где gitnext why называет виновную функцию первой: 18% по графу вызовов, 81% с картой покрытия + +Тест упал: стоит ли виновная функция первой в списке? +57 подсаженных ошибок в 6 проектах: в функции меняется один оператор, затем спрашиваем gitnext why <упавший тест> +только по графу вызовов +после gitnext learn-tests (один прогон тестов с покрытием) + +Python +click, sqlparse + +5% · 1 из 20 + +90% · 18 из 20 +Go +cobra, chi + +35% · 6 из 17 + +82% · 14 из 17 +Rust +semver, indexmap + +15% · 3 из 20 + +70% · 14 из 20 +Все шесть проектов + +18% · 10 из 57 + +81% · 46 из 57 +С картой why показывает то, что тест на деле запускал, ставит первым код, изменённый с тех пор, как тесты проходили, и сами изменённые строки. +Воспроизвести: python3 eval/why_rank.py --learn --variants static,default — таблицы в eval/results/why-rank*.md + diff --git a/docs/images/why.svg b/docs/images/why.svg new file mode 100644 index 0000000..180155f --- /dev/null +++ b/docs/images/why.svg @@ -0,0 +1,34 @@ + +Share of seeded bugs where gitnext why names the function at fault first: 18% from the call graph, 81% with the learned coverage map + +A test fails: is the function at fault first in the list? +57 seeded bugs in 6 projects: one operator changed inside a function, then gitnext why <failing test> is asked +from the call graph alone +after gitnext learn-tests (one test run with coverage) + +Python +click, sqlparse + +5% · 1 of 20 + +90% · 18 of 20 +Go +cobra, chi + +35% · 6 of 17 + +82% · 14 of 17 +Rust +semver, indexmap + +15% · 3 of 20 + +70% · 14 of 20 +All six projects + +18% · 10 of 57 + +81% · 46 of 57 +With the map, why lists what the test really ran, puts the code changed since the tests last passed on top, and shows the changed lines. +Reproduce: python3 eval/why_rank.py --learn --variants static,default — tables in eval/results/why-rank*.md + diff --git a/eval/agent.py b/eval/agent.py new file mode 100644 index 0000000..073d9fb --- /dev/null +++ b/eval/agent.py @@ -0,0 +1,656 @@ +#!/usr/bin/env python3 +"""A plain tool-calling agent on a local model (llama.cpp / any OpenAI-compatible +server), to measure what gitnext gives an agent — without loca or any other harness. + +Modes (tools the model gets): + base list_dir, read_file, grep, edit_file, run, finish + gitnext base + look, rename, replace_symbol, check (gitnext's own tools; `check` with a + test name tells why it fails); a failing command's long output comes back as its + digest (what failed, where, the message) + lite only look, replace, add_after, rename, check and finish — the short list of + gitnext's lite MCP profile (a small model chooses better among six tools than eleven) — + and the gate of `verify` + ctx base, and `gitnext context` output appended to the task + both gitnext tools + context + cmd no tool-calling API at all: the context is in the task and the model answers with + one shell command (or a short script) in a ```sh block, or `DONE: answer` — for + models that write tool calls as text; `gitnext` is on PATH + verify gitnext tools, and the run may end only when the work is checked: an answer given + without a look at the code, or a change that `gitnext check` does not pass, goes back + to the model (a small model stops after one step otherwise). Every mode with the + gitnext tools sends back an answer given before any tool was called + +Every run is watched by a loop guard (eval/guard.py): repeated calls, no progress, the same +error again and again, see-saw edits, repeated text, step and token budgets. A stopped run +leaves a hand-off note; with --escalate-host a stronger model gets the task and that note. + +Tasks are generated from the eval repos (eval/repos.json, set up by eval/run.py) +and checked by the project itself: + find "where is X defined" → the answer names the right file + callers "who calls X" → recall against the compiler's list + fix a seeded bug makes tests fail → the test suite passes again + rename "rename X to Y everywhere" → it compiles and no old name is left + + python3 eval/agent.py --host http://127.0.0.1:8080 --repos click,cobra \\ + --tasks find,callers,fix,rename --modes base,gitnext,lite --repeat 3 +`--repeat N` gives N task sets per repo (other functions, another bug), every mode on each. +Results: eval/results/agent-latest.json (+ .md; .trace.jsonl — every conversation). + +One task of your own, on any repository (a "task card" for a small model): + + python3 eval/agent.py --task card.json --mode cmd + card.json: {"repo": "/path/to/project", "prompt": "what to do", "accept": "gitnext check"} + +The run passes when the `accept` command exits 0 (default: `gitnext check`). Next to the card +it writes card.result.json (passed, steps, tokens, what the loop guard did, the hand-off note +if it was stopped) and card.patch (the change, as `git diff`). +""" +from __future__ import annotations + +import argparse +import json +import os +import random +import re +import subprocess +import time +import urllib.request +from pathlib import Path + +import run as ev # eval/run.py: repos, languages, compiler / test plumbing +from guard import Guard, compress, trim_repeats + +HERE = Path(__file__).resolve().parent +MAX_OUT = 6000 # chars of tool output shown to the model +DIGEST_FROM = 1200 # gitnext modes: a failing command's output longer than this comes back as its digest +CTX_CHARS = int(os.environ.get("AGENT_CTX_CHARS", "40000")) # ~ the model's context: older tool output is cut beyond it + + +# ---------------------------------------------------------------- tools + +def tool(name, desc, props, req): + return {"type": "function", "function": {"name": name, "description": desc, + "parameters": {"type": "object", "properties": props, "required": req}}} + + +S = {"type": "string"} +BASE_TOOLS = [ + tool("list_dir", "List files in a directory of the project.", {"path": S}, ["path"]), + tool("read_file", "Read a file (optionally lines start..end).", {"path": S, "start": {"type": "integer"}, "end": {"type": "integer"}}, ["path"]), + tool("grep", "Search the project for a regular expression; returns file:line: text.", {"pattern": S, "path": S}, ["pattern"]), + tool("edit_file", "Replace an exact piece of text in a file (old must occur once).", {"path": S, "old": S, "new": S}, ["path", "old", "new"]), + tool("run", "Run a shell command in the project directory (tests, build).", {"command": S}, ["command"]), + tool("finish", "Finish the task with the final answer.", {"answer": S}, ["answer"]), +] +GITNEXT_TOOLS = [ + tool("look", "gitnext: everything about a function, class, file or error in one call — its code, who calls it, what it calls, the tests that reach it and how to run them. Use this first.", {"what": S}, ["what"]), + tool("rename", "gitnext: rename a function/class everywhere (definition, calls, imports, tests, comments).", {"old": S, "new": S}, ["old", "new"]), + tool("replace_symbol", "gitnext: replace the whole code of one function/class by name, without reading the file.", {"symbol": S, "code": S}, ["symbol", "code"]), + tool("check", "gitnext: run the tests. No arguments: after a change — builds the project, runs the tests of what you changed, answers with a verdict. " + "With `test`: why that test fails — the failure in a few lines and the code to fix, the most likely culprit first.", {"test": S}, []), +] +# mode `lite`: these and nothing else — what gitnext's lite MCP profile gives a small model (plus `finish`) +LITE_TOOLS = [ + tool("look", "Look at code. what = a function or class name (shows its code, who calls it, its tests), a file or folder (lists what is in it), an error message, or words to find.", {"what": S}, ["what"]), + tool("replace", "Replace one whole function or class with new code. No need to read the file first.", {"symbol": S, "code": S}, ["symbol", "code"]), + tool("add_after", "Add new code (a new function) right after an existing function or class.", {"symbol": S, "code": S}, ["symbol", "code"]), + tool("rename", "Rename a function or class everywhere: definition, calls, imports, tests.", {"old": S, "new": S}, ["old", "new"]), + tool("check", "A test fails: call this first with test = its name — it runs the test and shows the failure and the code to fix. After your change: call it with no arguments — says ok or what failed.", {"test": S}, []), + tool("finish", "Finish the task with the final answer.", {"answer": S}, ["answer"]), +] + + +def digest(out: str) -> str | None: + """A long failing output through `gitnext digest`: what failed, where, the message — or None + when gitnext does not recognise it.""" + try: + d = subprocess.run([ev.GITNEXT, "digest"], input=out, cwd=".", capture_output=True, text=True, timeout=60).stdout + except (OSError, subprocess.SubprocessError): + return None + return d if d.strip() and not d.startswith(("not recognised", "no output")) else None + + +DEFINES = re.compile(r"^[ \t]*(?:(?:pub(?:\([a-z]+\))?|async|export|default|static|public|private|protected|final|override|unsafe|const)\s+)*" + r"(?:def|fn|func|function)\s+(?:\([^)]*\)\s*)?([A-Za-z_][\w]*)", re.M) +TEXT_CODE_MAX = 3 # times per run a function written in the answer is put in place + + +def code_as_text(text: str, root: Path) -> str | None: + """A small model finds the bug and writes the corrected function — in its answer, not as a + `replace` call. The function it wrote is put in place (when the project has a function of that + name, it is not a test, and the file still parses) and checked; the model gets the verdict. + The same idea as `text_calls`: what it meant is clear, only the form is wrong.""" + for block in re.findall(r"```[A-Za-z0-9_+-]*[ \t]*\n(.*?)```", text, re.S): + m = DEFINES.search(block) + if not m or block.count("\n") < 1: + continue + name = m.group(1) + if name.lower().startswith("test"): + continue + code = block[m.start():].rstrip() + "\n" + before = ev.sh("git diff", root)[1] + p = subprocess.run([ev.GITNEXT, "edit", "replace", name], input=code, cwd=root, capture_output=True, text=True) + if p.returncode != 0: + continue + where = (p.stdout.strip().split("\n") or [""])[0].removeprefix("ok ").strip() + if ev.sh("git diff", root)[1] == before: + # the function as it already is (or the same wrong fix again): a check would say what it said before + return (f"The function `{name}` you wrote is the same as the code already in the file ({where}): nothing changed, the test still fails. " + "One line of it is wrong. Find that line and write the whole function again with that line corrected.") + verdict = ev.gx(["check"], root, timeout=900)[1][-MAX_OUT:] + failed = "verdict: FAILED" in verdict + return (f"The function `{name}` you wrote was put in place ({where}). The check:\n{verdict}\n" + + ("It failed: write the whole corrected function again." if failed else "If the task is done, answer in one line.")) + return None + + +def call_tool(name: str, a: dict, root: Path, lang: str, short: bool = False) -> str: + """`short`: a failing command's long output is given as its digest (the gitnext modes).""" + def path(p): + q = (root / (p or ".")).resolve() + if root.resolve() not in q.parents and q != root.resolve(): + raise ValueError("path outside the project") + return q + try: + if name == "list_dir": + p = path(a.get("path")) + return "\n".join(sorted(x.name + ("/" if x.is_dir() else "") for x in p.iterdir() if not x.name.startswith(".") and x.name not in ("node_modules", "target", ".venv")))[:MAX_OUT] + if name == "read_file": + lines = path(a["path"]).read_text(errors="replace").split("\n") + s, e = int(a.get("start") or 1), int(a.get("end") or len(lines)) + return "\n".join(f"{i}\t{l}" for i, l in enumerate(lines[s - 1:e], s))[:MAX_OUT] + if name == "grep": + p = subprocess.run(["grep", "-rnE", "--exclude-dir=node_modules", "--exclude-dir=.venv", "--exclude-dir=target", "--exclude-dir=.gitnext", "--exclude-dir=.git", a["pattern"], str(path(a.get("path")))], + capture_output=True, text=True, errors="replace") + return p.stdout.replace(str(root) + "/", "")[:MAX_OUT] or "no matches" + if name == "edit_file": + f = path(a["path"]) + t = f.read_text(errors="replace") + if t.count(a["old"]) != 1: + return f"error: old text occurs {t.count(a['old'])} times (must be exactly once)" + f.write_text(t.replace(a["old"], a["new"])) + return "ok" + if name in ("run", "sh"): + # `gitnext` on PATH: in `cmd` mode the model calls it like any other command + # the project's own environment first (`pytest` of its .venv, `vitest` of its node_modules), as a developer has it + env = "".join(f"{root / d}:" for d in (".venv/bin", "node_modules/.bin") if (root / d).is_dir()) + code, out = ev.sh(f'PATH="{env}{Path(ev.GITNEXT).resolve().parent}:$PATH"; ' + a["command"], root, timeout=600) + if short and code != 0 and len(out) > DIGEST_FROM: + d = digest(out) + if d: + return f"exit {code}\n{d}(the whole output: {out.count(chr(10)) + 1} lines)" + return f"exit {code}\n{out[-MAX_OUT:]}" + if name == "look": + return ev.gx(["look", a["what"]], root)[1][:MAX_OUT] + if name == "rename": + return ev.gx(["rename", a["old"], a["new"], "--text"], root)[1][:MAX_OUT] + if name == "check": + test = (a.get("test") or "").strip() + return ev.gx(["check", test] if test else ["check"], root, timeout=900)[1][-MAX_OUT if not test else None:][:MAX_OUT] + if name in ("replace_symbol", "replace", "add_after"): + kind = "insert-after" if name == "add_after" else "replace" + p = subprocess.run([ev.GITNEXT, "edit", kind, a["symbol"]], input=a["code"], cwd=root, capture_output=True, text=True) + return (p.stdout + p.stderr)[:MAX_OUT] + except Exception as e: # the model sees the error and can try again + return f"error: {e}" + return f"unknown tool {name}" + + +# ---------------------------------------------------------------- model + +def chat(host: str, messages: list, tools: list, max_tokens: int) -> dict: + body = {"model": "local", "messages": messages, "temperature": 0.2, "max_tokens": max_tokens, + "repeat_penalty": 1.1, # llama.cpp: a small model loops on one line without it + "chat_template_kwargs": {"enable_thinking": False}} + if tools: + body["tools"] = tools + req = urllib.request.Request(f"{host}/v1/chat/completions", data=json.dumps(body).encode(), headers={"Content-Type": "application/json"}) + with urllib.request.urlopen(req, timeout=1800) as r: + return json.loads(r.read()) + + +def text_calls(content: str, names: set[str]) -> list[dict]: + """Tool calls a small model wrote as text instead of through the API: a fenced + ```json {"name": …, "arguments": {…}}```, `{…}`, or `look {"what": "x"}`. + Returned in the API's own shape, so the conversation continues as if it had used it.""" + dec = json.JSONDecoder() + found: list[tuple[str, dict]] = [] + i = content.find("{") + while i >= 0: + try: + obj, end = dec.raw_decode(content, i) + except ValueError: + i = content.find("{", i + 1) + continue + if isinstance(obj, dict): + inner = obj.get("tool_call") or obj.get("function_call") or obj.get("function") or obj + before = re.search(r"([A-Za-z_]\w*)\s*[(:]?\s*$", content[:i]) + if isinstance(inner, dict) and inner.get("name") in names: + args = inner.get("arguments", inner.get("parameters", {})) + if isinstance(args, str): + try: + args = json.loads(args) + except ValueError: + args = {} + found.append((inner["name"], args if isinstance(args, dict) else {})) + elif before and before.group(1) in names: # look {"what": "x"} + found.append((before.group(1), obj)) + i = content.find("{", end) + return [{"id": f"text{k}", "type": "function", "function": {"name": n, "arguments": json.dumps(a)}} for k, (n, a) in enumerate(found)] + + +SYSTEM = ("You are a coding agent working in a software project. Use the tools to inspect and change the code. " + "Be brief. When done, call finish with the answer. Do not modify tests unless asked.") +CMD_SYSTEM = ("You are a coding agent working in a software project. Answer with ONE shell command (or a short script) in a ```sh block " + "and nothing else; you will get its output back. Useful commands: `gitnext look ` (its code, who calls it, " + "its tests — in one call), `gitnext check ` (a test fails: the failure in a few lines and the code to look at), " + "`gitnext rename --text`, `gitnext check` (after a change: builds and runs the tests of what you changed), " + "cat, grep, sed -i. " + "When the task is done answer `DONE: `. Be brief. Do not modify tests unless asked.") +TOKEN_BUDGET = int(os.environ.get("AGENT_TOKEN_BUDGET", "0")) # prompt tokens per run, 0 = no limit +GITNEXT_MODES = ("gitnext", "both", "verify", "lite") # modes with the gitnext tools +LITE_SYSTEM = ("You are a coding agent working in a software project. You have five tools for the code: look (read: a function, a file, an error), " + "replace and add_after (change code), rename, check (a test fails: call it first with the test's name; after a change: with no arguments). " + "Use them, be brief, and call finish with the answer when done. Do not modify tests unless asked.") + + +class Gate: + """The run may end only when the work is checked. A small model stops after one step ("the bug + is in X") or answers from memory; the gate sends it back, each kind once: use a tool before + answering (and call a tool instead of writing its name); make the change you were asked for; + and, as long as files are changed, pass `gitnext check` (up to `CHECKS` times). Nothing here + knows the task or its answer. Modes `verify` and `lite` have the whole gate; the other modes + with the gitnext tools only its first part (`full=False`): 5 of the 5 runs lost in the + find/callers/rename measurement were answers given before any tool was called.""" + CHECKS = 3 + + def __init__(self, guard: Guard, check, full: bool = True): + self.guard, self.check, self.full = guard, check, full + self.start = guard.fingerprint() + self.said: dict[str, int] = {} + # the answer just sent back is to be taken out of the conversation: a small model that sees + # what it made up repeats it word for word (3 of 8 `fix` runs in lite) + self.drop = False + + def on_finish(self, tool_steps: int, text: str = "", tools: tuple = ()) -> str | None: + bare = text.strip(" `\n.()") + if bare in tools and self.said.get("bare", 0) < 2: + self.said["bare"] = self.said.get("bare", 0) + 1 + return f"`{bare}` is a tool, not an answer: call it with its arguments." + if tool_steps == 0 and "tool" not in self.said: + self.said["tool"] = 1 + self.drop = True + return "Your first step must be a tool call, not an answer: `check` with the name of the failing test if a test fails, otherwise `look`." + if not self.full: + return None + changed = self.guard.fingerprint() != self.start + if not changed and "nochange" not in self.said: + self.said["nochange"] = 1 + return ("No file was changed. If the task asks to change the code, make the change now with the tools; " + "if it only asks a question, repeat your answer.") + if changed and self.said.get("check", 0) < self.CHECKS: + out = self.check() + # only a build or a test that fails; "builds, but no test reaches the changed code" is not a failure + if "verdict: FAILED" in out: + self.said["check"] = self.said.get("check", 0) + 1 + return "The check of your change failed:\n" + out[-1500:] + "\nFix it, then finish." + return None + + +def command_of(content: str) -> str | None: + """The shell command of a `cmd`-mode answer: the first fenced block, or a `$ command` line.""" + m = re.search(r"```(?:sh|bash|shell|console|zsh)?[ \t]*\n(.*?)```", content, re.S) + if m: + return "\n".join(l[2:] if l.startswith("$ ") else l for l in m.group(1).strip().split("\n")) or None + m = re.search(r"^\$ (.+)$", content, re.M) + return m.group(1) if m else None + + +def agent(task: dict, mode: str, root: Path, lang: str, host: str, max_steps: int, deadline: float) -> dict: + cmd = mode == "cmd" + tools = [] if cmd else LITE_TOOLS if mode == "lite" else BASE_TOOLS + (GITNEXT_TOOLS if mode in GITNEXT_MODES else []) + prompt = task["prompt"] + if task.get("handoff"): # a weaker model gave up on this task: what it tried + prompt += "\n\nAn earlier attempt was stopped. Its notes:\n" + task["handoff"] + if mode in ("ctx", "both", "cmd"): + _, c = ev.gx(["context", task["prompt"]], root) + if c.strip(): + prompt += "\n\n" + c.strip() + msgs = [{"role": "system", "content": CMD_SYSTEM if cmd else LITE_SYSTEM if mode == "lite" else SYSTEM}, {"role": "user", "content": prompt}] + used = {"tokens_in": 0, "tokens_out": 0, "steps": 0, "tools": {}} + + def locate(err: str) -> str: # where gitnext thinks an error comes from + try: + return subprocess.run([ev.GITNEXT, "locate"], input=err, cwd=root, capture_output=True, text=True, timeout=60).stdout + except (OSError, subprocess.SubprocessError): + return "" + + guard = Guard(root, max_steps, TOKEN_BUDGET, locate=locate) + gate = Gate(guard, lambda: call_tool("check", {}, root, lang), full=mode in ("verify", "lite")) if mode in GITNEXT_MODES else None + names = tuple(t["function"]["name"] for t in tools) if tools else () + answer = "" + for _ in range(max_steps): + if time.time() > deadline: + used["timeout"] = True + break + compress(msgs, CTX_CHARS) + r = chat(host, msgs, tools, 1024) + u = r.get("usage", {}) + used["tokens_in"] += u.get("prompt_tokens", 0) + used["tokens_out"] += u.get("completion_tokens", 0) + m = r["choices"][0]["message"] + text, cut = trim_repeats(m.get("content") or "") + if cut: + guard.stats["trimmed"] += 1 + m = {**m, "content": text} + calls = m.get("tool_calls") or [] + done = None + if cmd: + done = re.search(r"^\s*DONE:\s*(.*)", text, re.S | re.M) + command = None if done else command_of(text) + calls = [{"id": "sh", "function": {"name": "sh", "arguments": json.dumps({"command": command})}}] if command else [] + elif not calls: + # the model wrote the call as text (the server's chat template did not parse it) + calls = text_calls(text, {t["function"]["name"] for t in tools}) + if calls: + used["text_calls"] = used.get("text_calls", 0) + len(calls) + m = {"role": "assistant", "content": "", "tool_calls": calls} + msgs.append({k: v for k, v in m.items() if k in ("role", "content") or (k == "tool_calls" and not cmd)}) + if not calls: + if cmd and not done: # neither a command nor an answer: say what is expected + used["steps"] += 1 + note = guard.end_step(used["steps"], used["tokens_in"]) + if guard.stop: + break + msgs.append({"role": "user", "content": "Answer with one command in a ```sh block, or `DONE: `." + (f"\n{note}" if note else "")}) + continue + answer = done.group(1).strip() if done else text + if mode in GITNEXT_MODES and used.get("text_code", 0) < TEXT_CODE_MAX: + # the corrected function is in the answer instead of a `replace` call: put it in place + applied = code_as_text(text, root) + if applied: + used["text_code"] = used.get("text_code", 0) + 1 + used["steps"] += 1 + guard.state = guard.fingerprint() + msgs.append({"role": "user", "content": applied}) + continue + back = gate.on_finish(used["steps"], text, names) if gate else None + if back is None: + break + if gate.drop: + gate.drop = False + msgs.pop() + msgs[1] = {**msgs[1], "content": msgs[1]["content"] + "\n\n" + back} + else: + msgs.append({"role": "user", "content": back}) + continue + used["steps"] += 1 + finished = False + for c in calls: + name = c["function"]["name"] + try: + a = json.loads(c["function"].get("arguments") or "{}") + except ValueError: + a = {} + used["tools"][name] = used["tools"].get(name, 0) + 1 + if name == "finish": + answer, finished = a.get("answer", ""), True + out = "ok" + else: + out = guard.before_call(used["steps"], name, a) + if out is None: + out = guard.after_call(used["steps"], name, a, call_tool(name, a, root, lang, short=cmd or mode in GITNEXT_MODES)) + msgs.append({"role": "user", "content": out} if cmd else {"role": "tool", "tool_call_id": c.get("id", name), "content": out}) + if finished: + back = gate.on_finish(used["steps"] - 1) if gate else None # the step that only calls `finish` is not a look at the code + if back is None: + break + msgs.append({"role": "user", "content": back}) + continue + note = guard.end_step(used["steps"], used["tokens_in"]) + if guard.stop: + break + if note: + msgs.append({"role": "user", "content": note}) + used["answer"] = answer[:500] + used["guard"] = {k: v for k, v in guard.stats.items() if v} + if gate and gate.said: + used["gate"] = gate.said + used["_msgs"] = msgs # the whole conversation, for the trace file + if guard.stop or (not answer and used["steps"] >= max_steps): + used["stopped"] = guard.stop or "steps" + used["handoff"] = guard.handoff(task["prompt"]) + return used + + +# ---------------------------------------------------------------- tasks + +def make_tasks(repo: dict, root: Path, kinds: list[str], seed: int) -> list[dict]: + syms = ev.symbols(root) + sample = ev.pick(syms, root, 6, seed) + rng = random.Random(seed) + tasks = [] + if "find" in kinds and sample: + s = sample[0] + tasks.append({"kind": "find", "target": s["qualified"], "prompt": f"In which file is the function `{s['name']}` defined? Answer with the file path.", "file": s["file"]}) + if "callers" in kinds and len(sample) > 1: + s = sample[1] + # the compiler's answer where the language has one (gitnext's own answer would favour its modes) + c = ev.check_callers(root, repo, syms, s) or {} + truth, judge = (c["truth"], "compiler") if c.get("truth") else (s["_callers"], "gitnext") + tasks.append({"kind": "callers", "target": s["qualified"], "truth_from": judge, + "prompt": f"Which functions or methods call `{s['name']}`? Answer with their names, one per line.", + "truth": sorted({q.rsplit("::", 1)[-1] for q in truth})}) + if "rename" in kinds and len(sample) > 2: + s = sample[2] + new = s["name"] + ("_v2" if "_" in s["name"] or s["name"].islower() else "V2") + tasks.append({"kind": "rename", "target": s["qualified"], + "prompt": f"Rename the function `{s['name']}` to `{new}` everywhere in the project (definition and every use). The project must still compile.", + "old": s["name"], "new": new}) + if "fix" in kinds: + bug = seed_bug(repo, root, syms, rng) + if bug: + tasks.append(bug) + return tasks + + +MUTATIONS = [(r"(?=!])<(?![<=])", "<="), (r" \+ 1\b", " - 1"), (r"(?])==(?!=)", "!="), (r"\btrue\b", "false"), (r"\bTrue\b", "False"), + (r"(?])!=(?!=)", "=="), (r" is not None\b", " is None"), (r" is None\b", " is not None"), (r"\bfalse\b", "true"), (r"\bFalse\b", "True"), + (r" - 1\b", " + 1"), (r" and ", " or "), (r" && ", " || ")] +MAX_SEED_RUNS = 30 # test-suite runs spent looking for a mutant that some test notices + + +BROKEN_BEFORE: dict[str, set] = {} # per project: the tests that fail on the untouched code (not ours to blame) + + +def seed_bug(repo: dict, root: Path, syms: list[dict], rng: random.Random) -> dict | None: + """Change one operator inside a non-test function so that some test that passed starts failing.""" + L = ev.LANG[repo["lang"]] + if str(root) not in BROKEN_BEFORE: + BROKEN_BEFORE[str(root)] = set(L["failed"](ev.sh(L["tests"], root, timeout=1800)[1], root)) + before = BROKEN_BEFORE[str(root)] + funcs = [s for s in syms if s["kind"] in ("function", "method") and not s.get("test") and 4 <= s["end_line"] - s["start_line"] <= 40 + and not s["file"].startswith(("examples/", "example/", "docs/", "benches/", "bench/"))] # rarely under test + rng.shuffle(funcs) + runs = 0 + for s in funcs: + if runs >= MAX_SEED_RUNS: + break + p = root / s["file"] + lines = p.read_text(errors="replace").split("\n") + tried = 0 + for ln in range(s["start_line"], s["end_line"]): + text = lines[ln] + if text.lstrip().startswith(("//", "#", "*")) or tried >= 2: + continue + for pat, rep in MUTATIONS: + if re.search(pat, text): + tried += 1 + runs += 1 + lines2 = list(lines) + lines2[ln] = re.sub(pat, rep, text, count=1) + p.write_text("\n".join(lines2)) + ccode, _ = ev.sh(L["compile"], root, timeout=900) + failed = set() + if ccode == 0 or repo["lang"] == "python": + _, tout = ev.sh(L["tests"], root, timeout=1800) + failed = set(L["failed"](tout, root)) - before + if failed: + patch = ev.sh("git diff", root)[1] + ev.restore(root) + name = sorted(failed)[0] + return {"kind": "fix", "target": s["qualified"], "patch": patch, "prompt": f"The test `{name}` fails. Find the bug in the code and fix it (do not change the tests).", "failing": sorted(failed)[:10]} + ev.restore(root) + break + return None + + +def check(task: dict, repo: dict, root: Path, res: dict) -> bool: + L = ev.LANG[repo["lang"]] + if task["kind"] == "find": + return task["file"] in res["answer"] or Path(task["file"]).name in res["answer"] + if task["kind"] == "callers": + got = set(re.findall(r"[A-Za-z_][\w]*", res["answer"])) + hit = len(set(task["truth"]) & got) + res["recall"] = hit / len(task["truth"]) + return res["recall"] >= 0.99 + if task["kind"] == "rename": + left = ev.sh(f"git grep -nw {task['old']} -- . ':!*.md' | head -3", root)[1].strip() + code, out = ev.sh(L["compile"], root, timeout=1200) + res["left"] = left[:200] + return code == 0 and not left and bool(ev.sh(f"git grep -nw {task['new']} | head -1", root)[1].strip()) + if task["kind"] == "fix": + code, _ = ev.sh(L["compile"], root, timeout=1200) + if code and repo["lang"] != "python": + return False + _, tout = ev.sh(L["tests"], root, timeout=1800) + return not L["failed"](tout, root) + return False + + +def trace_of(msgs: list) -> list: + """The conversation of one run, small enough to keep: long tool output is cut in the middle.""" + out = [] + for m in msgs: + text = m.get("content") or "" + if len(text) > 3000: + text = text[:2000] + f"\n… ({len(text) - 3000} characters cut) …\n" + text[-1000:] + row = {"role": m["role"], "content": text} + if m.get("tool_calls"): + row["calls"] = [f'{c["function"]["name"]} {c["function"].get("arguments", "")}'[:600] for c in m["tool_calls"]] + out.append(row) + return out + + +def run_card(card_path: Path, mode: str, host: str, steps: int, minutes: float, escalate_host: str) -> dict: + """One task from a card file: run the agent in the card's repository, judge by the card's + `accept` command, leave the result and the patch next to the card.""" + card = json.loads(card_path.read_text()) + root = Path(card["repo"]).expanduser().resolve() + accept = card.get("accept") or "gitnext check" + lang = card.get("lang", "") + ev.gx(["index"], root) + t0 = time.time() + res = agent({"prompt": card["prompt"]}, mode, root, lang, host, steps, t0 + minutes * 60) + judge = lambda: call_tool("run", {"command": accept}, root, lang) # noqa: E731 + verdict = judge() + res["passed"] = verdict.startswith("exit 0") + if not res["passed"] and escalate_host and res.get("stopped"): + up = agent({"prompt": card["prompt"], "handoff": res["handoff"]}, mode, root, lang, escalate_host, steps, time.time() + minutes * 60) + verdict = judge() + res["escalated"] = {"steps": up["steps"], "tokens_in": up["tokens_in"], "answer": up["answer"], "passed": verdict.startswith("exit 0")} + res["passed"] = res["escalated"]["passed"] + res.update({"mode": mode, "seconds": round(time.time() - t0), "accept": accept, "verdict": verdict[-1500:]}) + card_path.with_suffix(".trace.json").write_text(json.dumps(trace_of(res.pop("_msgs", [])), ensure_ascii=False, indent=1)) + patch = subprocess.run(["git", "diff", "HEAD"], cwd=root, capture_output=True, text=True, errors="replace").stdout + card_path.with_suffix(".patch").write_text(patch) + card_path.with_suffix(".result.json").write_text(json.dumps(res, ensure_ascii=False, indent=1)) + return res + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + ap.add_argument("--task", default="", help="a task card (JSON: repo, prompt, accept) instead of the generated eval tasks") + ap.add_argument("--mode", default="cmd", help="with --task: the mode to run it in") + ap.add_argument("--host", default="http://127.0.0.1:8080") + ap.add_argument("--repos", default="click,cobra") + ap.add_argument("--tasks", default="find,callers,fix,rename") + ap.add_argument("--learn", action="store_true", help="Python, Go and Rust projects: `gitnext learn-tests` on the untouched code before the `fix` tasks") + ap.add_argument("--modes", default="base,gitnext,lite") + ap.add_argument("--escalate-host", default="", help="a stronger model's server: a run the loop guard stopped is handed to it with the notes") + ap.add_argument("--repeat", type=int, default=1, help="task sets per repo: each takes other functions and another bug (seed, seed + 1, …)") + ap.add_argument("--steps", type=int, default=25) + ap.add_argument("--minutes", type=float, default=20, help="time limit per run") + ap.add_argument("--seed", type=int, default=11) + ap.add_argument("--out", default=str(HERE / "results" / "agent-latest.json")) + args = ap.parse_args() + if args.task: + res = run_card(Path(args.task), args.mode, args.host, args.steps, args.minutes, args.escalate_host) + print(f"{'✓ passed' if res['passed'] else '✗ failed'} · steps {res['steps']} · tokens {res['tokens_in']}/{res['tokens_out']} · {res['seconds']}s" + + (f" · guard {res['guard']}" if res.get("guard") else "") + (f" · stopped: {res['stopped']}" if res.get("stopped") else "") + (" · escalated" if res.get("escalated") else "")) + raise SystemExit(0 if res["passed"] else 1) + repos = [r for r in json.loads((HERE / "repos.json").read_text()) if r["name"] in args.repos.split(",")] + modes = args.modes.split(",") + rows = [] + for repo in repos: + root = ev.prepare(repo) + ev.gx(["init"], root, timeout=1800) + if args.learn and "fix" in args.tasks.split(",") and repo["lang"] in ("python", "go", "rust") and any(m in GITNEXT_MODES for m in modes): + # what a project does once while its tests pass: `gitnext why` then knows what each test + # really runs and which of that code changed since (the bug is put in after this) + if repo["lang"] == "python": + py = next((p for p in (".venv/bin/python", "venv/bin/python") if (root / p).exists()), "python3") + if subprocess.run([py, "-c", "import pytest_cov"], cwd=root, capture_output=True).returncode != 0: + subprocess.run([py, "-m", "pip", "install", "-q", "pytest-cov"], cwd=root, capture_output=True) + # the first line: the size of the map, or why there is none (Rust: `rustup component add llvm-tools-preview`) + print(f"{repo['name']}: " + (ev.gx(["learn-tests"], root, timeout=3600)[1].strip().splitlines() or ["learn-tests said nothing"])[0], flush=True) + elif (root / ".gitnext" / "tests.db").exists(): + (root / ".gitnext" / "tests.db").unlink() # a map left by another run would change what is measured + base = ev.sh("git rev-parse HEAD", root)[1].strip() + clean = lambda: (ev.sh(f"git reset -q --hard {base}", root), ev.restore(root)) # noqa: E731 + for rep in range(args.repeat): + clean() + tasks = make_tasks(repo, root, args.tasks.split(","), args.seed + rep) + for task in tasks: + for mode in modes: + clean() + if task["kind"] == "fix": + # the bug is a commit: `git diff` and `gitnext check` must not point at it + subprocess.run(["git", "apply"], input=task["patch"], text=True, cwd=root) + ev.sh("git -c user.name=eval -c user.email=eval@example.invalid -c commit.gpgsign=false commit -qam 'seeded bug'", root) + ev.gx(["index"], root) + t0 = time.time() + try: + res = agent(task, mode, root, repo["lang"], args.host, args.steps, t0 + args.minutes * 60) + res["passed"] = check(task, repo, root, res) + if res.get("stopped") and not res["passed"] and args.escalate_host: + # the small model got stuck: the stronger one continues from the files as they are, with its notes + up = agent({**task, "handoff": res["handoff"]}, mode, root, repo["lang"], args.escalate_host, args.steps, time.time() + args.minutes * 60) + res["escalated"] = {"steps": up["steps"], "tokens_in": up["tokens_in"], "answer": up["answer"], "passed": check(task, repo, root, up)} + res["passed"] = res["escalated"]["passed"] + except Exception as e: + res = {"passed": False, "error": str(e)[:300]} + res.update({"repo": repo["name"], "task": task["kind"], "target": task.get("target"), "mode": mode, "repeat": rep, "seconds": round(time.time() - t0)}) + with Path(args.out).with_suffix(".trace.jsonl").open("a") as f: + f.write(json.dumps({k: res.get(k) for k in ("repo", "task", "target", "mode", "repeat", "passed")} | {"messages": trace_of(res.pop("_msgs", []))}, ensure_ascii=False) + "\n") + rows.append(res) + print(f"{repo['name']:8} {task['kind']:8} {mode:8} {'✓' if res['passed'] else '✗'} steps {res.get('steps')} tok {res.get('tokens_in')}/{res.get('tokens_out')} {res['seconds']}s tools {res.get('tools')}" + + (f" code-as-text {res['text_code']}" if res.get("text_code") else "") + (f" guard {res['guard']}" if res.get("guard") else "") + (f" gate {res['gate']}" if res.get("gate") else "") + (f" stopped: {res['stopped']}" if res.get("stopped") else "") + (" escalated" if res.get("escalated") else ""), flush=True) + Path(args.out).parent.mkdir(exist_ok=True) + Path(args.out).write_text(json.dumps(rows, ensure_ascii=False, indent=1)) + clean() + # summary per mode + md = ["| mode | passed | median steps | tokens in (sum) | gitnext tool calls | calls written as text | code written as text | guard stepped in | stopped by guard | sent back by the gate | escalated |", "|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|"] + for mode in modes: + rs = [r for r in rows if r["mode"] == mode] + if not rs: + continue + steps = sorted(r.get("steps") or 0 for r in rs) + gcalls = sum(sum(v for k, v in (r.get("tools") or {}).items() if k in ("look", "rename", "replace_symbol", "replace", "add_after", "check")) for r in rs) + md.append(f"| {mode} | {sum(r['passed'] for r in rs)}/{len(rs)} | {steps[len(steps)//2]} | {sum(r.get('tokens_in') or 0 for r in rs)} | {gcalls} | {sum(r.get('text_calls') or 0 for r in rs)} | {sum(r.get('text_code') or 0 for r in rs)} | {sum(sum((r.get('guard') or {}).values()) for r in rs)} | {sum(1 for r in rs if r.get('stopped'))} | {sum(sum((r.get('gate') or {}).values()) for r in rs)} | {sum(1 for r in rs if r.get('escalated'))} |") + Path(args.out).with_suffix(".md").write_text("\n".join(md) + "\n") + print("\n".join(md)) + + +if __name__ == "__main__": + main() diff --git a/eval/baseline.json b/eval/baseline.json new file mode 100644 index 0000000..93a65e7 --- /dev/null +++ b/eval/baseline.json @@ -0,0 +1,644 @@ +{ + "n20-m8-seeds7,8,9": { + "repos": { + "cobra": { + "callers_recall": 1.0, + "callers_precision": 0.989, + "callers_checked": 45, + "blind_recall": 1.0, + "blind_checked": 31, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 0.913, + "rename_checked": 46, + "tests_recall": 0.89, + "tests_precision": 0.362, + "tests_top10_precision": 0.442, + "tests_top10_best": 0.785, + "tests_caught": 0.81, + "tests_checked": 21, + "look_vs_file": 0.071 + }, + "chi": { + "callers_recall": 1.0, + "callers_precision": 0.971, + "callers_checked": 26, + "blind_recall": 1.0, + "blind_checked": 9, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.943, + "rename_checked": 35, + "tests_recall": 0.665, + "tests_precision": 0.614, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.711, + "tests_caught": 0.875, + "tests_checked": 16, + "look_vs_file": 0.219 + }, + "click": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.902, + "rename_checked": 51, + "tests_recall": 0.31, + "tests_precision": 0.485, + "tests_top10_precision": 0.53, + "tests_top10_best": 0.634, + "tests_caught": 0.783, + "tests_checked": 23, + "look_vs_file": 0.08 + }, + "sqlparse": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.905, + "rename_checked": 42, + "tests_recall": 0.415, + "tests_precision": 0.592, + "tests_top10_precision": 0.52, + "tests_top10_best": 0.795, + "tests_caught": 0.85, + "tests_checked": 20, + "look_vs_file": 0.218 + }, + "zustand": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 1, + "blind_recall": 1.0, + "blind_checked": 1, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": 0.5, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_top10_best": 1.0, + "tests_caught": 1.0, + "tests_checked": 1, + "look_vs_file": 0.129 + }, + "yaml": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 38, + "blind_recall": 1.0, + "blind_checked": 33, + "common_recall": 0.65, + "common_precision": 1.0, + "common_recall_with_maybe": 0.9, + "common_checked": 10, + "rename_ok": 0.846, + "rename_checked": 39, + "tests_recall": 0.18, + "tests_precision": 0.308, + "tests_top10_precision": 0.319, + "tests_top10_best": 0.352, + "tests_caught": 0.381, + "tests_checked": 21, + "look_vs_file": 0.576 + }, + "jsoup": { + "callers_recall": 0.996, + "callers_precision": 0.996, + "callers_checked": 49, + "blind_recall": 0.966, + "blind_checked": 35, + "common_recall": 0.866, + "common_precision": 0.992, + "common_recall_with_maybe": 0.961, + "common_checked": 40, + "rename_ok": 0.959, + "rename_checked": 49, + "tests_recall": 0.264, + "tests_precision": 0.703, + "tests_top10_precision": 0.692, + "tests_top10_best": 0.773, + "tests_caught": 0.905, + "tests_checked": 21, + "look_vs_file": 0.166 + }, + "json-java": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 36, + "blind_recall": 1.0, + "blind_checked": 28, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 16, + "rename_ok": 0.973, + "rename_checked": 37, + "tests_recall": 0.703, + "tests_precision": 0.524, + "tests_top10_precision": 0.655, + "tests_top10_best": 0.823, + "tests_caught": 1.0, + "tests_checked": 22, + "look_vs_file": 0.101 + }, + "semver": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.15 + }, + "indexmap": { + "callers_recall": 0.991, + "callers_precision": 1.0, + "callers_checked": 32, + "blind_recall": 0.996, + "blind_checked": 21, + "common_recall": 0.784, + "common_precision": 0.992, + "common_recall_with_maybe": 1.0, + "common_checked": 29, + "rename_ok": 0.848, + "rename_checked": 33, + "tests_recall": 0.515, + "tests_precision": 0.402, + "tests_top10_precision": 0.402, + "tests_top10_best": 0.402, + "tests_caught": 0.737, + "tests_checked": 19, + "look_vs_file": 0.134 + } + }, + "thresholds": { + "cobra": { + "callers_recall": 0.03, + "callers_precision": 0.03, + "blind_recall": 0.04, + "common_recall": 1.0, + "common_recall_with_maybe": 1.0, + "common_precision": 1.0, + "rename_ok": 0.07, + "tests_recall": 0.1, + "tests_precision": 0.13, + "tests_top10_precision": 0.14, + "tests_caught": 0.15 + }, + "chi": { + "callers_recall": 0.04, + "callers_precision": 0.05, + "blind_recall": 0.12, + "common_recall": 0.2, + "common_recall_with_maybe": 0.1, + "common_precision": 0.15, + "rename_ok": 0.06, + "tests_recall": 0.15, + "tests_precision": 0.17, + "tests_top10_precision": 0.16, + "tests_caught": 0.13 + }, + "click": { + "rename_ok": 0.07, + "tests_recall": 0.13, + "tests_precision": 0.15, + "tests_top10_precision": 0.15, + "tests_caught": 0.14 + }, + "sqlparse": { + "rename_ok": 0.08, + "tests_recall": 0.14, + "tests_precision": 0.12, + "tests_top10_precision": 0.14, + "tests_caught": 0.13 + }, + "zustand": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "blind_recall": 1.0, + "rename_ok": 1.0, + "tests_recall": 1.0, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_caught": 1.0 + }, + "yaml": { + "callers_recall": 0.03, + "callers_precision": 0.03, + "blind_recall": 0.04, + "common_recall": 0.25, + "common_recall_with_maybe": 0.1, + "common_precision": 0.15, + "rename_ok": 0.09, + "tests_recall": 0.1, + "tests_precision": 0.15, + "tests_top10_precision": 0.15, + "tests_caught": 0.2 + }, + "jsoup": { + "callers_recall": 0.03, + "callers_precision": 0.03, + "blind_recall": 0.05, + "common_recall": 0.08, + "common_recall_with_maybe": 0.05, + "common_precision": 0.03, + "rename_ok": 0.06, + "tests_recall": 0.13, + "tests_precision": 0.14, + "tests_top10_precision": 0.14, + "tests_caught": 0.12 + }, + "json-java": { + "callers_recall": 0.03, + "callers_precision": 0.03, + "blind_recall": 0.04, + "common_recall": 0.07, + "common_recall_with_maybe": 0.07, + "common_precision": 0.07, + "rename_ok": 0.05, + "tests_recall": 0.15, + "tests_precision": 0.14, + "tests_top10_precision": 0.11, + "tests_caught": 0.05 + }, + "semver": { + "callers_recall": 0.2, + "callers_precision": 0.2, + "blind_recall": 0.2, + "common_recall": 0.5, + "common_recall_with_maybe": 0.5, + "common_precision": 0.5, + "rename_ok": 0.2, + "tests_recall": 0.34, + "tests_precision": 0.34, + "tests_top10_precision": 0.34, + "tests_caught": 0.34 + }, + "indexmap": { + "callers_recall": 0.04, + "callers_precision": 0.04, + "blind_recall": 0.05, + "common_recall": 0.12, + "common_recall_with_maybe": 0.04, + "common_precision": 0.05, + "rename_ok": 0.11, + "tests_recall": 0.14, + "tests_precision": 0.14, + "tests_top10_precision": 0.14, + "tests_caught": 0.16 + } + } + }, + "n8-m4-seeds7": { + "repos": { + "cobra": { + "callers_recall": 1.0, + "callers_precision": 0.969, + "callers_checked": 8, + "blind_recall": 1.0, + "blind_checked": 4, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 0.958, + "tests_precision": 0.219, + "tests_top10_precision": 0.275, + "tests_top10_best": 0.775, + "tests_caught": 0.5, + "tests_checked": 4, + "look_vs_file": 0.082 + }, + "chi": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 6, + "blind_recall": 1.0, + "blind_checked": 2, + "common_recall": 0.667, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 3, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 0.545, + "tests_precision": 0.75, + "tests_top10_precision": 0.75, + "tests_top10_best": 0.75, + "tests_caught": 0.75, + "tests_checked": 4, + "look_vs_file": 0.265 + }, + "click": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.875, + "rename_checked": 8, + "tests_recall": 0.176, + "tests_precision": 0.413, + "tests_top10_precision": 0.475, + "tests_top10_best": 0.625, + "tests_caught": 0.75, + "tests_checked": 4, + "look_vs_file": 0.134 + }, + "sqlparse": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 0.327, + "tests_precision": 0.464, + "tests_top10_precision": 0.425, + "tests_top10_best": 0.6, + "tests_caught": 0.75, + "tests_checked": 4, + "look_vs_file": 0.219 + }, + "zustand": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 1, + "blind_recall": 1.0, + "blind_checked": 1, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": 0.333, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_top10_best": 1.0, + "tests_caught": 1.0, + "tests_checked": 1, + "look_vs_file": 0.121 + }, + "yaml": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 8, + "blind_recall": 1.0, + "blind_checked": 6, + "common_recall": 0.714, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 7, + "rename_ok": 0.875, + "rename_checked": 8, + "tests_recall": 0.013, + "tests_precision": 0.125, + "tests_top10_precision": 0.125, + "tests_top10_best": 0.125, + "tests_caught": 0.25, + "tests_checked": 4, + "look_vs_file": 0.583 + }, + "jsoup": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 8, + "blind_recall": 1.0, + "blind_checked": 3, + "common_recall": 0.774, + "common_precision": 1.0, + "common_recall_with_maybe": 0.964, + "common_checked": 7, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 0.194, + "tests_precision": 0.712, + "tests_top10_precision": 0.625, + "tests_top10_best": 0.75, + "tests_caught": 0.75, + "tests_checked": 4, + "look_vs_file": 0.179 + }, + "json-java": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 8, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 6, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 1.0, + "tests_precision": 0.316, + "tests_top10_precision": 0.5, + "tests_top10_best": 0.675, + "tests_caught": 1.0, + "tests_checked": 4, + "look_vs_file": 0.081 + }, + "semver": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.15 + }, + "indexmap": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 7, + "blind_recall": 1.0, + "blind_checked": 2, + "common_recall": 0.833, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 6, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 0.5, + "tests_precision": 0.186, + "tests_top10_precision": 0.186, + "tests_top10_best": 0.186, + "tests_caught": 0.75, + "tests_checked": 4, + "look_vs_file": 0.066 + } + }, + "thresholds": { + "cobra": { + "callers_recall": 0.13, + "callers_precision": 0.13, + "blind_recall": 0.25, + "common_recall": 1.0, + "common_recall_with_maybe": 1.0, + "common_precision": 1.0, + "rename_ok": 0.13, + "tests_recall": 0.25, + "tests_precision": 0.25, + "tests_top10_precision": 0.28, + "tests_caught": 0.5 + }, + "chi": { + "callers_recall": 0.17, + "callers_precision": 0.17, + "blind_recall": 0.5, + "common_recall": 0.34, + "common_recall_with_maybe": 0.34, + "common_precision": 0.5, + "rename_ok": 0.13, + "tests_recall": 0.44, + "tests_precision": 0.25, + "tests_top10_precision": 0.25, + "tests_caught": 0.25 + }, + "click": { + "rename_ok": 0.19, + "tests_recall": 0.25, + "tests_precision": 0.31, + "tests_top10_precision": 0.28, + "tests_caught": 0.25 + }, + "sqlparse": { + "rename_ok": 0.13, + "tests_recall": 0.37, + "tests_precision": 0.3, + "tests_top10_precision": 0.3, + "tests_caught": 0.25 + }, + "zustand": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "blind_recall": 1.0, + "rename_ok": 1.0, + "tests_recall": 1.0, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_caught": 1.0 + }, + "yaml": { + "callers_recall": 0.13, + "callers_precision": 0.13, + "blind_recall": 0.17, + "common_recall": 0.29, + "common_recall_with_maybe": 0.15, + "common_precision": 0.2, + "rename_ok": 0.19, + "tests_recall": 0.25, + "tests_precision": 0.25, + "tests_top10_precision": 0.25, + "tests_caught": 0.25 + }, + "jsoup": { + "callers_recall": 0.13, + "callers_precision": 0.13, + "blind_recall": 0.34, + "common_recall": 0.22, + "common_recall_with_maybe": 0.15, + "common_precision": 0.17, + "rename_ok": 0.13, + "tests_recall": 0.25, + "tests_precision": 0.36, + "tests_top10_precision": 0.34, + "tests_caught": 0.38 + }, + "json-java": { + "callers_recall": 0.13, + "callers_precision": 0.13, + "blind_recall": 0.2, + "common_recall": 0.17, + "common_recall_with_maybe": 0.17, + "common_precision": 0.17, + "rename_ok": 0.13, + "tests_recall": 0.25, + "tests_precision": 0.3, + "tests_top10_precision": 0.25, + "tests_caught": 0.25 + }, + "semver": { + "callers_recall": 0.2, + "callers_precision": 0.2, + "blind_recall": 0.2, + "common_recall": 0.5, + "common_recall_with_maybe": 0.5, + "common_precision": 0.5, + "rename_ok": 0.2, + "tests_recall": 0.34, + "tests_precision": 0.34, + "tests_top10_precision": 0.34, + "tests_caught": 0.34 + }, + "indexmap": { + "callers_recall": 0.15, + "callers_precision": 0.15, + "blind_recall": 0.5, + "common_recall": 0.17, + "common_recall_with_maybe": 0.17, + "common_precision": 0.17, + "rename_ok": 0.13, + "tests_recall": 0.25, + "tests_precision": 0.25, + "tests_top10_precision": 0.25, + "tests_caught": 0.25 + } + } + } +} diff --git a/eval/guard.py b/eval/guard.py new file mode 100644 index 0000000..0b2c277 --- /dev/null +++ b/eval/guard.py @@ -0,0 +1,244 @@ +"""Loop protection for the agent loop (eval/agent.py). + +A small model gets stuck in ways a large one rarely does: it repeats the same call, +flips between two versions of a file, retries a fix that fails with the same error, or +fills its answer with one repeated line. Each of those burns the whole step budget and +ends in nothing. `Guard` watches the run and steps in: + + repeat the same call with the same arguments, nothing changed since → not run + again; the model gets the earlier result and is told to do something else + no progress N steps without new information or a change in the files → one nudge, + then stop + same error the same build / test error K times → a hint from `gitnext locate` at the + second, stop at the K-th + see-saw edit → undo → the same edit → the files go back to the last state where + the tests passed (or to the start) + repetition a repeated line or chunk in the model's text is cut (`trim_repeats`) + budget a soft limit ("wrap up") and a hard one, in steps and in tokens + history old tool output is replaced by a one-line digest (`compress`) + hand-off when the run is stopped: what was tried, what changed, the last error — + for a stronger model or a person (`handoff`) + +Nothing here needs a model: `python3 -m unittest eval/test_guard.py`. +""" + +from __future__ import annotations + +import hashlib +import json +import re +import subprocess +from pathlib import Path + +NO_PROGRESS_STEPS = 4 # steps without anything new before the nudge (and again before the stop) +SAME_ERROR_LIMIT = 3 # the same error this many times: stop +SOFT_SHARE = 0.7 # of the step / token budget: "wrap up" +CHANGING = {"edit_file", "rename", "replace_symbol", "run", "sh"} # tools that may change files +RUNNING = {"run", "sh"} # tools whose output starts with `exit N` +VERDICT = {"check"} # gitnext's own build + tests verdict + + +def _git(root: Path, *args: str, stdin: str | None = None) -> str: + try: + p = subprocess.run(["git", *args], cwd=root, input=stdin, capture_output=True, text=True, errors="replace", timeout=60) + return p.stdout + except (OSError, subprocess.SubprocessError): + return "" + + +def is_test_command(cmd: str) -> bool: + """Whether a shell command runs a test suite (its success is what "the code works" means).""" + return bool(re.search(r"\b(gitnext check|pytest|unittest|go test|cargo (nextest|test)|mvn\b.*\btest|gradlew?\b.*\btest|npm (run )?test|yarn test|pnpm test|vitest|jest|ctest|make (test|check))\b", cmd)) + + +def call_key(name: str, args: dict) -> str: + return name + " " + json.dumps(args, sort_keys=True, ensure_ascii=False) + + +def error_signature(out: str) -> str: + """What makes two failures "the same": the first error lines, without numbers and paths.""" + lines = [l.strip() for l in out.split("\n") if re.search(r"\b(error|Error|ERROR|FAILED|FAIL|panicked|Traceback|AssertionError|assert|undefined|cannot find|not found)\b", l)] + sig = [] + for l in lines[:3]: + l = re.sub(r"0x[0-9a-fA-F]+|\d+", "N", l) + l = re.sub(r"\s+", " ", l) + sig.append(l[:160]) + return " | ".join(sig) + + +def trim_repeats(text: str) -> tuple[str, bool]: + """Cut a model's answer where it starts repeating itself: the same line again and again, + or one chunk of text looped until the token limit.""" + cut = False + out: list[str] = [] + run = 0 + for line in text.split("\n"): + if out and line.strip() and line == out[-1]: + run += 1 + if run >= 2: # the third copy and on + cut = True + continue + else: + run = 0 + out.append(line) + text = "\n".join(out) + tail = text[-4000:] + m = re.search(r"(.{20,400}?)\1{3,}\s*$", tail, re.S) + if m: + text = text[: len(text) - len(tail) + m.start()] + m.group(1) + cut = True + return (text + "\n… (repetition cut)" if cut else text), cut + + +def compress(msgs: list, limit: int, keep_last: int = 2) -> None: + """Replace old tool output by one line (what was asked, how it began, how long it was) + until the conversation fits `limit` characters. The newest results stay whole.""" + size = lambda: sum(len(m.get("content") or "") + len(json.dumps(m.get("tool_calls") or "")) for m in msgs) + if size() <= limit: + return + asked = {} + for m in msgs: + for c in m.get("tool_calls") or []: + asked[c.get("id")] = f'{c["function"]["name"]} {c["function"].get("arguments", "")[:80]}' + outputs = [m for m in msgs if m["role"] == "tool" or (m["role"] == "user" and m.get("content", "").startswith("exit "))] + for m in outputs[: max(len(outputs) - keep_last, 0)]: + if size() <= limit: + return + text = m["content"] + if len(text) <= 300 or text.startswith("[old output"): + continue + first = next((l.strip() for l in text.split("\n") if l.strip()), "")[:160] + m["content"] = f"[old output{' of ' + asked[m['tool_call_id']] if m.get('tool_call_id') in asked else ''}: {first} … {text.count(chr(10)) + 1} lines]" + + +class Guard: + def __init__(self, root: Path, max_steps: int, token_budget: int = 0, locate=None): + self.root, self.max_steps, self.token_budget = root, max_steps, token_budget + self.locate = locate # error text → where gitnext thinks it comes from ("" if nothing) + self.calls: dict[str, tuple[int, str, str]] = {} # call → (step, state of the files then, its output) + self.outputs: set[str] = set() + self.state = self.fingerprint() + self.states = [self.state] # after every change of the files + self.green = self.snapshot() # the files when the tests last passed; at first — the start + self.green_is_start = True + self.swings = 0 + self.errors: dict[str, int] = {} + self.idle = 0 + self.nudged = False + self.soft_said = False + self.progress = False # anything new in the current step + self.stop: str | None = None # why the run must end + self.stats = {"repeats": 0, "no_progress": 0, "same_error": 0, "seesaw": 0, "trimmed": 0, "soft_budget": 0} + self.log: list[str] = [] # one line per distinct action, for the hand-off + self.last_error = "" + + # -------- the files + + def fingerprint(self) -> str: + return hashlib.sha1((_git(self.root, "status", "--porcelain") + _git(self.root, "diff", "HEAD")).encode()).hexdigest() + + def snapshot(self) -> str: + return _git(self.root, "diff", "HEAD", "--binary") + + def restore(self, patch: str) -> None: + _git(self.root, "checkout", "-q", "--", ".") + if patch.strip(): + _git(self.root, "apply", "--whitespace=nowarn", "-", stdin=patch) + + # -------- one call + + def before_call(self, step: int, name: str, args: dict) -> str | None: + """The text to give the model instead of running the call, or None to run it.""" + prev = self.calls.get(call_key(name, args)) + if name == "finish" or prev is None or prev[1] != self.state: + return None + self.stats["repeats"] += 1 + return (f"Not run again: you made this exact call at step {prev[0]} and the files are exactly as they were then. It returned:\n" + f"{prev[2][:600]}\nDo something different: look at another function or file, make an edit, or finish with what you know.") + + def after_call(self, step: int, name: str, args: dict, out: str) -> str: + """Record the result; returns the output, with a note when the guard stepped in.""" + key = call_key(name, args) + if key not in self.calls: + self.log.append(f"step {step}: {key[:140]}") + before = self.state + h = hashlib.sha1(out.encode()).hexdigest() + if h not in self.outputs: + self.outputs.add(h) + self.progress = True + if name in CHANGING: + fp = self.fingerprint() + if fp != self.state: + self.progress = True + self.state = fp + if len(self.states) >= 2 and fp == self.states[-2]: + self.swings += 1 + self.states.append(fp) + if self.swings >= 2: # A → B → A → B: back to solid ground + self.restore(self.green) + self.state = self.fingerprint() + self.states, self.swings = [self.state], 0 + self.stats["seesaw"] += 1 + where = "the start of the task" if self.green_is_start else "the last state where the tests passed" + out += (f"\n\nNOTE: you keep switching between the same two versions of the code. The files were put back to {where}. " + "Neither version works — try a different change.") + self.calls[key] = (step, before, out) + if name in VERDICT: # `gitnext check`: its verdict is the tests' word + # "builds, but no test reaches the changed code" is neither a pass nor an error + out = ("exit 0\n" if "verdict: ok" in out else "exit 1\n" if "verdict: FAILED" in out else "") + out + if name in RUNNING or name in VERDICT: + code = re.match(r"exit (-?\d+)", out) + if code and code.group(1) == "0": + if name in VERDICT or is_test_command(args.get("command", "")): + self.green, self.green_is_start = self.snapshot(), False + elif code: + sig = error_signature(out) + if sig: + self.last_error = sig + n = self.errors[sig] = self.errors.get(sig, 0) + 1 + if n == 2: + self.stats["same_error"] += 1 + hint = (self.locate(out[-2000:]) if self.locate else "").strip() + out += "\n\nNOTE: this is the same error as before — the last change did not fix it." + (f" gitnext points at:\n{hint[:800]}" if hint else " Read the error again and look at the code it names.") + elif n >= SAME_ERROR_LIMIT: + self.stats["same_error"] += 1 + self.stop = "same_error" + return out + + # -------- one step + + def end_step(self, step: int, tokens: int) -> str | None: + """Call after every model turn. Returns a message to add to the conversation, if any; + sets `stop` when the run must end.""" + idle, self.progress = not self.progress, False + self.idle = self.idle + 1 if idle else 0 + if self.token_budget and tokens >= self.token_budget: + self.stop = self.stop or "budget" + return None + if self.idle >= NO_PROGRESS_STEPS: + self.stats["no_progress"] += 1 + self.idle = 0 + if self.nudged: + self.stop = self.stop or "no_progress" + return None + self.nudged = True + return (f"The last {NO_PROGRESS_STEPS} steps brought nothing new and changed nothing. Stop repeating them. " + "Either finish now with what you know, or take a step you have not taken yet.") + if not self.soft_said and (step >= SOFT_SHARE * self.max_steps or (self.token_budget and tokens >= SOFT_SHARE * self.token_budget)): + self.soft_said = True + self.stats["soft_budget"] = 1 + return f"You have used {step} of {self.max_steps} steps. Wrap up: make the final change if one is left, then finish with your answer." + return None + + # -------- when it is over + + def handoff(self, task: str) -> str: + """What a stronger model or a person needs to pick the task up.""" + changed = _git(self.root, "diff", "HEAD", "--stat").strip() + return "\n".join([ + f"Task: {task}", + f"Stopped: {self.stop or 'ran out of steps'}.", + "Tried (distinct actions):", *[f" {l}" for l in self.log[-15:]], + f"Files changed so far:\n{changed}" if changed else "No file was changed.", + f"Last error: {self.last_error}" if self.last_error else "No failing command was seen.", + ]) diff --git a/eval/learn_tests.py b/eval/learn_tests.py new file mode 100644 index 0000000..8fb6b44 --- /dev/null +++ b/eval/learn_tests.py @@ -0,0 +1,371 @@ +"""learn-tests prototype (Python, click): does a per-test coverage map find the tests that fail better than +`gitnext tests-for`, and what does it cost? + +One pytest run with coverage per test (pytest-cov, `--cov-context=test`) gives "test -> lines it ran"; +gitnext's function bounds turn that into "function -> tests that run it". Ground truth is the eval's: the tests +that fail when the function raises on entry (`run.failing_tests`). Two truths: the eval's (it keeps the last +400 lines of pytest output, so a function that breaks hundreds of tests loses some) and the full one. + +Two samples: `run.pick` (functions the call graph already finds callers for, as in the eval) and a random one +without that condition: coverage is meant for the functions the graph does not see. + + GITNEXT=$PWD/target/release/gitnext python3 eval/learn_tests.py [--n 20] [--n2 16] [--seed 7] [--repeat 3] +""" +from __future__ import annotations + +import argparse +import json +import random +import re +import sqlite3 +import statistics +import sys +import time +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).parent)) +import run # noqa: E402 the eval: same checkout, sample, ground truth and metrics + +TOP = run.TOP +TESTS = ".venv/bin/python -m pytest -q -p no:cacheprovider -x --maxfail=10000" # the eval's run, without the tail +# the full truth: every FAILED / ERROR line, and a test module that does not import (the function runs at +# import and raises) does not stop the whole run — with the eval's command it does, and "no test fails" +FULL = TESTS + " -rfE --tb=no --continue-on-collection-errors 2>&1" +COLLECT = "collect:" # marks a test file that failed to import; such files are counted, not scored + + +def full_failed(out: str) -> set[str]: + return run.py_failed(out) | {COLLECT + m.group(1) for m in re.finditer(r"^ERROR (\S+\.py) - ", out, re.M)} + + +def lines_of(numbits: bytes) -> set[int]: + """coverage.py numbits: bit i of byte j is line 8*j + i.""" + return {j * 8 + i for j, b in enumerate(numbits) if b for i in range(8) if b >> i & 1} + + +def test_name(ctx: str) -> str: + """`tests/test_x.py::TestA::test_b[1]|run` (pytest-cov) or `test_x.TestA.test_b` (coverage.py + test_function) -> `test_b`: the name `run.py_failed` gives a failing test.""" + c = ctx.split("|")[0].split("[")[0] + return c.rsplit("::", 1)[-1] if "::" in c else c.rsplit(".", 1)[-1] + + +def coverage_run(root: Path, out: Path, mode: str) -> float: + """One test run with coverage per test; returns seconds. mode: `pytest-cov` (setup/run/teardown of each + test by node id) or `test_function` (coverage.py's own switch: it changes the label only when the next + test function starts, so fixture setup is booked to the previous test).""" + rc = out.with_suffix(".rc") + data = out.resolve() + data.unlink(missing_ok=True) + if mode == "pytest-cov": + rc.write_text(f"[run]\nsource = src\ndata_file = {data}\n") + cmd = f"{TESTS} --cov --cov-config={rc} --cov-context=test --cov-report=" + else: + rc.write_text(f"[run]\nsource = src\ndata_file = {data}\ndynamic_context = test_function\n") + cmd = TESTS.replace(".venv/bin/python -m pytest", f".venv/bin/python -m coverage run --rcfile={rc} -m pytest") + t = time.time() + _, o = run.sh(cmd + " >/dev/null 2>&1; echo $?", root, timeout=3600) + secs = time.time() - t + if not data.exists(): + raise RuntimeError(f"no coverage data ({mode}): {o[-300:]}") + return secs + + +def read_coverage(root: Path, data: Path) -> dict[str, dict[int, set[int]]]: + """file (relative) -> context -> lines.""" + db = sqlite3.connect(data) + files = {i: str(Path(p).resolve().relative_to(root.resolve())) for i, p in db.execute("select id, path from file")} + ctxs = dict(db.execute("select id, context from context")) + out: dict[str, dict[int, set[int]]] = {} + for f, c, bits in db.execute("select file_id, context_id, numbits from line_bits"): + out.setdefault(files[f], {}).setdefault(ctxs[c], set()).update(lines_of(bits)) + db.close() + return out + + +def body_lines(root: Path, syms: list[dict]) -> dict[str, set[int]]: + """qualified -> lines of its body that run only when it is called: from the line after the `:` to the + end, minus the bodies of functions nested in it (they run when *those* are called). The `def` line and + decorators run at import and say nothing.""" + fns = [s for s in syms if s["kind"] in ("function", "method") and s["file"].endswith(".py")] + starts = {s["qualified"]: run.body_start(root, s, "python") for s in fns} + by_file: dict[str, list[dict]] = {} + for s in fns: + by_file.setdefault(s["file"], []).append(s) + out = {} + for s in fns: + b = starts[s["qualified"]] + if not b: + continue + lines = set(range(b, s["end_line"] + 1)) + for o in by_file[s["file"]]: + ob = starts[o["qualified"]] + if o is not s and ob and s["start_line"] < o["start_line"] and o["end_line"] <= s["end_line"]: + lines -= set(range(ob, o["end_line"] + 1)) + out[s["qualified"]] = lines + return out + + +def build_map(cov: dict, bodies: dict[str, set[int]], syms: list[dict]) -> tuple[dict[str, set[str]], dict[str, int], dict]: + """(function -> test contexts that run its body, context -> how many functions it runs, stats).""" + file_of = {s["qualified"]: s["file"] for s in syms} + fmap: dict[str, set[str]] = {} + width: dict[str, int] = {} + import_only = outside = never = 0 + for q, lines in bodies.items(): + per = cov.get(file_of[q], {}) + hit = {c.split("|")[0] for c, ls in per.items() if c and ls & lines} # one test: setup + call + teardown + ran_outside = bool(per.get("", set()) & lines) + outside += ran_outside # ran outside any test: import or collection time + import_only += ran_outside and not hit + never += not hit and not ran_outside + if hit: + fmap[q] = hit + for c in hit: + width[c] = width.get(c, 0) + 1 + return fmap, width, {"functions_run_outside_tests": outside, "functions_run_outside_tests_only": import_only, + "functions_never_run": never} + + +def cov_order(q: str, fmap, width, file_of) -> list[str]: + """Tests that run `q`, narrowest first (fewest functions run), then the test file named after the module.""" + mod = Path(file_of[q]).stem.lstrip("_") + best: dict[str, tuple] = {} + for c in fmap.get(q, ()): + n = test_name(c) + key = (width[c], 0 if f"test_{mod}" in c.split("::")[0] else 1, n) + if n not in best or key < best[n]: + best[n] = key + return sorted(best, key=best.get) + + +def union(gx: list[str], cov: list[str]) -> list[str]: + """Both agree first (in tests-for order), then the rest of coverage, then the rest of tests-for.""" + c = set(cov) + both = [t for t in gx if t in c] + seen = set(both) + return both + [t for t in cov if t not in seen] + [t for t in gx if t not in c] + + +def score(order: list[str], truth: set[str]) -> dict: + """The eval's metrics (run.check_tests).""" + pred = set(order) + tp = len(pred & truth) + top = order[:TOP] + hits = sum(1 for x in top if x in truth) + return {"recall": tp / len(truth), "precision": tp / len(pred) if pred else 0.0, "predicted": len(pred), + "top_hits": hits, "top_n": len(top), "top_precision": hits / len(top) if top else 0.0, + "caught": 1.0 if hits else 0.0} + + +def pick_random(syms: list[dict], root: Path, n: int, seed: int, skip: set[str]) -> list[dict]: + """Functions of the library (src/) with a body of 3+ lines, no condition on callers.""" + c = [s for s in syms if s["kind"] in ("function", "method") and s["file"].startswith("src/") + and not s.get("decl") and s["qualified"] not in skip + and (b := run.body_start(root, s, "python")) and s["end_line"] - b + 1 >= 3] + random.Random(seed).shuffle(c) + return c[:n] + + +def truths(root: Path, repo: dict, s: dict, base_eval: set[str], base_full: set[str]) -> tuple[dict, dict]: + key = f"{repo['name']}@{repo['commit'][:12]}" + ev = run.cached(f"{key}:tests:{s['qualified']}", lambda: run.failing_tests(root, repo, s, base_eval)) + py = run.LANG["python"] + saved = py["tests"], py["failed"] + py["tests"], py["failed"] = FULL, lambda out, root: full_failed(out) + try: + full = run.cached(f"{key}:tests-full2:{s['qualified']}", lambda: run.failing_tests(root, repo, s, base_full)) + finally: + py["tests"], py["failed"] = saved + return ev, full + + +def mean(v): + return round(statistics.mean(v), 3) if v else None + + +# gitnext: `tests-for` from the call graph; coverage / union: this script's own map; +# learned: `tests-for` again after `gitnext learn-tests` — the product, not the prototype +SOURCES = ("gitnext", "coverage", "union", "learned") + + +def summarize(rows: list[dict], truth: str) -> dict: + out = {} + rs = [r for r in rows if r.get(truth)] + for src in SOURCES: + if not all(src in r[truth] for r in rs): + continue + out[src] = {m: mean([r[truth][src][m] for r in rs]) for m in ("recall", "precision", "top_precision", "caught")} + out["functions"] = len(rs) + return out + + +def pct(x): + return "—" if x is None else f"{round(100 * x)}%" + + +def render(res: dict) -> str: + L = ["# learn-tests на click: покрытие по тестам против `tests-for`", + f"click {res['commit']}, gitnext {res['gitnext_commit']}, seed {res['seed']}. " + "Метрики как в eval: полнота, точность, доля падающих в первых 10, поймано ли первыми 10.", ""] + for truth, title in (("full", "полная истина (основная)"), ("eval", "истина eval (`tail -400`)")): + L += [f"## Итог: {title}", "", "| выборка | функций | источник | полнота | точность | из 10 падают | поймано |", + "|---|---:|---|---:|---:|---:|---:|"] + for g, gname in (("pick", "pick (есть вызывающие)"), ("random", "случайные"), ("all", "все")): + s = res["summary"][g][truth] + for src in [x for x in SOURCES if x in s]: + m = s[src] + L.append(f"| {gname} | {s['functions']} | {src} | {pct(m['recall'])} | {pct(m['precision'])} | " + f"{pct(m['top_precision'])} | {pct(m['caught'])} |") + L.append("") + L += ["## По функциям (полная истина)", "", + "| выборка | функция | падают (eval) | gitnext: полн / из 10 | покрытие: полн / точн / из 10 | объединение: полн / из 10 |", + "|---|---|---:|---|---|---|"] + for r in res["functions"]: + if not r.get("full"): + L.append(f"| {r['group']} | `{r['symbol']}` | 0 | {r.get('skipped', '')}: названо " + f"{r.get('predicted_gitnext', 0)} | названо {r.get('predicted_coverage', 0)} | |") + continue + g, c, u = (r["full"][k] for k in ("gitnext", "coverage", "union")) + nb = f", не импортир. файлов {len(r['test_files_not_imported'])}" if r["test_files_not_imported"] else "" + L.append(f"| {r['group']} | `{r['symbol']}` | {r['truth_full']} ({r['truth_eval']}{nb}) | " + f"{pct(g['recall'])} / {pct(g['top_precision'])} | {pct(c['recall'])} / {pct(c['precision'])} / " + f"{pct(c['top_precision'])} | {pct(u['recall'])} / {pct(u['top_precision'])} |") + k = res["cost"] + L += ["", "## Цена", "", + f"- прогон тестов: без покрытия {k['plain_s']} с, pytest-cov по тестам {k['pytest_cov_s']} с " + f"(×{k['slowdown']}), coverage `test_function` {k['test_function_s']} с; медиана из {k['repeat']}", + f"- `.coverage` {k['coverage_db_bytes']} байт; карта «функция → тест»: {k['map_pairs']} пар, " + f"{k['map_functions']} функций, {k['map_tests']} контекстов; SQLite (2 int на пару) {k['map_sqlite_bytes']} байт", + f"- тестов собрано {k['items']}, разных имён тестов в карте {k['map_test_names']}", + f"- функций с телом: {k['functions_with_body']}; исполнено хоть раз вне тестов (импорт, сбор): " + f"{k['functions_run_outside_tests']}, только вне тестов: {k['functions_run_outside_tests_only']}; " + f"не исполнено ни разу: {k['functions_never_run']}", + f"- `test_function` против pytest-cov: пар {k['tf_pairs']} против {k['map_pairs']}; " + f"тестов, падающих по полной истине, но не найденных: {k['tf_missed']} против {k['cov_missed']}"] + return "\n".join(L) + "\n" + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + ap.add_argument("--n", type=int, default=20, help="run.pick sample (the eval takes the first 8)") + ap.add_argument("--n2", type=int, default=24, help="random sample without the callers condition") + ap.add_argument("--seed", type=int, default=7) + ap.add_argument("--repeat", type=int, default=3, help="timed runs of each kind") + ap.add_argument("--out", default="learn-tests-click") + a = ap.parse_args() + repo = next(r for r in json.loads((run.HERE / "repos.json").read_text()) if r["name"] == "click") + root = run.prepare(repo) + run.sh(".venv/bin/pip -q install coverage pytest-cov", root, timeout=1800) + run.gx(["init"], root, timeout=1800) + syms = run.symbols(root) + file_of = {s["qualified"]: s["file"] for s in syms} + + # baselines: tests that already fail are not ours + _, o = run.sh(run.LANG["python"]["tests"], root, timeout=2400) + base_eval = run.py_failed(o) + _, o = run.sh(FULL, root, timeout=2400) + base_full = full_failed(o) + items = run.sh(".venv/bin/python -m pytest -q --co -p no:cacheprovider 2>&1 | tail -1", root)[1].strip().split("/")[0] + + # cost and the map + work = run.WORK / "learn-tests" + work.mkdir(parents=True, exist_ok=True) + plain, pcov, tfun = [], [], [] + for _ in range(a.repeat): + t = time.time() + run.sh(TESTS + " >/dev/null 2>&1", root, timeout=3600) + plain.append(time.time() - t) + pcov.append(coverage_run(root, work / "cov.db", "pytest-cov")) + tfun.append(coverage_run(root, work / "tf.db", "test_function")) + bodies = body_lines(root, syms) + fmap, width, st = build_map(read_coverage(root, work / "cov.db"), bodies, syms) + tmap, _, _ = build_map(read_coverage(root, work / "tf.db"), bodies, syms) + msql = work / "map.sqlite" + msql.unlink(missing_ok=True) + db = sqlite3.connect(msql) + db.execute("create table test(id integer primary key, name text)") + db.execute("create table covers(symbol integer, test integer, primary key(symbol, test)) without rowid") + tid = {c: i for i, c in enumerate(sorted(width))} + sid = {q: i for i, q in enumerate(sorted(fmap))} + db.executemany("insert into test values (?,?)", [(i, c) for c, i in tid.items()]) + db.executemany("insert into covers values (?,?)", [(sid[q], tid[c]) for q, cs in fmap.items() for c in cs]) + db.commit() + db.execute("vacuum") + db.close() + + sample = run.pick(syms, root, a.n, a.seed) + rand = pick_random(syms, root, a.n2, a.seed, {s["qualified"] for s in sample}) + rows = [] + truth_of: dict[str, dict[str, set]] = {} + cov_missed = tf_missed = 0 + for group, ss in (("pick", sample), ("random", rand)): + for s in ss: + q = s["qualified"] + print(f" {group} {q}", flush=True) + ev, full = truths(root, repo, s, base_eval, base_full) + r = {"group": group, "symbol": q} + if full.get("skipped") == "no body": + continue + broken = [f[len(COLLECT):] for f in full.get("failed", []) if f.startswith(COLLECT)] + full = {**full, "failed": [f for f in full.get("failed", []) if not f.startswith(COLLECT)]} + r["test_files_not_imported"] = broken + r["eval_says_none_fail"] = "failed" in ev and not ev["failed"] + gx_names, _, _ = run.tests_for(root, q) + cov = cov_order(q, fmap, width, file_of) + if "skipped" in full or not full.get("failed"): + # nothing fails: every test named is a wasted run + r.update(skipped=full.get("skipped") or "no test fails when it throws", + predicted_gitnext=len(gx_names), predicted_coverage=len(cov)) + rows.append(r) + continue + un = union(gx_names, cov) + tf_names = {test_name(c) for c in tmap.get(q, ())} + tf_full = set(full["failed"]) + cov_missed += len(tf_full - set(cov)) + tf_missed += len(tf_full - tf_names) + r.update(truth_full=len(full["failed"]), truth_eval=len(ev.get("failed", [])), + missed_by_coverage=sorted(tf_full - set(cov))[:8], + covered_not_failing=sorted(set(cov) - tf_full)[:8], top_coverage=cov[:TOP]) + truth_of[q] = {"full": tf_full, "eval": set(ev.get("failed", []))} + for tname, tr in truth_of[q].items(): + if tr: + r[tname] = {"gitnext": score(gx_names, tr), "coverage": score(cov, tr), "union": score(un, tr)} + rows.append(r) + + # the same question to gitnext itself once it has learned the map + t0 = time.time() + code, said = run.gx(["learn-tests"], root, timeout=1800) + learn_s = round(time.time() - t0, 1) + if code == 0: + for r in rows: + names, _, _ = run.tests_for(root, r["symbol"]) + for tname, tr in truth_of.get(r["symbol"], {}).items(): + if tr: + r[tname]["learned"] = score(names, tr) + (root / ".gitnext" / "tests.db").unlink(missing_ok=True) # later runs measure the call graph again + else: + print("gitnext learn-tests failed:", said[-300:]) + + med = lambda v: round(statistics.median(v), 1) # noqa: E731 + res = {"repo": "click", "commit": repo["commit"][:12], "seed": a.seed, + "gitnext_commit": run.sh("git rev-parse --short HEAD", run.HERE)[1].strip(), + "functions": rows, + "summary": {g: {t: summarize([r for r in rows if g == "all" or r["group"] == g], t) for t in ("full", "eval")} + for g in ("pick", "random", "all")}, + "cost": {"repeat": a.repeat, "plain_s": med(plain), "pytest_cov_s": med(pcov), "test_function_s": med(tfun), + "slowdown": round(statistics.median(pcov) / statistics.median(plain), 1), + "coverage_db_bytes": (work / "cov.db").stat().st_size, "map_sqlite_bytes": msql.stat().st_size, + "map_pairs": sum(len(v) for v in fmap.values()), "map_functions": len(fmap), "map_tests": len(width), + "map_test_names": len({test_name(c) for c in width}), "items": items, + "tf_pairs": sum(len(v) for v in tmap.values()), "tf_missed": tf_missed, "cov_missed": cov_missed, + "functions_with_body": len(bodies), "gitnext_learn_s": learn_s if code == 0 else None, **st}} + out = run.HERE / "results" + (out / f"{a.out}.json").write_text(json.dumps(res, ensure_ascii=False, indent=1)) + md = render(res) + (out / f"{a.out}.md").write_text(md) + print("\n" + md) + + +if __name__ == "__main__": + main() diff --git a/eval/learn_tests_go.py b/eval/learn_tests_go.py new file mode 100644 index 0000000..0754ab2 --- /dev/null +++ b/eval/learn_tests_go.py @@ -0,0 +1,294 @@ +"""learn-tests prototype for Go (cobra, chi): does a per-test coverage map find the tests that fail better than +`gitnext tests-for`, and what does it cost? + +Go has no per-test coverage, so every test runs on its own: one test binary per package built with coverage of +the whole module (`go test -c -cover -coverpkg=/...`, the binary keeps the name `go test` gives it — cobra +reads the command line as its own arguments under any other name), then `pkg.test -test.run '^TestX$' +-test.coverprofile=…` per top-level test. A profile block that ran is booked to the innermost function holding its +first line. Ground truth is the eval's (`run.failing_tests`, tests run one at a time, cached in truth.json). + +Two samples: the functions whose truth the eval already has (`run.pick` of earlier runs) and random functions of +the library with a body of 3+ lines (no condition on callers). The driver (`measure`) is shared with +`learn_tests_rust.py`. + + GITNEXT=$PWD/target/release/gitnext python3 eval/learn_tests_go.py [--repos cobra,chi] [--n2 12] [--seed 7] \\ + [--pick-from ] +""" +from __future__ import annotations + +import argparse +import json +import random +import re +import shutil +import sqlite3 +import statistics +import sys +import time +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).parent)) +import learn_tests as lt # noqa: E402 metrics, union, rendering helpers of the Python prototype +import run # noqa: E402 the eval: same checkout, ground truth and cache + +TOP = run.TOP +SOURCES = ("gitnext", "coverage", "union") + + +# ---------------------------------------------------------------- shared driver + +def fn_syms(syms: list[dict]) -> list[dict]: + return [s for s in syms if s["kind"] in ("function", "method") and not s.get("decl")] + + +def line_owner(syms: list[dict]) -> dict[str, list]: + """file -> list indexed by line: the innermost function holding that line (or None).""" + by_file: dict[str, list[dict]] = {} + for s in fn_syms(syms): + by_file.setdefault(s["file"], []).append(s) + out = {} + for f, ss in by_file.items(): + arr = [None] * (max(s["end_line"] for s in ss) + 2) + for s in sorted(ss, key=lambda s: s["start_line"] - s["end_line"]): # widest first, inner ones overwrite + for i in range(s["start_line"], s["end_line"] + 1): + arr[i] = s["qualified"] + out[f] = arr + return out + + +def build_map(tests: dict, owner: dict) -> tuple[dict[str, set[str]], dict[str, int]]: + """tests: id -> {"lines": {file: set(lines)}} → (function -> test ids, test id -> functions it ran).""" + fmap: dict[str, set[str]] = {} + width: dict[str, int] = {} + for tid, t in tests.items(): + ran = set() + for f, ls in t["lines"].items(): + arr = owner.get(f) + if arr: + ran |= {arr[i] for i in ls if i < len(arr) and arr[i]} + width[tid] = len(ran) + for q in ran: + fmap.setdefault(q, set()).add(tid) + return fmap, width + + +def cov_order(q: str, fmap, width, name_of) -> list[str]: + """Bare test names that ran `q`, narrowest first; on a tie the test whose name holds the function's.""" + short = re.split(r"[.:]", q)[-1].lower() + best: dict[str, tuple] = {} + for tid in fmap.get(q, ()): + n = name_of(tid) + key = (width[tid], 0 if short in n.lower() else 1, n) + if n not in best or key < best[n]: + best[n] = key + return sorted(best, key=best.get) + + +def summarize(rows: list[dict]) -> dict: + rs = [r for r in rows if r.get("score")] + out = {src: {m: lt.mean([r["score"][src][m] for r in rs]) for m in ("recall", "precision", "top_precision", "caught")} + for src in SOURCES} + out["functions"] = len(rs) + return out + + +def map_sqlite(path: Path, fmap: dict, width: dict) -> int: + path.unlink(missing_ok=True) + db = sqlite3.connect(path) + db.execute("create table test(id integer primary key, name text)") + db.execute("create table covers(symbol integer, test integer, primary key(symbol, test)) without rowid") + tid = {c: i for i, c in enumerate(sorted(width))} + sid = {q: i for i, q in enumerate(sorted(fmap))} + db.executemany("insert into test values (?,?)", [(i, c) for c, i in tid.items()]) + db.executemany("insert into covers values (?,?)", [(sid[q], tid[c]) for q, cs in fmap.items() for c in cs]) + db.commit() + db.execute("vacuum") + db.close() + return path.stat().st_size + + +def measure(repo: dict, collect, plain_cmd: str, library, a) -> dict: + """One repo. collect(root, syms, work) -> (tests, cost): tests = id -> {"name", "failed", "lines"}.""" + L = run.LANG[repo["lang"]] + key = f"{repo['name']}@{repo['commit'][:12]}" + tkey = L.get("tests_key", "tests") + root = run.prepare(repo) + run.gx(["init"], root, timeout=1800) + syms = run.symbols(root) + by_q = {s["qualified"]: s for s in fn_syms(syms)} + work = run.WORK / "learn-tests" / repo["name"] + shutil.rmtree(work, ignore_errors=True) + work.mkdir(parents=True) + + plain = [] + for _ in range(a.repeat): + t = time.time() + _, tout = run.sh(plain_cmd, root, timeout=3600) + plain.append(time.time() - t) + together_failed = L["failed"](tout, root) + tests, cost = collect(root, syms, work) + owner = line_owner(syms) + fmap, width = build_map(tests, owner) + name_of = lambda tid: tests[tid]["name"] # noqa: E731 + alone_failed = {t["name"] for t in tests.values() if t["failed"]} + + # samples: functions with an answer in the cache first, then random ones of the library + prefix = f"{key}:{tkey}:" + if not run.CACHE: + run._load_cache() + # the eval's own sample: the keys of the cache as the eval left it (`--pick-from`), not after this script + # added its random functions to it + known = json.loads(Path(a.pick_from).read_text()) if a.pick_from else run.CACHE + cached = [q[len(prefix):] for q in known if q.startswith(prefix)] + pick = [by_q[q] for q in sorted(cached) if q in by_q] + cands = [s for s in fn_syms(syms) if not s.get("test") and library(s["file"]) and s["qualified"] not in set(cached) + and (b := run.body_start(root, s, repo["lang"])) and s["end_line"] - b + 1 >= 3] + random.Random(a.seed).shuffle(cands) + rand = cands[:a.n2] + base = set(run.cached(f"{key}:baseline", lambda: run.baseline_tests(root, L)).get("failed", [])) + + rows = [] + for group, ss in (("pick", pick), ("random", rand)): + for s in ss: + q = s["qualified"] + print(f" {repo['name']} {group} {q}", flush=True) + tr = run.cached(f"{prefix}{q}", lambda: run.failing_tests(root, repo, s, base), + keep=lambda v: v.get("skipped") != "the test suite did not run") + gx_names, _, _ = run.tests_for(root, q) + cov = cov_order(q, fmap, width, name_of) + r = {"group": group, "symbol": q, "file": s["file"]} + if "skipped" in tr or not tr.get("failed"): + r.update(skipped=tr.get("skipped") or "no test fails when it throws", + predicted_gitnext=len(gx_names), predicted_coverage=len(cov)) + rows.append(r) + continue + truth = set(tr["failed"]) + un = lt.union(gx_names, cov) + r.update(truth=len(truth), truth_doctests=len({t for t in truth if "/" in t or t.endswith(".rs")}), + predicted_gitnext=len(gx_names), predicted_coverage=len(cov), + missed_by_coverage=sorted(truth - set(cov))[:10], covered_not_failing=sorted(set(cov) - truth)[:10], + missed_by_coverage_n=len(truth - set(cov)), covered_not_failing_n=len(set(cov) - truth), + top_coverage=cov[:TOP], + score={"gitnext": lt.score(gx_names, truth), "coverage": lt.score(cov, truth), "union": lt.score(un, truth)}) + rows.append(r) + + med = lambda v: round(statistics.median(v), 1) # noqa: E731 + cost.update(repeat=a.repeat, plain_s=med(plain), tests=len(tests), + map_pairs=sum(len(v) for v in fmap.values()), map_functions=len(fmap), + map_sqlite_bytes=map_sqlite(work / "map.sqlite", fmap, width), + functions_with_body=len([s for s in fn_syms(syms) if not s.get("test") and library(s["file"])]), + functions_never_run=len([s for s in fn_syms(syms) if not s.get("test") and library(s["file"]) and s["qualified"] not in fmap]), + fail_alone_not_together=sorted(alone_failed - together_failed - base), + fail_together_not_alone=sorted(together_failed - alone_failed - base)) + cost["slowdown_runs"] = round(cost["map_s"] / cost["plain_s"], 1) if cost["plain_s"] else None + return {"repo": repo["name"], "lang": repo["lang"], "commit": repo["commit"][:12], "seed": a.seed, + "gitnext_commit": run.sh("git rev-parse --short HEAD", run.HERE)[1].strip(), + "functions": rows, + "summary": {g: summarize([r for r in rows if g == "all" or r["group"] == g]) for g in ("pick", "random", "all")}, + "cost": cost} + + +def pct(x): + return lt.pct(x) + + +def render(res: dict) -> str: + k = res["cost"] + L = [f"# learn-tests на {res['repo']} ({res['lang']}): покрытие по тестам против `tests-for`", + f"{res['repo']} {res['commit']}, gitnext {res['gitnext_commit']}, seed {res['seed']}. Истина — eval " + "(тесты, падающие при panic в начале функции). pick — функции с ответом в кэше eval, random — случайные.", "", + "| выборка | функций | источник | полнота | точность | из 10 падают | поймано |", "|---|---:|---|---:|---:|---:|---:|"] + for g, gname in (("pick", "pick (кэш eval)"), ("random", "случайные"), ("all", "все")): + s = res["summary"][g] + for src in SOURCES: + m = s[src] + L.append(f"| {gname} | {s['functions']} | {src} | {pct(m['recall'])} | {pct(m['precision'])} | " + f"{pct(m['top_precision'])} | {pct(m['caught'])} |") + L += ["", "## По функциям", "", "| выборка | функция | падают | граф: полн / из 10 | покрытие: полн / точн / из 10 | мимо покрытия |", + "|---|---|---:|---|---|---|"] + for r in res["functions"]: + if "score" not in r: + L.append(f"| {r['group']} | `{r['symbol']}` | 0 | {r['skipped']} | названо {r['predicted_coverage']} | |") + continue + g, c = r["score"]["gitnext"], r["score"]["coverage"] + L.append(f"| {r['group']} | `{r['symbol']}` | {r['truth']} | {pct(g['recall'])} / {pct(g['top_precision'])} | " + f"{pct(c['recall'])} / {pct(c['precision'])} / {pct(c['top_precision'])} | " + f"{', '.join(r['missed_by_coverage'][:4])} |") + L += ["", "## Цена", ""] + [f"- `{x}`: {v}" for x, v in k.items()] + return "\n".join(L) + "\n" + + +def main_for(lang: str, default: str, collect, plain_cmd, library, doc: str) -> None: + ap = argparse.ArgumentParser(description=doc, formatter_class=argparse.RawDescriptionHelpFormatter) + ap.add_argument("--repos", default=default) + ap.add_argument("--n2", type=int, default=12, help="random functions per repo, besides the cached ones") + ap.add_argument("--seed", type=int, default=7) + ap.add_argument("--repeat", type=int, default=3, help="timed plain test runs") + ap.add_argument("--pick-from", help="truth.json as the eval left it: its functions are the `pick` group " + "(default: the current cache, which also holds the random ones of earlier runs)") + a = ap.parse_args() + repos = {r["name"]: r for r in json.loads((run.HERE / "repos.json").read_text())} + for name in a.repos.split(","): + res = measure(repos[name], collect, plain_cmd, library, a) + out = run.HERE / "results" / f"learn-tests-{name}" + out.with_suffix(".json").write_text(json.dumps(res, ensure_ascii=False, indent=1)) + md = render(res) + out.with_suffix(".md").write_text(md) + print("\n" + md, flush=True) + + +# ---------------------------------------------------------------- Go + +def go_profile(path: Path, module: str) -> dict[str, set[int]]: + """`mod/pkg/file.go:12.30,14.2 1 3` blocks that ran → file (relative) -> first lines of those blocks.""" + out: dict[str, set[int]] = {} + if not path.exists(): + return out + for line in path.read_text().splitlines()[1:]: + m = re.match(r"(.+\.go):(\d+)\.\d+,\d+\.\d+ \d+ (\d+)$", line) + if m and m.group(3) != "0": + f = m.group(1) + f = f[len(module) + 1:] if f.startswith(module + "/") else f + out.setdefault(f, set()).add(int(m.group(2))) + return out + + +def go_collect(root: Path, syms: list[dict], work: Path) -> tuple[dict, dict]: + module = run.sh("go list -m", root)[1].strip().splitlines()[0] + _, dirs = run.sh("go list -f '{{.Dir}}' ./...", root) + tests: dict = {} + build_s = run_s = 0.0 + prof_bytes = 0 + testmain = [] + for d in [Path(x) for x in dirs.split() if x.startswith("/")]: + rel = str(d.relative_to(root)) or "." + out = work / "bin" / rel.replace("/", "_") + out.mkdir(parents=True, exist_ok=True) + t = time.time() + code, o = run.sh(f"go test -c -cover -coverpkg={module}/... -o {out}/ .", d, timeout=1800) + build_s += time.time() - t + if code: + print(f" build {rel}: {o[-300:]}", flush=True) + if any("func TestMain(" in p.read_text(errors="replace") for p in d.glob("*_test.go")): + testmain.append(rel) + for binary in out.glob("*.test"): + _, names = run.sh(f"{binary} -test.list '^(Test|Example|Fuzz)'", d) + for n in [x for x in names.split() if re.match(r"(Test|Example|Fuzz)\w*$", x)]: + prof = work / "prof" / f"{rel.replace('/', '_')}.{n}.out" + prof.parent.mkdir(exist_ok=True) + t = time.time() + code, _ = run.sh(f"{binary} -test.run '^{n}$' -test.count=1 -test.coverprofile={prof}", d, timeout=300) + run_s += time.time() - t + prof_bytes += prof.stat().st_size if prof.exists() else 0 + tests[f"{rel}:{n}"] = {"name": n, "failed": bool(code), "lines": go_profile(prof, module)} + prof.unlink(missing_ok=True) + return tests, {"build_s": round(build_s, 1), "run_one_by_one_s": round(run_s, 1), "map_s": round(build_s + run_s, 1), + "profiles_bytes": prof_bytes, "packages": len(dirs.split()), "testmain_packages": testmain} + + +def go_library(file: str) -> bool: + return file.endswith(".go") and not file.endswith("_test.go") and not run.LANG["go"]["unseen"](file) + + +if __name__ == "__main__": + main_for("go", "cobra,chi", go_collect, "go test -count=1 -json ./... 2>&1", go_library, __doc__) diff --git a/eval/learn_tests_js.py b/eval/learn_tests_js.py new file mode 100644 index 0000000..29158bc --- /dev/null +++ b/eval/learn_tests_js.py @@ -0,0 +1,331 @@ +"""learn-tests prototype for TypeScript (zustand, yaml): why does `gitnext tests-for` find 3% of the tests that fail, +and does a per-test-file coverage map do better, and what does it cost? +The eval's truth for TS is a test *file* (`level="file"` in `run.LANG["typescript"]`), so the map is per file too: +every test file runs on its own with vitest's v8 coverage (`vitest run --coverage.enabled …`, +`coverage-final.json`, istanbul format). A statement that ran is booked to the innermost function whose *body* +holds its line (from `run.body_start` to the end): the line of a declaration runs when the module is imported, so +counting it would book every function of every imported module to the test. +`tests-for` is scored by file as in `run.check_tests`. The driver is `learn_tests_go.measure`, with the test name +being the test file. +`--causes` writes, for every function whose failing test files `tests-for` misses, how each missed file reaches the +code (package name through the vitest alias, `index.ts` re-export, a relative import of `src/`, a helper), whether +gitnext sees test symbols in it, and what `tests-for` named instead. + + GITNEXT=$PWD/target/release/gitnext python3 eval/learn_tests_js.py [--repos zustand,yaml] [--n2 12] [--seed 7] \\ + [--pick-from ] [--causes] +""" +from __future__ import annotations + +import json +import re +import sys +import time +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).parent)) +import learn_tests_go as lg # noqa: E402 the shared driver of 005 +import run # noqa: E402 the eval: same checkout, ground truth and cache + +TS = run.LANG["typescript"] +COV_OPTS = ("--coverage.enabled --coverage.provider=v8 --coverage.reporter=json --coverage.include='src/**' " + "--coverage.clean=true") + + +def tests_for_files(root: Path, q: str) -> tuple[list[str], list[str], set[str]]: + """`run.tests_for` keyed by test file — the eval's TS level (`run.check_tests`).""" + files, graph = [], set() + for _, f, how in run.tests_for_rows(root, q): + if f not in files: + files.append(f) + if "hop" in how or "direct" in how: + graph.add(f) + return files, files, graph + + +def body_owner(root: Path, syms: list[dict]) -> dict[str, list]: + """file -> list indexed by line: the innermost function whose body holds that line (or None).""" + by_file: dict[str, list[dict]] = {} + for s in lg.fn_syms(syms): + by_file.setdefault(s["file"], []).append(s) + out = {} + for f, ss in by_file.items(): + arr = [None] * (max(s["end_line"] for s in ss) + 2) + for s in sorted(ss, key=lambda s: s["start_line"] - s["end_line"]): # widest first, inner ones overwrite + b = run.body_start(root, s, "typescript") or s["start_line"] + 1 + for i in range(s["start_line"], s["end_line"] + 1): + # the inner function's header runs when the outer one does: it stays the outer one's + if i >= b: + arr[i] = s["qualified"] + out[f] = arr + return out + + +def read_cov(path: Path, root: Path) -> dict[str, set[int]]: + """coverage-final.json → file (relative) -> lines of statements that ran.""" + out: dict[str, set[int]] = {} + if not path.exists(): + return out + for f, v in json.loads(path.read_text()).items(): + try: + rel = str(Path(f).relative_to(root)) + except ValueError: + continue + ls = {v["statementMap"][k]["start"]["line"] for k, n in v["s"].items() if n} + if ls: + out[rel] = ls + return out + + +def test_files(root: Path) -> list[str]: + """Test files of the plain run (`.gnx-vitest.json`, written by the eval's test command).""" + d = json.loads((root / ".gnx-vitest.json").read_text()) + return sorted(str(Path(f["name"]).relative_to(root)) for f in d.get("testResults", [])) + + +def js_collect(root: Path, syms: list[dict], work: Path) -> tuple[dict, dict]: + files = test_files(root) + owner = body_owner(root, syms) + tests: dict = {} + run_s = 0.0 + json_bytes = 0 + for f in files: + d = work / "cov" / f.replace("/", "_") + t = time.time() + code, _ = run.sh(f"npx vitest run {f} {COV_OPTS} --coverage.reportsDirectory={d} >/dev/null 2>&1", root, + timeout=900) + run_s += time.time() - t + p = d / "coverage-final.json" + json_bytes += p.stat().st_size if p.exists() else 0 + tests[f] = {"name": f, "failed": bool(code), "lines": read_cov(p, root)} + # the cheap alternative: one run of the whole suite with coverage (no per-file map) + t = time.time() + run.sh(f"npx vitest run {COV_OPTS} --coverage.reportsDirectory={work}/cov-all >/dev/null 2>&1", root, timeout=1800) + whole_s = time.time() - t + lg.line_owner = lambda _syms: owner # measure books lines through line_owner: use the body-only one + return tests, {"run_one_by_one_s": round(run_s, 1), "map_s": round(run_s, 1), "whole_suite_coverage_s": round(whole_s, 1), + "coverage_json_bytes": json_bytes, "test_files": len(files)} + + +def js_library(file: str) -> bool: + return (file.startswith("src/") and file.endswith((".ts", ".tsx")) and not file.endswith(".d.ts") + and not run.LANG["typescript"].get("unseen", lambda f: False)(file)) + + +# ---------------------------------------------------------------- causes + +IMPORT = re.compile(r"""(?:from|import|require\()\s*['"]([^'"]+)['"]""") + + +def how_reached(root: Path, test: str, target: str, pkg: str) -> str: + """How a test file reaches the file of the function: the first matching import kind.""" + src = (root / test).read_text(errors="replace") + mods = IMPORT.findall(src) + stem = Path(target).with_suffix("").as_posix() + kinds = [] + for m in mods: + if m == pkg or m.startswith(pkg + "/"): + kinds.append("package name (vitest alias) → index re-export" if m == pkg else f"package subpath `{m}`") + elif m.startswith("."): + r = (root / test).parent.joinpath(m).resolve() + try: + rel = r.relative_to(root).with_suffix("").as_posix() + except ValueError: + continue + if rel == stem: + kinds.append("relative import of the function's file") + elif rel.startswith("src"): + kinds.append("relative import of another src file") + else: + kinds.append(f"helper `{rel}`") + return "; ".join(dict.fromkeys(kinds)) or "no import of the library" + + +def ancestors(root: Path, q: str, hops: int = 8, maybe: bool = False) -> set[str]: + """Library functions that reach `q` through the call graph (`gitnext callers`, sure — or also possible — edges).""" + seen, front = {q}, [q] + for _ in range(hops): + got = run.callers_many(root, front) + nxt = [] + for sure, poss in got.values(): + for c in sure | (poss if maybe else set()): + if c not in seen: + seen.add(c) + nxt.append(c) + if not nxt: + break + front = nxt + return seen + + +def test_modules(root: Path, q: str, hops: int = 8, maybe: bool = False) -> dict[str, int]: + """Test files whose `module` symbol reaches `q` in the real call graph (`callers --tests`). The graph books a + call inside `it('…', () => …)` to the test file's module; `tests-for` skips it (not callable, locate.rs).""" + seen, front, files = {q}, [q], {} + for hop in range(1, hops + 1): + code, out = run.gx(["--json", "callers", "--tests", *front], root) + nxt = [] + for entry in (json.loads(out) if not code else []): + for c in [x[0] for x in entry.get("callers", [])] + ([x[0] if isinstance(x, list) else x for x in entry.get("maybe") or []] if maybe else []): + if c["file"].startswith("tests/") or ".test." in c["file"]: + files.setdefault(c["file"], hop) + if c["qualified"] not in seen: + seen.add(c["qualified"]) + nxt.append(c["qualified"]) + if not nxt: + break + front = nxt + return files + + +def file_calls(text: str, names: set[str]) -> bool: + """The test file's own code calls one of these names (`f(`, `.f(`, `new F(`) — what the graph would see if the + file, arrow callbacks included, were one test symbol.""" + return any(re.search(rf"(?:\bnew\s+|[.\s(!]|^){re.escape(n)}\s*[(<]", text, re.M) for n in names) + + +def causes(repo: dict, a) -> dict: + root = run.prepare(repo) + run.gx(["init"], root, timeout=1800) + syms = run.symbols(root) + by_q = {s["qualified"]: s for s in syms} + # `symbols` leaves test code out; `--tests` lists it: the named functions of a test file are all the graph + # has there (the arrow inside `it('…', () => …)` is no symbol) + _, out = run.gx(["--json", "symbols", "--tests"], root) + test_syms: dict[str, int] = {} + for s in json.loads(out): + if s["file"].startswith("tests/") and s["kind"] in ("function", "method"): + test_syms[s["file"]] = test_syms.get(s["file"], 0) + 1 + pkg = json.loads((root / "package.json").read_text())["name"] + key = f"{repo['name']}@{repo['commit'][:12]}:tests:" + known = json.loads(Path(a.pick_from).read_text()) if a.pick_from else (run._load_cache() or run.CACHE) + all_tests = test_files(root) if (root / ".gnx-vitest.json").exists() else [] + rows = [] + for k, v in sorted(known.items()): + if not k.startswith(key) or not v.get("failed"): + continue + q = k[len(key):] + if q not in by_q: + continue + truth = set(v["failed"]) + named = run.tests_for_rows(root, q) + nfiles = list(dict.fromkeys(f for _, f, _ in named)) + miss = sorted(truth - set(nfiles)) + short = lambda qs: {re.split(r"::", x)[-1] for x in qs if x in by_q} # noqa: E731 + anc_sure, anc_all = short(ancestors(root, q)), short(ancestors(root, q, maybe=True)) + texts = {t: (root / t).read_text(errors="replace") for t in set(all_tests) | truth} + named_s = {t for t in texts if file_calls(texts[t], anc_sure)} | set(nfiles) + named_a = {t for t in texts if file_calls(texts[t], anc_all)} | set(nfiles) + sim = {"sure": sorted(truth & named_s), "sure_or_possible": sorted(truth & named_a), + "named_sure": len(named_s), "named_sure_or_possible": len(named_a), + "ancestors_sure": len(anc_sure), "ancestors_all": len(anc_all)} + gm = {} + for kind, got in (("sure", test_modules(root, q)), ("sure_or_possible", test_modules(root, q, maybe=True))): + for hops in (4, 8): # `tests-for` goes 4 deep by default + files = {f for f, h in got.items() if h <= hops} | set(nfiles) # on top of what it names now + gm[f"{kind}_{hops}"] = sorted(truth & files) + gm[f"named_{kind}_{hops}"] = len(files) + rows.append({"graph_with_test_modules": gm, "simulated_file_as_test": sim,"symbol": q, "file": by_q[q]["file"], "truth": len(truth), "named_files": len(nfiles), + "hit": len(truth & set(nfiles)), "named": nfiles, + "named_how": sorted({h for _, _, h in named}), + "missed": [{"test": t, "reach": how_reached(root, t, by_q[q]["file"], pkg), + "test_symbols": test_syms.get(t, 0)} for t in miss]}) + return {"repo": repo["name"], "package": pkg, "test_files": len(all_tests), "test_functions_by_file": test_syms, + "functions": rows} + + +CAUSES = ( + ("module4", "граф доходит до модуля тестового файла (вызов в `it(…, () => …)`), `tests-for` его отбрасывает: " + "не функция (locate.rs, `is_callable`) — 4 перехода, уверенные рёбра"), + ("possible4", "то же, но через «возможное» ребро (`.method` у получателя неизвестного типа) — 4 перехода"), + ("deep", "то же, но глубже 4 переходов (5–8)"), + ("edge", "в графе нет ребра по пути, хотя тестовый файл вызывает функцию-предка по имени (текст)"), + ("dynamic", "ни граф, ни имя предка в тексте теста: экспорт под другим именем (`export const persist = persistImpl as …`), " + "вызов через объект (`api.subscribe`), данные набора тестов"), +) + + +def cause_of(f: dict, t: str) -> str: + gm, sim = f["graph_with_test_modules"], f["simulated_file_as_test"] + if t in gm["sure_4"]: + return "module4" + if t in gm["sure_or_possible_4"]: + return "possible4" + if t in gm["sure_or_possible_8"]: + return "deep" + if t in sim["sure_or_possible"]: + return "edge" + return "dynamic" + + +def render_causes(res: dict) -> str: + fs = [f for f in res["functions"] if f["missed"]] + L = [f"# Почему `tests-for` не называет падающие файлы тестов: {res['repo']}", "", + f"Функций с промахом: {len(fs)} из {len(res['functions'])}; падающих файлов {sum(f['truth'] for f in fs)}, " + f"названо верно {sum(f['hit'] for f in fs)}, пропущено {sum(len(f['missed']) for f in fs)}. " + f"Тестовых файлов {res['test_files']}, из них без единой именованной функции " + f"{res['test_files'] - len(res['test_functions_by_file'])}.", "", + "Пара «функция, пропущенный файл» по первой подходящей причине:", "", + "| причина | пар | функций | пример (функция → файл) |", "|---|---:|---:|---|"] + for k, text in CAUSES: + pairs = [(f["symbol"], m["test"]) for f in fs for m in f["missed"] if cause_of(f, m["test"]) == k] + ex = f"`{pairs[0][0].split('::')[-1]}` → `{pairs[0][1]}`" if pairs else "" + L.append(f"| {text} | {len(pairs)} | {len({p[0] for p in pairs})} | {ex} |") + no_fn = sum(1 for f in fs for m in f["missed"] if not m["test_symbols"]) + L += ["", f"Из пропущенных пар в файлах без именованных функций: {no_fn}; путь импорта (по парам):"] + reach: dict[str, int] = {} + for f in fs: + for m in f["missed"]: + k = "по имени пакета" if "package" in m["reach"] else "относительный" if "relative" in m["reach"] else "только помощник / нет" + reach[k] = reach.get(k, 0) + 1 + L += [f"- {k}: {v}" for k, v in sorted(reach.items(), key=lambda x: -x[1])] + L += ["", "Оценка починки графа (по функциям, среднее; `named` — сколько файлов назвал бы):", "", + "| вариант | полнота | точность | функций с ответом |", "|---|---:|---:|---:|"] + fsa = res["functions"] + for key, k, text in (("graph_with_test_modules", "sure_4", "модули тестов, уверенные рёбра, 4 перехода"), + ("graph_with_test_modules", "sure_or_possible_4", "+ возможные рёбра, 4 перехода"), + ("graph_with_test_modules", "sure_8", "модули тестов, уверенные, 8 переходов"), + ("graph_with_test_modules", "sure_or_possible_8", "+ возможные, 8 переходов"), + ("simulated_file_as_test", "sure_or_possible", "потолок графа: файл вызывает предка по имени (текст, 8 переходов)")): + rec = sum(len(f[key][k]) / f["truth"] for f in fsa) / len(fsa) + pr = [len(f[key][k]) / f[key]["named_" + k] for f in fsa if f[key]["named_" + k]] + L.append(f"| {text} | {rec:.0%} | {(sum(pr) / len(pr) if pr else 0):.0%} | {len(pr)} из {len(fsa)} |") + now = sum(f["hit"] / f["truth"] for f in fsa) / len(fsa) + L.append(f"| сейчас (`tests-for`) | {now:.0%} | | |") + return "\n".join(L) + "\n" + + +def main() -> None: + if "--causes" in sys.argv: + import argparse + ap = argparse.ArgumentParser() + ap.add_argument("--repos", default="zustand,yaml") + ap.add_argument("--pick-from") + ap.add_argument("--causes", action="store_true") + ap.add_argument("--render", action="store_true", help="only rewrite the .md files from the .json ones") + a = ap.parse_args() + if a.render: + for name in a.repos.split(","): + out = run.HERE / "results" / f"learn-tests-{name}" + res = json.loads(out.with_suffix(".json").read_text()) + out.with_suffix(".md").write_text(lg.render(res).replace("при panic в начале", "при throw в начале")) + c = out.with_suffix(".causes.json") + if c.exists(): + out.with_suffix(".causes.md").write_text(render_causes(json.loads(c.read_text()))) + return + repos = {r["name"]: r for r in json.loads((run.HERE / "repos.json").read_text())} + for name in a.repos.split(","): + res = causes(repos[name], a) + out = run.HERE / "results" / f"learn-tests-{name}.causes.json" + out.write_text(json.dumps(res, ensure_ascii=False, indent=1)) + md = render_causes(res) + out.with_suffix(".md").write_text(md) + print(md, flush=True) + return + run.tests_for = tests_for_files # measure scores `run.tests_for`: by file, like the eval does for TS + go_render = lg.render + lg.render = lambda res: go_render(res).replace("при panic в начале", "при throw в начале") + lg.main_for("typescript", "zustand,yaml", js_collect, TS["tests"], js_library, __doc__) + + +if __name__ == "__main__": + main() diff --git a/eval/learn_tests_rust.py b/eval/learn_tests_rust.py new file mode 100644 index 0000000..e82ea19 --- /dev/null +++ b/eval/learn_tests_rust.py @@ -0,0 +1,105 @@ +"""learn-tests prototype for Rust (semver, indexmap): per-test coverage map against `gitnext tests-for`. + +The test binaries are built once with `-C instrument-coverage` (the eval's `cargo test`: default features, its own +target dir), then every test runs alone (` --exact `) with its own `LLVM_PROFILE_FILE`; +`llvm-profdata merge` + `llvm-cov export -format=lcov` (rustup's llvm-tools-preview) give the lines it ran, and +each line is booked to the innermost function holding it. Doc-tests are not run: what they would find is counted +in the report. Driver, samples and metrics: `learn_tests_go.measure`. + + GITNEXT=$PWD/target/release/gitnext python3 eval/learn_tests_rust.py [--repos semver,indexmap] [--n2 12] \\ + [--pick-from ] +""" +from __future__ import annotations + +import glob +import json +import os +import shlex +import sys +import time +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).parent)) +import learn_tests_go as lg # noqa: E402 +import run # noqa: E402 + + +def llvm_tool(name: str) -> str: + sysroot = run.sh("rustc --print sysroot", Path("."))[1].strip() + hits = glob.glob(f"{sysroot}/lib/rustlib/*/bin/{name}") + if not hits: + raise RuntimeError(f"{name}: rustup component add llvm-tools-preview") + return hits[0] + + +def lcov_lines(text: str, root: Path) -> dict[str, set[int]]: + out: dict[str, set[int]] = {} + cur = None + r = str(root.resolve()) + "/" + for line in text.splitlines(): + if line.startswith("SF:"): + p = line[3:] + cur = out.setdefault(p[len(r):], set()) if p.startswith(r) else None + elif line.startswith("DA:") and cur is not None: + n, c = line[3:].split(",")[:2] + if c != "0": + cur.add(int(n)) + return out + + +def rust_collect(root: Path, syms: list[dict], work: Path) -> tuple[dict, dict]: + profdata, cov = llvm_tool("llvm-profdata"), llvm_tool("llvm-cov") + target = work / "target" # its own target dir: never the one the eval's plain runs use + env = {**os.environ, "RUSTFLAGS": "-C instrument-coverage", "CARGO_TARGET_DIR": str(target), + "LLVM_PROFILE_FILE": str(work / "build-%p.profraw")} # build scripts are instrumented too + t = time.time() + code, o = run.sh("cargo test --no-run --message-format=json 2>/dev/null", root, timeout=3600, env=env) + build_s = time.time() - t + bins = [] + for line in o.splitlines(): + try: + ev = json.loads(line) + except ValueError: + continue + if ev.get("reason") == "compiler-artifact" and ev.get("profile", {}).get("test") and ev.get("executable"): + bins.append((ev["executable"], Path(ev["manifest_path"]).parent)) + if not bins: + raise RuntimeError(f"no test binaries: {o[-400:]}") + tests: dict = {} + run_s = export_s = 0.0 + prof_bytes = 0 + prof = work / "prof" + prof.mkdir(exist_ok=True) + for k, (b, pkg) in enumerate(bins): + _, listed = run.sh(f"{b} --list --format terse 2>/dev/null", pkg) + names = [x[:-len(": test")] for x in listed.splitlines() if x.endswith(": test")] + for j, n in enumerate(names): + raw, data = prof / f"{k}-{j}.profraw", prof / f"{k}-{j}.profdata" + renv = {**os.environ, "LLVM_PROFILE_FILE": str(raw), "CARGO_MANIFEST_DIR": str(pkg)} + t = time.time() + code, _ = run.sh(f"{b} --exact {shlex.quote(n)} --test-threads=1 -q", pkg, timeout=300, env=renv) + run_s += time.time() - t + prof_bytes += raw.stat().st_size if raw.exists() else 0 + t = time.time() + lines: dict = {} + if raw.exists(): + run.sh(f"{profdata} merge -sparse {raw} -o {data}", pkg) + _, lc = run.sh(f"{cov} export -format=lcov -instr-profile={data} {b} " + "--ignore-filename-regex='/.cargo/|/rustc/'", pkg, timeout=600) + lines = lcov_lines(lc, root) + export_s += time.time() - t + tests[f"{Path(b).name}:{n}"] = {"name": n.rsplit("::", 1)[-1], "failed": bool(code), "lines": lines} + raw.unlink(missing_ok=True) + data.unlink(missing_ok=True) + _, doc = run.sh("grep -rlE '^\\s*//[/!] *```' src | wc -l", root) + return tests, {"build_s": round(build_s, 1), "run_one_by_one_s": round(run_s, 1), "export_s": round(export_s, 1), + "map_s": round(build_s + run_s + export_s, 1), "map_without_build_s": round(run_s + export_s, 1), + "profiles_bytes": prof_bytes, "test_binaries": len(bins), "files_with_doctests": doc.strip()} + + +def rust_library(file: str) -> bool: + return file.startswith("src/") and file.endswith(".rs") + + +if __name__ == "__main__": + lg.main_for("rust", "semver,indexmap", rust_collect, "cargo test --no-fail-fast 2>&1", rust_library, __doc__) diff --git a/eval/repos.json b/eval/repos.json new file mode 100644 index 0000000..496baa8 --- /dev/null +++ b/eval/repos.json @@ -0,0 +1,22 @@ +[ + {"name": "cobra", "lang": "go", "url": "https://github.com/spf13/cobra", "commit": "adbc8813901bba65827259daa8e22ff94ec1f30e", + "setup": "go mod download"}, + {"name": "chi", "lang": "go", "url": "https://github.com/go-chi/chi", "commit": "c64ed7d6635f33a8b2feaff7dcfa55677023ac7d", + "setup": "go mod download"}, + {"name": "click", "lang": "python", "url": "https://github.com/pallets/click", "commit": "8abb77a8432e03ed14a95f972b44f905279415a7", + "setup": "PY=$(command -v python3.13 || command -v python3.12 || command -v python3.11 || command -v python3.10 || echo python3) && rm -rf .venv && $PY -m venv .venv && .venv/bin/python -m pip -q install --upgrade pip && .venv/bin/pip -q install -e . pytest"}, + {"name": "sqlparse", "lang": "python", "url": "https://github.com/andialbrecht/sqlparse", "commit": "09dbe1eec31ed1b3cd05366748865f11ba427d32", + "setup": "PY=$(command -v python3.13 || command -v python3.12 || command -v python3.11 || command -v python3.10 || echo python3) && rm -rf .venv && $PY -m venv .venv && .venv/bin/python -m pip -q install --upgrade pip && .venv/bin/pip -q install -e . pytest"}, + {"name": "zustand", "lang": "typescript", "url": "https://github.com/pmndrs/zustand", "commit": "9fed2eb2f3af672da9f7bf694b996df3831fc207", + "setup": "npm install --ignore-scripts --no-audit --no-fund --loglevel=error"}, + {"name": "yaml", "lang": "typescript", "url": "https://github.com/eemeli/yaml", "commit": "528ef30d6ded4bd9f2c3521b670eb2b29d503c5c", + "setup": "npm install --ignore-scripts --no-audit --no-fund --loglevel=error"}, + {"name": "jsoup", "lang": "java", "url": "https://github.com/jhy/jsoup", "commit": "d90d57521d931db7bf7ee464a4c0a1a9293db088", + "setup": "mvn -q -B test -Dtest=StringUtilTest -Dsurefire.failIfNoSpecifiedTests=false"}, + {"name": "json-java", "lang": "java", "url": "https://github.com/stleary/JSON-java", "commit": "2cd0a8c2112a3bc17d33ba8546c54ecb613613f1", + "setup": "mvn -q -B test -Dtest=JSONObjectTest -Dsurefire.failIfNoSpecifiedTests=false"}, + {"name": "semver", "lang": "rust", "url": "https://github.com/dtolnay/semver", "commit": "280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe", + "setup": "cargo fetch -q"}, + {"name": "indexmap", "lang": "rust", "url": "https://github.com/indexmap-rs/indexmap", "commit": "41a870887c4c77adf665886e63df08f406bfe37a", + "setup": "cargo fetch -q"} +] diff --git a/eval/results/COVERAGE.md b/eval/results/COVERAGE.md new file mode 100644 index 0000000..c4241e1 --- /dev/null +++ b/eval/results/COVERAGE.md @@ -0,0 +1,56 @@ +# What checks each gitnext function + +Three levels, strongest first. A command on the last level answers on real code but nobody has checked +that the answer is right. + +## 1. Measured against the truth (10 projects, 5 languages; the truth is the project's own compiler and tests) + +`eval/run.py` — numbers and their noise thresholds in `latest.md`, history in `HISTORY.md`. + +| function | what is measured | result | +|---|---|---| +| `callers` (and the callers part of `look`, `impact`) | found / correct, against compile errors after the definition is renamed | 100% ±1 / 99% ±1 (232 functions) | +| … methods that share a name | found, and found counting "maybe" | 83% ±6 / 98% ±2 (108) | +| `rename` | the project still compiles and its tests pass | 91% ±3 (338) | +| `tests-for` (and the tests part of `look`, `check`) | failing tests found; at least one of the first 10 fails | 49% ±6; 79% ±6 (167). TypeScript: 19% | +| `learn-tests` (Python, Go, Rust) | the same with the learned map (`learn_tests.py`, `learn_tests_go.py`, `learn_tests_rust.py`) | 100% of the failing tests in all three (the graph: 19% on click, Go 78%, Rust 59%) | +| `why`, `check ` | place of the function at fault for a seeded bug (`why_rank.py`, `why-rank.md`) | with the learned map the culprit is first in 81% of 57 seeded bugs (Python 90%, Go 82%, Rust 70%); from the call graph alone in 18% | +| the tools as a small model uses them | `agent.py`, Qwen 3.5 4B: find / callers / rename / fix | see the agent runs in `HISTORY.md` | + +## 2. Unit tests (`cargo test --workspace`, 115 tests) + +| function | tests | +|---|---| +| parsers: Rust, Python, Go, Java, TS, JS, C, C++ | fixtures with the expected output in eight languages (`gitnext-parse/tests/fixtures`) and unit tests in the parsers | +| call graph: receiver types, results of functions, library results | `gitnext-index/tests` (10) | +| `rename`, `impact` of a rename | `rename_impact.rs`, `rename_more.rs` (11) | +| `ops`, `undo --op` (operation journal) | `oplog.rs` (11) | +| `digest` | `digest.rs` (10, on saved output of real tools) | +| `why` | `why.rs` (11) | +| `tests-for`, the learned map | `tests_for.rs`, `testmap.rs` (8) | +| `learn-tests`: Go, Rust | unit tests of the parsers of coverage output, and one end-to-end test each (skipped without `go` / `llvm-tools`) | +| `check`, `context`, `locate`, `outline` | 3, 4, 2, 1 | +| semantic diff (`diff`, `since`, `changelog`), `libs`, `setup`, MCP server, TUI | 4, 3, 3, 2, 3 | + +## 3. Answers on every project, correctness not checked (`eval/smoke.py`, `smoke.md`) + +Every command and every MCP tool is called once on each of the 10 projects with a real function, class, +file and folder: 86 commands and tools × 10 = 860 calls, none failed, crashed, came back empty or took 20 s. + +Only this level: `callees`, `hierarchy`, `deps`, `search`, `read`, `show`, `symbols`, `map`, `overview`, +`activity`, `hotspots`, `dead`, `cycles`, `entrypoints`, `history`, `brief`, `journal`, `bench`, `branches`, +`timeline`, `msg`, `status`, `add`, `reset`, `commit`, `undo`, `edit replace / insert / delete`, and `look` +as a whole (its parts are on level 1; that the parts are put together right is not checked). + +## Not checked at all + +`tui` beyond three unit tests, `lsp` (needs language servers), `explain` (needs a model), `hook`, `init` on an +empty folder, what `doctor` and `setup` write for each agent. + +## What would move level 3 up + +- `callees`, `impact`, `look`: must agree with `callers` — if B is among the callers of A, A is among the callees + of B and B is in the impact of A. One script over the eval's own truth. +- `dead`: delete what it names and see that the project still compiles and its tests pass. +- `hierarchy`: against compile errors after a method is removed from the base type. +- `search`, `read`, `outline`: exactness against the source (the lines printed are the lines of the symbol). diff --git a/eval/results/HISTORY.md b/eval/results/HISTORY.md new file mode 100644 index 0000000..159c093 --- /dev/null +++ b/eval/results/HISTORY.md @@ -0,0 +1,355 @@ +# Eval history + +Ground truth comes from each project's compiler and test suite, see `eval/run.py`. +Runs 1–5: five repos (one per language), one sample (seed 7, 8 functions, 4 mutants per repo). +From run 6 on: ten repos, 20 functions and 8 mutants per repo, three seeds, and a threshold next to every number. +Since the run after run 4, a rename only counts as ok if the project's tests still pass too. + +## The agent runs · a 4B local model with and without gitnext + +`eval/agent.py` (`sh eval/run_agent_mac.sh`): Qwen 3.5 4B on llama.cpp, the projects click (Python) and semver (Rust). +Four kinds of task — find where a function is, who calls it, rename it everywhere, fix a seeded bug — judged by the +project's own compiler and tests. `plain`: read, grep, edit, run. `gitnext`: the same plus look, rename, replace, check. +`verify`: gitnext, and an answer given before any tool call or a change that does not pass `gitnext check` goes back +to the model. `lite`: only the five tools of `gitnext mcp --profile lite`. + +| run | tasks per mode | plain | gitnext | verify | lite | +|---|---:|---:|---:|---:|---:| +| 1 (8 tasks × 3) | 24 | 3 | 11 | | | +| 2 | 24 | 4 | 14 | 14 | | +| 3 (`why` added) | 24 | 4 | 15 | 17 | | +| 4 (find, callers, rename only) | 18 | | 14 | | 17 | +| 5 (fix only; stopped at 22 of 24) | 11 | | 2 | | 1 | + +Run 3 by kind, 6 tasks each (plain → gitnext → verify): find 4 → 6 → 6, who calls 0 → 3 → 6, rename 0 → 6 → 5, fix 0 → 0 → 0. +Run 4: tokens sent to the model, all 18 tasks: 34.0 k with eleven tools, 28.8 k with five. + +What the conversations showed, and what was changed after each run: +- without gitnext the model guesses file paths (`src/processing.py`) and looks for `*.py` in a Rust project; +- told "the test `test_greater_than` fails" it asked for `greater_than`, found nothing and invented a function — + hence `gitnext why ` / `check `: run the test, give the failure and the code to look at; +- it writes the corrected function as text instead of calling `replace` — the harness now puts such a function in + place and checks it (as it already did with tool calls written as text); +- all 5 lost runs of run 4 were answers given before any tool call — every gitnext mode now sends such an answer back; +- run 5, the first `fix` tasks solved (click 3 of 12, with the coverage map; semver 0 of 10, without one): where + the model called `check ` and the map was there, the culprit was first 5 times of 5 and 3 were solved; in + the other two it did not see the wrong line — hence the changed lines in the answer of `why`. + +## Run 8 · in TypeScript the test is the file; coverage maps for Go and Rust + +**tests-for, TypeScript.** `it('…', () => …)` is not a named function; its calls are booked to the module of the +test file, and `tests-for` dropped everything that is not a function. A test file's module now counts as a test. +Paired comparison with run 7 on the same functions (`--compare`): only yaml and zustand moved, every metric up. + +| yaml (21 functions) | run 7 | run 8 | difference, 90% interval | +|---|---:|---:|---| +| tests recall | 1.9% | 18.0% | +16.1 (+7.8 … +25.1) | +| tests precision | 15.9% | 30.8% | +14.9 (+5.5 … +25.9) | +| caught by the top 10 | 23.8% | 38.1% | +14.3 (+4.8 … +28.6) | + +All languages: tests recall 47% → 49% ±6, caught by the top 10: 77% → 79% ±6; TypeScript 3% → 19% ±10 and 27% → 41% ±19. +Why it stops there (`learn-tests-yaml.causes.md`): paths deeper than 4 calls, "maybe" edges, exports under another +name. A coverage map per test file finds 100% on both TypeScript projects (`learn_tests_js.py`) for 2.3–6.2 plain test runs. + +**learn-tests, Go and Rust.** The prototypes are in the product (`learn/go.rs`, `learn/rust.rs`): the map of cobra is +236 functions / 13 106 pairs and of semver 70 / 782 — the prototypes' numbers; chi 166 / 3 992 (164 / 3 826 plus two +of its four `init` functions, which now have entries of their own), indexmap 358 / 3 837 (43 of its 192 tests are +written inside a macro and are not symbols of the graph). + +**why with the map, Go** (`why-rank-go.md`, 17 seeded bugs in cobra and chi): the culprit is first in 35% from the +call graph and in 82% with the map, and among the 8 printed in 100% (52% from the graph). + +**why with the map, Rust** (`why-rank-rust.md`, 20 seeded bugs): the culprit is first in 15% from the call graph and +in 70% with the map; semver 10 of 10 (2 of 10 from the graph), indexmap 4 of 10 — its other 6 fail only in tests made +by a macro. Two things found on the way: the first line of a function was not counted for Rust (one-line functions +lost), and `impl Display` / `impl Debug` of one type share a qualified name — the map compared the code of one with +the hash of the other and marked an untouched function "changed". + +## `why` · where the function at fault is in the list (37 seeded bugs) + +`eval/why_rank.py`: one operator is changed inside a function (as `eval/agent.py` does for its `fix` tasks), a test +that passed starts failing, and `gitnext why --json` is asked. Known answer: the changed function. +Table: `why-rank.md`. `GITNEXT=… python3 eval/why_rank.py --repos click,sqlparse,semver,cobra --bugs 10 --learn --variants static,nochange,default`. + +| what `why` ranks | projects | bugs | first | in the first 3 | in the first 8 (what is printed) | in the list | +|---|---|---:|---:|---:|---:|---:| +| the call graph | all four | 37 | 4 (10%) | 6 (16%) | 11 (29%) | 22 | +| the call graph | click, sqlparse | 20 | 1 (5%) | 2 (10%) | 4 (20%) | 9 | +| learned coverage, rarest first | click, sqlparse | 20 | 4 (20%) | 10 (50%) | 16 (80%) | 20 | +| learned coverage + "changed since `learn-tests`" | click, sqlparse | 20 | 18 (90%) | 19 (95%) | 20 (100%) | 20 | + +- The call graph alone is not enough to name the culprit: almost every test of a project reaches the same code, so + counting the tests that reach a function ("rare first") moved nothing (3 → 3 → 2 first of 40 in the three orders + tried), and in 15 of 37 the culprit is not reachable through the graph at all (a CLI runner, a filter stack, `format!`). +- Coverage of the failing test contains the culprit every time (20 of 20) and the list is short enough for 8 lines in 80%. +- "Changed since the map was learned" is what puts it first. It is fair for the common case — the tests passed when + the map was learned and something was changed since — and says nothing about a bug that was always there: + that case is the "rarest first" row. +- Go and Rust have no map yet (`learn-tests` knows Python): cobra 1 of 7 first, semver 2 of 10. +- 3 of the 10 cobra bugs had only a test that fails on the untouched code as well (it expects a permission error and + the eval runs as root): `seed_bug` now leaves such tests out. + +## Run 7 · the renames that broke the code + +Run 6 showed that 58 of 337 renames left a project that does not build or pass its tests. This run fixes the +causes that are gitnext's own; same functions as run 6 (click picked one more), `a → b` is run 6 → now. + +| rename ok (tests pass) | all | go | python | typescript | java | rust | +|---|---:|---:|---:|---:|---:|---:| +| run 6 | 83% ±4 | 90% ±6 | 73% ±8 | 70% ±13 | 96% ±3 | 74% ±12 | +| now | **91% ±3** (338) | 90% ±6 | **90% ±5** | 85% ±10 | 96% ±3 | 87% ±10 | + +25 renames fixed, none broken (click 66% → 86%, sqlparse 81% → 90%, yaml 69% → 85%, indexmap 70% → 85%). +The difference is real for all repos and for Python (larger than the threshold); TypeScript and Rust moved by +about their threshold. Python tests-for moved with it: tests recall 30% → 36% ±10, caught by the top 10 +74% → 81% (click: recall 21% → 31%, top-10 that fail 40% → 53%) — inside the threshold for the language. + +What was wrong: +- **Python, calls inside nested functions were not seen at all** (decorators, closures: `def decorator(f): def + new_func(): ctx.find_object(…)`). They now belong to the function they are written in. +- **Python, a call through the package** — `click.style(…)` in tests and examples, where `click/__init__.py` + re-exports `style` from `click.termui` — was not resolved. Also `click._compat.f(…)` (a dotted module path), + `@ctx.call_on_close` (a decorator through a receiver), a bare name used as a value + (`f = hidden_prompt_func if hide else visible_prompt_func`), and a loop variable that has the name of an + imported function (`for name, command in …: command.get_short_help_str()`) read as that function. +- **Rust, a name inside a `use` group** (`use crate::util::{third, slice_eq};`) kept the old name. +- **TypeScript, a `#private` member** was refused with the `#` and became public without it. + +What is left (31 of 338), by cause: a method whose name is unique in the repo takes the calls of a library +method through a receiver of unknown type and is renamed there (`t.Execute`, `ctx.Value`, `resp.Body.Close`, +`re.Match.start`, `number[].unshift`, `Stream.findFirst`) — 8; a method that implements a library interface +cannot be renamed at all (`error.Error`, `Map.Entry.getValue`, `Iterator.hasNext`) — 3; a use through a receiver +whose type gitnext does not know, inside a macro or as a value in an object literal is left behind +(`bar.update(1)`, `map.contains_key(k)` in `assert!`, `resolve: resolvePairs`) — 7; `--text` renames a string +that is data (`'warn'` in a union type) — 2; TypeScript `YAML.parseDocument(…)` through a namespace import — 2; +tests fail and the cause is not looked at yet (cobra 3, click 2, sqlparse 4) — 9. + +**After that, measured in pairs** (`--compare`: both versions on the same functions, the difference taken +per function). Two guards against wrongly "sure" callers were tried and thrown out — "several types of that name → +maybe" (shared names recall −1.5, worse) and "unknown receiver → maybe even when the name is unique" (callers recall +−2.9, picked blind −8.9, worse). What stays: `f().m()` where `f` returns a library type is "maybe" +(`c.PersistentFlags().HasFlags()`, `r.Context().Value(…)`): callers precision 98.6% → 99.4% (+0.8, interval ++0.2 … +1.6), Go 96.3% → 98.2% (+2.0, +0.2 … +4.2), nothing else moves. `rename` leaves such a call alone where it +is known — `f` is a repo function with a library result, or a Go package function (`template.New(…).Execute`): +cobra `Execute` and `HasFlags` fixed, rename ok 90.8% → 91.4% (Go 90% → 93%). A wider rule also skipped +`assertInstanceOf(TextNode.class, n).getWholeText()` and broke one jsoup rename — a library call can hand a repo +object on. 29 of 338 renames still fail. + +## Run 6 · a sample large enough to tell a change from noise + +The measurement changed, so these numbers are a new starting point. `a → b` below: the code of run 5 +(`run6-before.json`) → gitnext with the Rust receiver types, `callers` for several names and the tests-for +changes that followed it (`run6-seeds.json`), both measured the new way on the same functions. + +- **A second repo per language**: chi (Go), sqlparse (Python), yaml (TypeScript), json-java (Java), indexmap (Rust). +- **20 functions and 8 mutants per repo, seeds 7, 8, 9.** A function that several seeds picked is measured once. + Checked now (run 5 in brackets): rename 337 functions (30), callers 232 (22), shared names 108 (10), mutants 166 (16). +- **A threshold for every number**, written as `77% ±6 (20)`. The functions are drawn again 2000 times (bootstrap); + the ± is half the 90% interval of the mean, and never less than what one function weighs (100 / functions). + A change smaller than the ± is noise. `--check` uses the same thresholds per repo instead of one 5-point tolerance. + +| all repos | mean | functions | 90% interval | on seed 7 / 8 / 9 | 2 × SD of the seeds | threshold | +|---|---:|---:|---:|---:|---:|---:| +| callers recall | 99.8% | 232 | 100–100% | 100 / 100 / 100 | 0.2 | ±1 | +| callers precision | 98.6% | 232 | 98–100% | 98 / 100 / 98 | 2.0 | ±1 | +| callers recall, picked blind | 99.2% | 163 | 98–100% | 100 / 98 / 100 | 1.6 | ±1 | +| shared names: recall | 83.2% | 108 | 78–89% | 85 / 83 / 80 | 5.0 | ±6 | +| shared names: recall with maybe | 97.6% | 108 | 96–99% | 99 / 97 / 97 | 1.8 | ±2 | +| shared names: precision | 99.5% | 93 | 99–100% | 100 / 100 / 99 | 0.6 | ±2 | +| rename ok (tests pass) | 82.8% | 337 | 80–86% | 85 / 85 / 80 | 6.2 | ±4 | +| tests recall | 45.4% | 166 | 40–51% | 42 / 51 / 51 | 10.4 | ±6 | +| tests precision | 47.1% | 166 | 42–52% | 44 / 49 / 53 | 9.0 | ±6 | +| top-10 that fail | 50.9% | 166 | 46–56% | 47 / 55 / 56 | 9.8 | ±6 | +| … best possible order | 60.5% | 166 | 55–66% | 55 / 64 / 65 | 11.2 | ±6 | +| caught by the top 10 | 75.3% | 166 | 70–81% | 71 / 76 / 82 | 11.8 | ±6 | +| look / file | 19.3% | 337 | 17–22% | 21 / 19 / 18 | 2.6 | ±3 | + +A seed is one sample of 20 per repo, the mean is over all three, so two seeds differ by more than the threshold of +the mean — the two columns agree (2 × SD ≈ threshold × √3). On one seed (all repos, about 55 mutants) the +tests-for numbers move by 9–12 points; in one repo (16–23 mutants) their threshold is 10–18 points. + +| per language | all | go | python | typescript | java | rust | +|---|---:|---:|---:|---:|---:|---:| +| callers recall | 100% ±1 (232) | 100% ±2 (71) | — | 100% ±3 (39) | 100% ±2 (85) | 99% ±3 (37) | +| callers precision | 99% ±1 (232) | 96% ±3 (71) | — | 100% ±3 (39) | 99% ±2 (85) | 100% ±3 (37) | +| callers recall, picked blind | 99% ±1 (163) | 100% ±3 (40) | — | 100% ±3 (34) | 98% ±3 (63) | 100% ±4 (26) | +| shared names: recall | 83% ±6 (108) | 73% ±23 (11) | — | 65% ±25 (10) | 90% ±6 (56) | 80% ±11 (31) | +| shared names: recall with maybe | 98% ±2 (108) | 100% ±10 (11) | — | 90% ±10 (10) | 97% ±3 (56) | 100% ±4 (31) | +| shared names: precision | 100% ±2 (93) | 100% ±13 (8) | — | 100% ±15 (7) | 100% ±2 (52) | 99% ±4 (26) | +| rename ok (tests pass) | 83% ±4 (337) | 90% ±6 (81) | 73% ±8 (92) | 70% ±13 (40) | 96% ±3 (86) | 74% ±12 (38) | +| tests recall | 45% ±6 (166) | 79% ±9 (37) | 30% ±10 (42) | 3% ±5 (22) | 49% ±12 (43) | 53% ±14 (22) | +| tests precision | 47% ±6 (166) | 47% ±11 (37) | 49% ±11 (42) | 20% ±12 (22) | 61% ±10 (43) | 43% ±14 (22) | +| top-10 that fail | 51% ±6 (166) | 54% ±11 (37) | 52% ±11 (42) | 20% ±12 (22) | 67% ±9 (43) | 44% ±14 (22) | +| … best possible order | 60% ±6 (166) | 75% ±10 (37) | 58% ±11 (42) | 20% ±12 (22) | 80% ±8 (43) | 44% ±14 (22) | +| caught by the top 10 | 75% ±6 (166) | 84% ±10 (37) | 74% ±12 (42) | 27% ±16 (22) | 95% ±6 (43) | 73% ±14 (22) | +| look / file | 19% ±3 (337) | 14% ±4 (81) | 17% ±4 (92) | 54% ±12 (40) | 14% ±4 (86) | 14% ±6 (38) | + +Per repo: `latest.md`; every number with its interval and its value on each seed: `run6-seeds.json`. + +**The first use of the thresholds** — what the changes in gitnext since run 5 did, on the same functions: + +| | a → b | threshold | | +|---|---:|---:|---| +| shared names: recall, all repos | 71% → 83% | ±7 | real | +| shared names: recall, Rust | 34% → 80% (28 → 31 methods) | ±13 | real | +| shared names: recall with maybe, Rust | 89% → 100% | ±8 | real | +| shared names: recall with maybe, all repos | 95% → 98% | ±3 | at the threshold | +| tests recall, Rust | 49% → 53% | ±14 | noise | +| caught by the top 10, Rust | 68% → 73% | ±16 | noise | +| every other number, all repos | moves by 0–0.6 points | ±1 … ±6 | noise | + +What 8 functions per repo did not show: + +- **rename ok was 100% everywhere; on 337 functions it is 83% ±4** (cobra 87, chi 94, click 66, sqlparse 81, yaml 69, + jsoup 96, json-java 97, indexmap 70). Of the 58 renames that fail: 22 do not compile, 28 break tests, 6 gitnext + refuses (`#private` methods in TypeScript: "not a valid identifier"), 2 leave a test suite that does not start. + Seen causes: `--text` renames a method of another type with the same name (`template.Execute`, `io.ReadCloser.Close`, + `string[].unshift`) and string literals (`'warn'`, `'flow'`); a method that implements an interface of a library + is renamed (`error.Error`, `Map.Entry.getValue`, `Iterator.hasNext`); uses are left behind — through the package + (`click.format_filename(…)`, `sqlparse.parse(…)`) and in a Rust `use crate::util::{a, b, third}` list (7 of the + 10 failures in indexmap). +- **tests-for in yaml finds 2% ±5 of the failing test files**: the tests are anonymous `test('…', () => …)` callbacks + in `tests/*.ts`, there is no named test function to reach through the call graph. +- **callers recall does not depend on how the functions are picked.** The samples hold only functions gitnext finds a + caller for. Picked blind (the first 20 of the same order, whatever gitnext sees), 163 functions have uses the + compiler names, and gitnext misses all callers of one of them (`Safelist.isSafeTag` in jsoup): 99.2% ±1. + +Errors of the measurement, found and fixed on the way (the answers taken the old way are not used): + +- **Go: seven cobra tests failed under every mutant.** The tests were run one at a time from a binary named + `.gnx.test`; cobra reads the command line as its own arguments unless the binary is called `cobra.test`. The binary + keeps the name `go test` gives it, and tests that fail alone on the untouched commit are part of the baseline. + cobra on the sample of run 5: tests recall 82% → 96%, precision 17% → 22%, top-10 that fail 30% → 28%, + caught by the top 10 100% → 50% (the seven tests made every top 10 look like a hit). +- **Python: the list of failing tests was cut and polluted.** `| tail -400` kept the last 400 lines of the pytest + summary: 4 of 24 click mutants fail more tests than that (372 test names became 122, 365 → 122, 353 → 102, + 288 → 102). The name of a parametrized case was taken from inside its id (`test_x[a::integer]` → `integer`): + 9 of 24 sqlparse mutants had such names in their truth. The sample of run 5 (4 click mutants) was not affected. +- **Python: a test module that no longer imports stopped the run** ("Interrupted: 1 error during collection") and + read as "no test fails". The suite now continues past it and every test of such a module counts as failing. No + mutant of this sample hit it, but four click renames that had passed this way now fail (click rename ok 74% → 66%). +- **Python: a test is `file::name` now**, a bare name merged tests of the same name in different files. +- **Rust: code behind a feature was not compiled** (`cargo check --tests`), so real callers in indexmap's `rayon` + and `serde` modules counted as wrong: callers precision 90% → 100% with `--all-features`. Benches (they need + nightly there) are left out of what gitnext found. + +Cost. The verdict on a rename (build + tests) is kept per distinct edit, like the other answers of the compilers +and test suites, and `gitnext callers` is asked about 40 functions at once, so a second run only asks gitnext +again: all ten repos, three seeds — 3 min 17 s (jsoup 2 min 7 s; with one name per `callers` run it was 5 min 48 s +of 7 min 41 s). With an empty cache the compilers and test suites work for about 240 minutes (jsoup 103, yaml 45, +chi 34, json-java 29). CI runs one seed of 8 functions and 4 mutants (about 55 minutes of that with an empty +cache, under a minute after) and keeps `truth.json` between runs. + +**Checked at acceptance.** The same sample run again gives the same numbers; sqlparse, semver and a small sample of +chi asked from scratch (121 answers of the compilers and test suites) give the same answers. One more error of the +measurement came up: `go build ./...` skips directories that start with `_` (chi's `_examples`), so the real callers +there counted as wrong. They are left out now, like Rust benches: callers precision chi 91% → 97%, Go 94% → 96% ±3, +all repos 97.9% → 98.6% ±1 (the tables above hold the new numbers). What is left in Go is gitnext's own error: +a method whose name is unique in the repo takes the calls of a library method of the same name +(`ctx.Value(…)` → `endpoints.Value`, `c.Flags().HasFlags()` → `Command.HasFlags`). + +## Run 5 · the ground truth was wrong in three places + +Three numbers in the tables below were errors of the measurement, not of gitnext: + +- **jsoup callers precision 47%.** Maven recompiles only the files that changed, so after renaming a definition the + "compiler" never looked at callers in other files. Every "wrong" caller gitnext reported was real. Now every class is + recompiled, and the uses the compiler names are fixed and compiled again until the build passes (javac and rustc stop + at the first failing class / crate). +- **jsoup rename ok "with tests", jsoup tests-for "—".** `mvn -o test` never started (the surefire plugin had not been + downloaded by the setup), and a suite that does not run has no failures. The setup now runs one test, and every check + fails loudly if the baseline suite did not run. +- **cobra tests precision 1%.** A Go `panic` kills the whole test binary: only the first test that reached the broken + function was reported. Go tests of a mutant are now run one at a time. + +Two measures are new: + +- **shared names** — callers of methods whose name several types share (`release`, `isWhitespace`…): only the receiver's + type tells them apart. Sure callers, and in brackets sure + "maybe". +- **top-10** — of the 10 tests `tests-for` names first, how many really fail (in brackets: the best any order of the + same list could reach), and **caught**: whether at least one of the ten fails. + +What the compilers and test suites said is cached in `eval/.work/truth.json`, so a re-run only re-asks gitnext. + +Same sample as before (seed 7, 8 functions, 4 mutants per repo). `a → b`: the code of run 4 (`run5-before.json`) → now, +both against the fixed ground truth. + +| | cobra | click | zustand | jsoup | semver | +|---|---:|---:|---:|---:|---:| +| callers recall | 100% | — | 100% | 100% | 100% | +| callers precision | 97% | — | 100% | 100% | 100% | +| shared names: recall | 100% | — | — | 74% → 77% | 25% | +| shared names: recall with maybe | 100% | — | — | 96% | 50% | +| shared names: precision | 100% | — | — | 100% | 100% | +| rename ok (tests pass) | 100% | 100% | 100% | 100% | 100% | +| tests recall | 82% | 19% | 33% | 14% → 19% | 61% | +| tests precision | 16% → 17% | 41% → 41% | 100% | 66% → 68% | 51% → 64% | +| top-10 that fail | 22% → 30% | 45% → 48% | 100% | 60% → 62% | 57% → 67% | +| … best possible order | 78% | 62% | 100% | 75% | 67% | +| caught by the top 10 | 100% | 75% | 100% | 75% | 67% | + +What changed in gitnext for this run: + +- `tests-for` puts the tests most likely to fail first (direct calls, tests named after the function, then by + distance), names 10 and gives one command for whole test files; helpers in test files are no longer listed as tests. +- A receiver known only as "what that function returns" (`x := getPool(); x.release()`, `getPool().release()`, + `new Store().load()`, casts) gets the declared result type (Go, Java, TS/JS). In jsoup, of 36912 calls, those + resolved to exactly one target went from 12173 to 13288 and the ambiguous ones from 12003 to 11390. + +The tables below are the earlier runs, measured the old way. + +## callers recall + +| run | cobra | click | zustand | jsoup | semver | +|---|---:|---:|---:|---:|---:| +| 1 · before | 100% | — | 33% | 100% | 85% | +| 2 · receiver types | 100% | — | 50% | 100% | 85% | +| 4 · fields, anon classes, Rust types | 100% | — | 50% | 100% | 85% | +| now · rename checked by tests | 100% | — | 50% | 100% | 93% | + +## callers precision + +| run | cobra | click | zustand | jsoup | semver | +|---|---:|---:|---:|---:|---:| +| 1 · before | 97% | — | 100% | 48% | 100% | +| 2 · receiver types | 97% | — | 100% | 48% | 100% | +| 4 · fields, anon classes, Rust types | 97% | — | 100% | 47% | 100% | +| now · rename checked by tests | 97% | — | 100% | 47% | 100% | + +## rename ok + +| run | cobra | click | zustand | jsoup | semver | +|---|---:|---:|---:|---:|---:| +| 1 · before | 88% | 100% | 100% | 88% | 80% | +| 2 · receiver types | 100% | 100% | 0% | 62% | 80% | +| 4 · fields, anon classes, Rust types | 100% | 100% | 100% | 100% | 80% | +| now · rename checked by tests | 100% | 100% | 100% | 100% | 100% | + +## tests recall + +| run | cobra | click | zustand | jsoup | semver | +|---|---:|---:|---:|---:|---:| +| 1 · before | 17% | 3% | — | — | 1% | +| 2 · receiver types | 83% | 19% | — | — | 1% | +| 4 · fields, anon classes, Rust types | 100% | 19% | — | — | 61% | +| now · rename checked by tests | 100% | 19% | — | — | 61% | + +## tests precision + +| run | cobra | click | zustand | jsoup | semver | +|---|---:|---:|---:|---:|---:| +| 1 · before | 1% | 25% | — | — | 6% | +| 2 · receiver types | 1% | 41% | — | — | 6% | +| 4 · fields, anon classes, Rust types | 1% | 41% | — | — | 51% | +| now · rename checked by tests | 1% | 41% | — | — | 51% | + +## Known gaps + +- "Reaches" is a superset of "fails when it breaks": in cobra most tests reach a function through `Execute`, and the + call graph cannot tell which of them take that branch — the top 10 hold 30% failing tests where the best order of the + same list would hold 78%. Coverage from one real test run (`learn-tests`) is the way to close this. +- click (Python): tests go through `CliRunner.invoke` and decorators; the graph sees few of those calls (tests recall 19%). +- Rust: methods whose name several types share are found for 25% of callers (50% with "maybe") — field receivers + (`self.identifier.is_empty()`) and operator traits (`==` → `PartialEq::eq` → `ptr_eq`) are invisible to the graph. +- jsoup: tests recall 19% — breaking a hub function fails 450–1750 tests; the walk (4 hops) reaches a fraction of them. +- The samples are small (zustand: one function; shared names in cobra: one, in semver: two). diff --git a/eval/results/latest.json b/eval/results/latest.json new file mode 100644 index 0000000..25c371b --- /dev/null +++ b/eval/results/latest.json @@ -0,0 +1,23691 @@ +[ + { + "repo": "cobra", + "lang": "go", + "commit": "adbc8813901b", + "index_seconds": 0.0, + "symbols": 288, + "files": 19, + "seeds": [ + 7, + 8, + 9 + ], + "edges": 5106, + "sample": [ + "main::Command::NamePadding", + "main::CheckErr", + "main::Command::CommandPathPadding", + "main::Command::GenPowerShellCompletionWithDesc", + "main::Command::Print", + "main::Command::OutOrStderr", + "main::Command::PrintErrf", + "main::MinimumNArgs", + "main::Command::Flags", + "main::Command::LocalFlags", + "main::Command::Println", + "main::Command::Execute", + "main::Command::CalledAs", + "main::Command::HasAvailableInheritedFlags", + "main::Command::Parent", + "main::CompError", + "main::CompErrorln", + "main::Command::LocalNonPersistentFlags", + "main::Command::ParseFlags", + "main::Command::InitDefaultCompletionCmd", + "main::Command::ValidateFlagGroups", + "main::Command::PrintErrln", + "main::Command::Help", + "main::Command::HasParent", + "main::Command::InitDefaultVersionFlag", + "main::Command::Commands", + "main::Command::HelpFunc", + "doc::GenMarkdownCustom", + "main::Command::GenBashCompletionV2", + "main::Command::InheritedFlags", + "main::Command::Root", + "doc::GenMarkdownTreeCustom", + "main::Command::FlagErrorFunc", + "main::Command::SetGlobalNormalizationFunc", + "main::Command::UseLine", + "main::Command::GenZshCompletion", + "main::flagCompError::Error", + "main::Command::HasPersistentFlags", + "main::Command::PrintErr", + "doc::GenYamlCustom", + "main::Command::HasSubCommands", + "main::Command::Traverse", + "main::Command::SuggestionsFor", + "main::Command::Usage", + "main::Command::ValidateArgs", + "main::Command::HasFlags" + ], + "sample_common": [ + "main::Command::MarkFlagRequired" + ], + "samples": { + "7": [ + "main::Command::NamePadding", + "main::CheckErr", + "main::Command::CommandPathPadding", + "main::Command::GenPowerShellCompletionWithDesc", + "main::Command::Print", + "main::Command::OutOrStderr", + "main::Command::PrintErrf", + "main::MinimumNArgs", + "main::Command::Flags", + "main::Command::LocalFlags", + "main::Command::Println", + "main::Command::Execute", + "main::Command::CalledAs", + "main::Command::HasAvailableInheritedFlags", + "main::Command::Parent", + "main::CompError", + "main::CompErrorln", + "main::Command::LocalNonPersistentFlags", + "main::Command::ParseFlags", + "main::Command::InitDefaultCompletionCmd" + ], + "8": [ + "main::Command::ValidateFlagGroups", + "main::Command::PrintErrln", + "main::Command::Help", + "main::Command::CalledAs", + "main::Command::CommandPathPadding", + "main::CompErrorln", + "main::Command::HasParent", + "main::Command::InitDefaultVersionFlag", + "main::Command::Commands", + "main::Command::Parent", + "main::Command::HelpFunc", + "main::MinimumNArgs", + "main::Command::OutOrStderr", + "doc::GenMarkdownCustom", + "main::Command::GenBashCompletionV2", + "main::Command::InitDefaultCompletionCmd", + "main::Command::InheritedFlags", + "main::Command::Root", + "doc::GenMarkdownTreeCustom", + "main::Command::NamePadding" + ], + "9": [ + "main::Command::FlagErrorFunc", + "main::Command::SetGlobalNormalizationFunc", + "main::Command::UseLine", + "main::Command::GenZshCompletion", + "main::Command::GenPowerShellCompletionWithDesc", + "main::Command::LocalFlags", + "main::flagCompError::Error", + "main::Command::Root", + "main::Command::HasPersistentFlags", + "main::Command::OutOrStderr", + "main::Command::PrintErr", + "doc::GenYamlCustom", + "main::Command::CalledAs", + "main::Command::HasSubCommands", + "main::Command::Traverse", + "main::Command::SuggestionsFor", + "main::Command::Usage", + "main::Command::ValidateArgs", + "main::Command::HasFlags", + "main::Command::InitDefaultVersionFlag" + ] + }, + "samples_common": { + "7": [ + "main::Command::MarkFlagRequired" + ], + "8": [ + "main::Command::MarkFlagRequired" + ], + "9": [ + "main::Command::MarkFlagRequired" + ] + }, + "samples_blind": { + "7": [ + "main::Command::NamePadding", + "main::Command::SetHelpFunc", + "main::Command::HasLocalFlags", + "main::CheckErr", + "main::Command::CommandPathPadding", + "main::Command::VersionTemplate", + "main::Command::RegisterFlagCompletionFunc", + "main::Command::GenPowerShellCompletionWithDesc", + "main::Command::Print", + "main::Command::OutOrStderr", + "main::AddTemplateFunc", + "main::Command::PrintErrf", + "main::FixedCompletions", + "main::MinimumNArgs", + "main::Command::Flags", + "main::Command::LocalFlags", + "main::Command::Println", + "main::Command::Execute", + "main::Command::SetHelpCommand", + "main::Command::UsagePadding" + ], + "8": [ + "main::Command::ValidateFlagGroups", + "main::Command::PrintErrln", + "main::Command::Help", + "main::Command::CalledAs", + "main::Command::CommandPathPadding", + "main::Command::MarkZshCompPositionalArgumentFile", + "main::Command::GenBashCompletionFile", + "main::CompErrorln", + "main::Command::HasParent", + "main::Command::AddGroup", + "main::Command::InitDefaultVersionFlag", + "main::Command::Commands", + "main::Command::SetHelpCommand", + "main::Command::Parent", + "main::Command::HelpFunc", + "main::MinimumNArgs", + "main::Command::OutOrStderr", + "doc::GenMarkdownCustom", + "main::Command::GenBashCompletionV2", + "main::Command::SetUsageTemplate" + ], + "9": [ + "main::Command::FlagErrorFunc", + "main::Command::DebugFlags", + "main::CompDebugln", + "main::Command::SetGlobalNormalizationFunc", + "main::Command::UseLine", + "main::Command::GenZshCompletion", + "main::Command::GenPowerShellCompletionWithDesc", + "main::Command::LocalFlags", + "main::RangeArgs", + "main::flagCompError::Error", + "main::Command::Root", + "doc::GenYaml", + "main::Command::ResetCommands", + "main::Command::HasPersistentFlags", + "main::Command::SetFlagErrorFunc", + "main::Command::OutOrStderr", + "main::Command::SetUsageFunc", + "doc::GenReST", + "main::CompletionOptions::SetDefaultShellCompDirective", + "main::Command::PrintErr" + ] + }, + "baseline_failing_tests": [ + "TestFailGenFishCompletionFile" + ], + "callers": [ + { + "symbol": "main::Command::NamePadding", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::CheckErr", + "truth": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString", + "main::WriteStringAndCheck" + ], + "found": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString", + "main::WriteStringAndCheck" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::CommandPathPadding", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "truth": [ + "main::Command::InitDefaultCompletionCmd" + ], + "found": [ + "main::Command::InitDefaultCompletionCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Print", + "truth": [ + "main::Command::ParseFlags", + "main::Command::Printf", + "main::Command::Println" + ], + "found": [ + "main::Command::ParseFlags", + "main::Command::Printf", + "main::Command::Println", + "main::preExecHook" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.75, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::OutOrStderr", + "truth": [ + "main::Command::Print", + "main::Command::UsageFunc" + ], + "found": [ + "main::Command::Print", + "main::Command::UsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::PrintErrf", + "truth": [ + "main::Command::ExecuteC" + ], + "found": [ + "main::Command::ExecuteC" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::MinimumNArgs", + "truth": [ + "main::Command::initCompleteCmd" + ], + "found": [ + "main::Command::initCompleteCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Flags", + "truth": [ + "main::Command::ArgsLenAtDash", + "main::Command::Flag", + "main::Command::HasAvailableFlags", + "main::Command::HasFlags", + "main::Command::InitDefaultCompletionCmd", + "main::Command::InitDefaultHelpFlag", + "main::Command::InitDefaultVersionFlag", + "main::Command::LocalFlags", + "main::Command::MarkFlagCustom", + "main::Command::MarkFlagDirname", + "main::Command::MarkFlagFilename", + "main::Command::MarkFlagRequired", + "main::Command::MarkFlagsMutuallyExclusive", + "main::Command::MarkFlagsOneRequired", + "main::Command::MarkFlagsRequiredTogether", + "main::Command::ParseFlags", + "main::Command::SetGlobalNormalizationFunc", + "main::Command::Traverse", + "main::Command::ValidateFlagGroups", + "main::Command::ValidateRequiredFlags", + "main::Command::argsMinusFirstX", + "main::Command::enforceFlagGroupsForCompletion", + "main::Command::execute", + "main::Command::getCompletions", + "main::Command::mergePersistentFlags", + "main::findFlag", + "main::helpOrVersionFlagPresent", + "main::stripFlags" + ], + "found": [ + "main::Command::ArgsLenAtDash", + "main::Command::Flag", + "main::Command::HasAvailableFlags", + "main::Command::HasFlags", + "main::Command::InitDefaultCompletionCmd", + "main::Command::InitDefaultHelpFlag", + "main::Command::InitDefaultVersionFlag", + "main::Command::LocalFlags", + "main::Command::MarkFlagCustom", + "main::Command::MarkFlagDirname", + "main::Command::MarkFlagFilename", + "main::Command::MarkFlagRequired", + "main::Command::MarkFlagsMutuallyExclusive", + "main::Command::MarkFlagsOneRequired", + "main::Command::MarkFlagsRequiredTogether", + "main::Command::ParseFlags", + "main::Command::SetGlobalNormalizationFunc", + "main::Command::Traverse", + "main::Command::ValidateFlagGroups", + "main::Command::ValidateRequiredFlags", + "main::Command::argsMinusFirstX", + "main::Command::enforceFlagGroupsForCompletion", + "main::Command::execute", + "main::Command::getCompletions", + "main::Command::mergePersistentFlags", + "main::findFlag", + "main::helpOrVersionFlagPresent", + "main::stripFlags" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::LocalFlags", + "truth": [ + "main::Command::HasAvailableLocalFlags", + "main::Command::HasLocalFlags", + "main::Command::InheritedFlags", + "main::Command::LocalNonPersistentFlags", + "main::Command::NonInheritedFlags", + "main::defaultUsageFunc" + ], + "found": [ + "main::Command::HasAvailableLocalFlags", + "main::Command::HasLocalFlags", + "main::Command::InheritedFlags", + "main::Command::LocalNonPersistentFlags", + "main::Command::NonInheritedFlags", + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Println", + "truth": [ + "main::Command::DebugFlags", + "main::Command::ExecuteC", + "main::Command::execute" + ], + "found": [ + "main::Command::DebugFlags", + "main::Command::ExecuteC", + "main::Command::execute", + "main::preExecHook" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.75, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Execute", + "truth": [ + "main::Command::ExecuteContext" + ], + "found": [ + "main::Command::ExecuteContext" + ], + "maybe": [ + "main::tmpl" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::CalledAs", + "truth": [ + "main::Command::initCompleteCmd" + ], + "found": [ + "main::Command::initCompleteCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::HasAvailableInheritedFlags", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Parent", + "truth": [ + "doc::GenMarkdownCustom", + "doc::GenReSTCustom", + "doc::GenYamlCustom", + "doc::genMan", + "main::Command::CommandPath", + "main::Command::HelpFunc", + "main::Command::IsAvailableCommand", + "main::Command::Root", + "main::Command::UsageFunc", + "main::Command::VisitParents", + "main::Command::execute" + ], + "found": [ + "doc::GenMarkdownCustom", + "doc::GenReSTCustom", + "doc::GenYamlCustom", + "doc::genMan", + "main::Command::CommandPath", + "main::Command::HelpFunc", + "main::Command::IsAvailableCommand", + "main::Command::Root", + "main::Command::UsageFunc", + "main::Command::VisitParents", + "main::Command::execute" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::CompError", + "truth": [ + "main::CompErrorln" + ], + "found": [ + "main::CompErrorln" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::CompErrorln", + "truth": [ + "main::Command::initCompleteCmd" + ], + "found": [ + "main::Command::initCompleteCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::LocalNonPersistentFlags", + "truth": [ + "main::Command::getCompletions", + "main::writeFlags" + ], + "found": [ + "main::Command::getCompletions", + "main::writeFlags" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::ParseFlags", + "truth": [ + "main::Command::Traverse", + "main::Command::execute", + "main::Command::getCompletions" + ], + "found": [ + "main::Command::Traverse", + "main::Command::execute", + "main::Command::getCompletions" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::InitDefaultCompletionCmd", + "truth": [ + "main::Command::ExecuteC" + ], + "found": [ + "main::Command::ExecuteC" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::ValidateFlagGroups", + "truth": [ + "main::Command::execute" + ], + "found": [ + "main::Command::execute" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::PrintErrln", + "truth": [ + "main::Command::ExecuteC", + "main::Command::HelpFunc", + "main::Command::UsageFunc" + ], + "found": [ + "main::Command::ExecuteC", + "main::Command::HelpFunc", + "main::Command::UsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Help", + "truth": [ + "main::Command::InitDefaultHelpCmd" + ], + "found": [ + "main::Command::InitDefaultHelpCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::HasParent", + "truth": [ + "doc::GenMarkdownCustom", + "doc::GenReSTCustom", + "doc::GenYamlCustom", + "doc::genMan", + "doc::hasSeeAlso", + "main::Command::CommandPath", + "main::Command::ErrPrefix", + "main::Command::ExecuteC", + "main::Command::FlagErrorFunc", + "main::Command::HelpFunc", + "main::Command::HelpTemplate", + "main::Command::IsAvailableCommand", + "main::Command::Root", + "main::Command::UsageFunc", + "main::Command::UsageTemplate", + "main::Command::UseLine", + "main::Command::VersionTemplate", + "main::Command::VisitParents", + "main::Command::getErr", + "main::Command::getHelpTemplateFunc", + "main::Command::getIn", + "main::Command::getOut", + "main::Command::getUsageTemplateFunc", + "main::Command::getVersionTemplateFunc", + "main::legacyArgs" + ], + "found": [ + "doc::GenMarkdownCustom", + "doc::GenReSTCustom", + "doc::GenYamlCustom", + "doc::genMan", + "doc::hasSeeAlso", + "main::Command::CommandPath", + "main::Command::ErrPrefix", + "main::Command::ExecuteC", + "main::Command::FlagErrorFunc", + "main::Command::HelpFunc", + "main::Command::HelpTemplate", + "main::Command::IsAvailableCommand", + "main::Command::Root", + "main::Command::UsageFunc", + "main::Command::UsageTemplate", + "main::Command::UseLine", + "main::Command::VersionTemplate", + "main::Command::VisitParents", + "main::Command::getErr", + "main::Command::getHelpTemplateFunc", + "main::Command::getIn", + "main::Command::getOut", + "main::Command::getUsageTemplateFunc", + "main::Command::getVersionTemplateFunc", + "main::legacyArgs" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::InitDefaultVersionFlag", + "truth": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::execute", + "main::Command::getCompletions" + ], + "found": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::execute", + "main::Command::getCompletions" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Commands", + "truth": [ + "doc::GenManTreeFromOpts", + "doc::GenMarkdownCustom", + "doc::GenMarkdownTreeCustom", + "doc::GenReSTCustom", + "doc::GenReSTTreeCustom", + "doc::GenYamlCustom", + "doc::GenYamlTreeCustom", + "doc::genMan", + "doc::hasSeeAlso", + "main::Command::InitDefaultHelpCmd", + "main::Command::getCompletions", + "main::defaultUsageFunc", + "main::gen", + "main::writeCommands" + ], + "found": [ + "doc::GenManTreeFromOpts", + "doc::GenMarkdownCustom", + "doc::GenMarkdownTreeCustom", + "doc::GenReSTCustom", + "doc::GenReSTTreeCustom", + "doc::GenYamlCustom", + "doc::GenYamlTreeCustom", + "doc::genMan", + "doc::hasSeeAlso", + "main::Command::InitDefaultHelpCmd", + "main::Command::getCompletions", + "main::defaultUsageFunc", + "main::gen", + "main::writeCommands" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::HelpFunc", + "truth": [ + "main::Command::ExecuteC", + "main::Command::Help" + ], + "found": [ + "main::Command::ExecuteC", + "main::Command::Help" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "doc::GenMarkdownCustom", + "truth": [ + "doc::GenMarkdown", + "doc::GenMarkdownTreeCustom" + ], + "found": [ + "doc::GenMarkdown", + "doc::GenMarkdownTreeCustom" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::GenBashCompletionV2", + "truth": [ + "main::Command::GenBashCompletionFileV2", + "main::Command::InitDefaultCompletionCmd" + ], + "found": [ + "main::Command::GenBashCompletionFileV2", + "main::Command::InitDefaultCompletionCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::InheritedFlags", + "truth": [ + "doc::GenYamlCustom", + "doc::manPrintOptions", + "doc::printOptions", + "doc::printOptionsReST", + "main::Command::HasAvailableInheritedFlags", + "main::Command::HasInheritedFlags", + "main::Command::getCompletions", + "main::completeRequireFlags", + "main::defaultUsageFunc", + "main::findFlag", + "main::writeFlags" + ], + "found": [ + "doc::GenYamlCustom", + "doc::manPrintOptions", + "doc::printOptions", + "doc::printOptionsReST", + "main::Command::HasAvailableInheritedFlags", + "main::Command::HasInheritedFlags", + "main::Command::getCompletions", + "main::completeRequireFlags", + "main::defaultUsageFunc", + "main::findFlag", + "main::writeFlags" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Root", + "truth": [ + "main::Command::ExecuteC", + "main::Command::InitDefaultCompletionCmd", + "main::Command::InitDefaultHelpCmd", + "main::Command::SetCompletionCommandGroupID", + "main::Command::getCompletions", + "main::Command::updateParentsPflags", + "main::GetActiveHelpConfig", + "main::gen", + "main::getEnvConfig", + "main::prepareCustomAnnotationsForFlags", + "main::writeFlagHandler", + "main::writeFlags" + ], + "found": [ + "main::Command::ExecuteC", + "main::Command::InitDefaultCompletionCmd", + "main::Command::InitDefaultHelpCmd", + "main::Command::SetCompletionCommandGroupID", + "main::Command::getCompletions", + "main::Command::updateParentsPflags", + "main::GetActiveHelpConfig", + "main::gen", + "main::getEnvConfig", + "main::prepareCustomAnnotationsForFlags", + "main::writeFlagHandler", + "main::writeFlags" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "doc::GenMarkdownTreeCustom", + "truth": [ + "doc::GenMarkdownTree" + ], + "found": [ + "doc::GenMarkdownTree" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::FlagErrorFunc", + "truth": [ + "main::Command::execute" + ], + "found": [ + "main::Command::execute" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::SetGlobalNormalizationFunc", + "truth": [ + "main::Command::AddCommand" + ], + "found": [ + "main::Command::AddCommand" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::UseLine", + "truth": [ + "doc::GenMarkdownCustom", + "doc::GenReSTCustom", + "doc::GenYamlCustom", + "doc::manPreamble", + "main::defaultUsageFunc" + ], + "found": [ + "doc::GenMarkdownCustom", + "doc::GenReSTCustom", + "doc::GenYamlCustom", + "doc::manPreamble", + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::GenZshCompletion", + "truth": [ + "main::Command::InitDefaultCompletionCmd" + ], + "found": [ + "main::Command::InitDefaultCompletionCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::flagCompError::Error", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::HasPersistentFlags", + "truth": [ + "main::Command::DebugFlags", + "main::Command::persistentFlag" + ], + "found": [ + "main::Command::DebugFlags", + "main::Command::persistentFlag" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::PrintErr", + "truth": [ + "main::Command::PrintErrf", + "main::Command::PrintErrln" + ], + "found": [ + "main::Command::PrintErrf", + "main::Command::PrintErrln" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "doc::GenYamlCustom", + "truth": [ + "doc::GenYaml", + "doc::GenYamlTreeCustom" + ], + "found": [ + "doc::GenYaml", + "doc::GenYamlTreeCustom" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::HasSubCommands", + "truth": [ + "main::Command::DebugFlags", + "main::Command::InitDefaultHelpCmd", + "main::defaultHelpFunc", + "main::legacyArgs" + ], + "found": [ + "main::Command::DebugFlags", + "main::Command::InitDefaultHelpCmd", + "main::defaultHelpFunc", + "main::legacyArgs" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Traverse", + "truth": [ + "main::Command::ExecuteC", + "main::Command::getCompletions" + ], + "found": [ + "main::Command::ExecuteC", + "main::Command::getCompletions" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::SuggestionsFor", + "truth": [ + "main::Command::findSuggestions" + ], + "found": [ + "main::Command::findSuggestions" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Usage", + "truth": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString" + ], + "found": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::ValidateArgs", + "truth": [ + "main::Command::execute" + ], + "found": [ + "main::Command::execute" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::HasFlags", + "truth": [ + "main::Command::DebugFlags" + ], + "found": [ + "main::Command::DebugFlags" + ], + "maybe": [ + "doc::GenYamlCustom", + "main::Command::HasInheritedFlags", + "main::Command::HasLocalFlags", + "main::Command::HasPersistentFlags" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "callers_common": [ + { + "symbol": "main::Command::MarkFlagRequired", + "truth": [ + "main::Command::enforceFlagGroupsForCompletion" + ], + "found": [ + "main::Command::enforceFlagGroupsForCompletion" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "callers_blind": [ + { + "symbol": "main::Command::NamePadding", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::SetHelpFunc", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::HasLocalFlags", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::CheckErr", + "truth": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString", + "main::WriteStringAndCheck" + ], + "found": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString", + "main::WriteStringAndCheck" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::CommandPathPadding", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::VersionTemplate", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::RegisterFlagCompletionFunc", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "truth": [ + "main::Command::InitDefaultCompletionCmd" + ], + "found": [ + "main::Command::InitDefaultCompletionCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Print", + "truth": [ + "main::Command::ParseFlags", + "main::Command::Printf", + "main::Command::Println" + ], + "found": [ + "main::Command::ParseFlags", + "main::Command::Printf", + "main::Command::Println", + "main::preExecHook" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.75, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::OutOrStderr", + "truth": [ + "main::Command::Print", + "main::Command::UsageFunc" + ], + "found": [ + "main::Command::Print", + "main::Command::UsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::AddTemplateFunc", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::PrintErrf", + "truth": [ + "main::Command::ExecuteC" + ], + "found": [ + "main::Command::ExecuteC" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::FixedCompletions", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::MinimumNArgs", + "truth": [ + "main::Command::initCompleteCmd" + ], + "found": [ + "main::Command::initCompleteCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Flags", + "truth": [ + "main::Command::ArgsLenAtDash", + "main::Command::Flag", + "main::Command::HasAvailableFlags", + "main::Command::HasFlags", + "main::Command::InitDefaultCompletionCmd", + "main::Command::InitDefaultHelpFlag", + "main::Command::InitDefaultVersionFlag", + "main::Command::LocalFlags", + "main::Command::MarkFlagCustom", + "main::Command::MarkFlagDirname", + "main::Command::MarkFlagFilename", + "main::Command::MarkFlagRequired", + "main::Command::MarkFlagsMutuallyExclusive", + "main::Command::MarkFlagsOneRequired", + "main::Command::MarkFlagsRequiredTogether", + "main::Command::ParseFlags", + "main::Command::SetGlobalNormalizationFunc", + "main::Command::Traverse", + "main::Command::ValidateFlagGroups", + "main::Command::ValidateRequiredFlags", + "main::Command::argsMinusFirstX", + "main::Command::enforceFlagGroupsForCompletion", + "main::Command::execute", + "main::Command::getCompletions", + "main::Command::mergePersistentFlags", + "main::findFlag", + "main::helpOrVersionFlagPresent", + "main::stripFlags" + ], + "found": [ + "main::Command::ArgsLenAtDash", + "main::Command::Flag", + "main::Command::HasAvailableFlags", + "main::Command::HasFlags", + "main::Command::InitDefaultCompletionCmd", + "main::Command::InitDefaultHelpFlag", + "main::Command::InitDefaultVersionFlag", + "main::Command::LocalFlags", + "main::Command::MarkFlagCustom", + "main::Command::MarkFlagDirname", + "main::Command::MarkFlagFilename", + "main::Command::MarkFlagRequired", + "main::Command::MarkFlagsMutuallyExclusive", + "main::Command::MarkFlagsOneRequired", + "main::Command::MarkFlagsRequiredTogether", + "main::Command::ParseFlags", + "main::Command::SetGlobalNormalizationFunc", + "main::Command::Traverse", + "main::Command::ValidateFlagGroups", + "main::Command::ValidateRequiredFlags", + "main::Command::argsMinusFirstX", + "main::Command::enforceFlagGroupsForCompletion", + "main::Command::execute", + "main::Command::getCompletions", + "main::Command::mergePersistentFlags", + "main::findFlag", + "main::helpOrVersionFlagPresent", + "main::stripFlags" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::LocalFlags", + "truth": [ + "main::Command::HasAvailableLocalFlags", + "main::Command::HasLocalFlags", + "main::Command::InheritedFlags", + "main::Command::LocalNonPersistentFlags", + "main::Command::NonInheritedFlags", + "main::defaultUsageFunc" + ], + "found": [ + "main::Command::HasAvailableLocalFlags", + "main::Command::HasLocalFlags", + "main::Command::InheritedFlags", + "main::Command::LocalNonPersistentFlags", + "main::Command::NonInheritedFlags", + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Println", + "truth": [ + "main::Command::DebugFlags", + "main::Command::ExecuteC", + "main::Command::execute" + ], + "found": [ + "main::Command::DebugFlags", + "main::Command::ExecuteC", + "main::Command::execute", + "main::preExecHook" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.75, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Execute", + "truth": [ + "main::Command::ExecuteContext" + ], + "found": [ + "main::Command::ExecuteContext" + ], + "maybe": [ + "main::tmpl" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::SetHelpCommand", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::UsagePadding", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::ValidateFlagGroups", + "truth": [ + "main::Command::execute" + ], + "found": [ + "main::Command::execute" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::PrintErrln", + "truth": [ + "main::Command::ExecuteC", + "main::Command::HelpFunc", + "main::Command::UsageFunc" + ], + "found": [ + "main::Command::ExecuteC", + "main::Command::HelpFunc", + "main::Command::UsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Help", + "truth": [ + "main::Command::InitDefaultHelpCmd" + ], + "found": [ + "main::Command::InitDefaultHelpCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::CalledAs", + "truth": [ + "main::Command::initCompleteCmd" + ], + "found": [ + "main::Command::initCompleteCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::MarkZshCompPositionalArgumentFile", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::GenBashCompletionFile", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::CompErrorln", + "truth": [ + "main::Command::initCompleteCmd" + ], + "found": [ + "main::Command::initCompleteCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::HasParent", + "truth": [ + "doc::GenMarkdownCustom", + "doc::GenReSTCustom", + "doc::GenYamlCustom", + "doc::genMan", + "doc::hasSeeAlso", + "main::Command::CommandPath", + "main::Command::ErrPrefix", + "main::Command::ExecuteC", + "main::Command::FlagErrorFunc", + "main::Command::HelpFunc", + "main::Command::HelpTemplate", + "main::Command::IsAvailableCommand", + "main::Command::Root", + "main::Command::UsageFunc", + "main::Command::UsageTemplate", + "main::Command::UseLine", + "main::Command::VersionTemplate", + "main::Command::VisitParents", + "main::Command::getErr", + "main::Command::getHelpTemplateFunc", + "main::Command::getIn", + "main::Command::getOut", + "main::Command::getUsageTemplateFunc", + "main::Command::getVersionTemplateFunc", + "main::legacyArgs" + ], + "found": [ + "doc::GenMarkdownCustom", + "doc::GenReSTCustom", + "doc::GenYamlCustom", + "doc::genMan", + "doc::hasSeeAlso", + "main::Command::CommandPath", + "main::Command::ErrPrefix", + "main::Command::ExecuteC", + "main::Command::FlagErrorFunc", + "main::Command::HelpFunc", + "main::Command::HelpTemplate", + "main::Command::IsAvailableCommand", + "main::Command::Root", + "main::Command::UsageFunc", + "main::Command::UsageTemplate", + "main::Command::UseLine", + "main::Command::VersionTemplate", + "main::Command::VisitParents", + "main::Command::getErr", + "main::Command::getHelpTemplateFunc", + "main::Command::getIn", + "main::Command::getOut", + "main::Command::getUsageTemplateFunc", + "main::Command::getVersionTemplateFunc", + "main::legacyArgs" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::AddGroup", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::InitDefaultVersionFlag", + "truth": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::execute", + "main::Command::getCompletions" + ], + "found": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::execute", + "main::Command::getCompletions" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Commands", + "truth": [ + "doc::GenManTreeFromOpts", + "doc::GenMarkdownCustom", + "doc::GenMarkdownTreeCustom", + "doc::GenReSTCustom", + "doc::GenReSTTreeCustom", + "doc::GenYamlCustom", + "doc::GenYamlTreeCustom", + "doc::genMan", + "doc::hasSeeAlso", + "main::Command::InitDefaultHelpCmd", + "main::Command::getCompletions", + "main::defaultUsageFunc", + "main::gen", + "main::writeCommands" + ], + "found": [ + "doc::GenManTreeFromOpts", + "doc::GenMarkdownCustom", + "doc::GenMarkdownTreeCustom", + "doc::GenReSTCustom", + "doc::GenReSTTreeCustom", + "doc::GenYamlCustom", + "doc::GenYamlTreeCustom", + "doc::genMan", + "doc::hasSeeAlso", + "main::Command::InitDefaultHelpCmd", + "main::Command::getCompletions", + "main::defaultUsageFunc", + "main::gen", + "main::writeCommands" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Parent", + "truth": [ + "doc::GenMarkdownCustom", + "doc::GenReSTCustom", + "doc::GenYamlCustom", + "doc::genMan", + "main::Command::CommandPath", + "main::Command::HelpFunc", + "main::Command::IsAvailableCommand", + "main::Command::Root", + "main::Command::UsageFunc", + "main::Command::VisitParents", + "main::Command::execute" + ], + "found": [ + "doc::GenMarkdownCustom", + "doc::GenReSTCustom", + "doc::GenYamlCustom", + "doc::genMan", + "main::Command::CommandPath", + "main::Command::HelpFunc", + "main::Command::IsAvailableCommand", + "main::Command::Root", + "main::Command::UsageFunc", + "main::Command::VisitParents", + "main::Command::execute" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::HelpFunc", + "truth": [ + "main::Command::ExecuteC", + "main::Command::Help" + ], + "found": [ + "main::Command::ExecuteC", + "main::Command::Help" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "doc::GenMarkdownCustom", + "truth": [ + "doc::GenMarkdown", + "doc::GenMarkdownTreeCustom" + ], + "found": [ + "doc::GenMarkdown", + "doc::GenMarkdownTreeCustom" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::GenBashCompletionV2", + "truth": [ + "main::Command::GenBashCompletionFileV2", + "main::Command::InitDefaultCompletionCmd" + ], + "found": [ + "main::Command::GenBashCompletionFileV2", + "main::Command::InitDefaultCompletionCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::SetUsageTemplate", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::FlagErrorFunc", + "truth": [ + "main::Command::execute" + ], + "found": [ + "main::Command::execute" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::DebugFlags", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::CompDebugln", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::SetGlobalNormalizationFunc", + "truth": [ + "main::Command::AddCommand" + ], + "found": [ + "main::Command::AddCommand" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::UseLine", + "truth": [ + "doc::GenMarkdownCustom", + "doc::GenReSTCustom", + "doc::GenYamlCustom", + "doc::manPreamble", + "main::defaultUsageFunc" + ], + "found": [ + "doc::GenMarkdownCustom", + "doc::GenReSTCustom", + "doc::GenYamlCustom", + "doc::manPreamble", + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::GenZshCompletion", + "truth": [ + "main::Command::InitDefaultCompletionCmd" + ], + "found": [ + "main::Command::InitDefaultCompletionCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::RangeArgs", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::flagCompError::Error", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::Root", + "truth": [ + "main::Command::ExecuteC", + "main::Command::InitDefaultCompletionCmd", + "main::Command::InitDefaultHelpCmd", + "main::Command::SetCompletionCommandGroupID", + "main::Command::getCompletions", + "main::Command::updateParentsPflags", + "main::GetActiveHelpConfig", + "main::gen", + "main::getEnvConfig", + "main::prepareCustomAnnotationsForFlags", + "main::writeFlagHandler", + "main::writeFlags" + ], + "found": [ + "main::Command::ExecuteC", + "main::Command::InitDefaultCompletionCmd", + "main::Command::InitDefaultHelpCmd", + "main::Command::SetCompletionCommandGroupID", + "main::Command::getCompletions", + "main::Command::updateParentsPflags", + "main::GetActiveHelpConfig", + "main::gen", + "main::getEnvConfig", + "main::prepareCustomAnnotationsForFlags", + "main::writeFlagHandler", + "main::writeFlags" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "doc::GenYaml", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::ResetCommands", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::HasPersistentFlags", + "truth": [ + "main::Command::DebugFlags", + "main::Command::persistentFlag" + ], + "found": [ + "main::Command::DebugFlags", + "main::Command::persistentFlag" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::SetFlagErrorFunc", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::SetUsageFunc", + "skipped": "compiler reported no uses" + }, + { + "symbol": "doc::GenReST", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::CompletionOptions::SetDefaultShellCompDirective", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Command::PrintErr", + "truth": [ + "main::Command::PrintErrf", + "main::Command::PrintErrln" + ], + "found": [ + "main::Command::PrintErrf", + "main::Command::PrintErrln" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "rename": [ + { + "symbol": "main::Command::NamePadding", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::CheckErr", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::CommandPathPadding", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Print", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "bash_completionsV2.go:179: # Print the activeHelp statements before we finish\nbash_completionsV2.go:184: # Print the activeHelp statements\nbash_completions_test.go:134:\t\tShort: \"Print anything to the screen\",\ncommand.go:1434:// Print is a convenience method to Print to the defined output, fall", + "detail": "" + }, + { + "symbol": "main::Command::OutOrStderr", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::PrintErrf", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::MinimumNArgs", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Flags", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "command.go:1686:// Flags returns the complete FlagSet that applies\ncommand.go:1961:Flags:\ncommand.go:1964:Global Flags:\ncommand.go:2024:\t\tfmt.Fprintf(w, \"\\n\\nGlobal Flags:\\n\")\ncommand_test.go:984:Flags:", + "detail": "" + }, + { + "symbol": "main::Command::LocalFlags", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Println", + "ok": false, + "compiled": true, + "tests_ok": false, + "tests_failed": [ + "TestDeadcodeElimination" + ], + "old_name_left": "command.go:1439:// Println is a convenience method to Println to the defined output, fallback to Stderr if not set.\ncommand.go:1454:// PrintErrln is a convenience method to Println to the defined Err output, fallback to Stderr if not set.\ndoc/yaml_docs.go:139:\t\tfmt.Println(err)", + "detail": "" + }, + { + "symbol": "main::Command::Execute", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "cobra.go:98:// Execute method is called.\ncobra.go:104:// Execute method is terminated.\ncobra.go:186:\t\t\treturn t.Execute(w, data)\ncommand.go:266:// Notice that a call to Execute and ExecuteC will replace a nil context of\ncommand.go:976:\t\t\t// - Execute all persistent pre-runs from the root parent till", + "detail": "" + }, + { + "symbol": "main::Command::CalledAs", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::HasAvailableInheritedFlags", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Parent", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "command.go:1891:// Parent returns a commands parent command.", + "detail": "" + }, + { + "symbol": "main::CompError", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::CompErrorln", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::LocalNonPersistentFlags", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::ParseFlags", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::InitDefaultCompletionCmd", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::ValidateFlagGroups", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::PrintErrln", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Help", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "cobra.go:83:// AddTemplateFunc adds a template function that's available to Usage and Help\ncobra.go:90:// Help template generation.\ncommand.go:517:// Help puts out the help for the command.\ncommand.go:1271:\t\t\tShort: \"Help about any command\",\ncommand_test.go:994:\t\tt.Errorf(\"Help text mismatch.\\nExpec", + "detail": "" + }, + { + "symbol": "main::Command::HasParent", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::InitDefaultVersionFlag", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Commands", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "cobra.go:15:// Commands similar to git, go tools and other modern CLI tools\ncommand.go:1331:// Commands returns a sorted slice of child commands.\ncommand.go:1952:Available Commands:{{range $cmds}}{{if (or .IsAvailableCommand (eq .Name \"help\"))}}\ncommand.go:1958:Additional Commands:{{range $cmds}}{{i", + "detail": "" + }, + { + "symbol": "main::Command::HelpFunc", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "doc::GenMarkdownCustom", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::GenBashCompletionV2", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::InheritedFlags", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Root", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "command.go:891:// Root finds root command.\ncommand.go:1089:\t// Regardless of what command execute is called on, run on Root only\ncommand.go:1281:\t\t\t\t\t// Root help command.\ncommand_test.go:194:\t\tt.Errorf(\"Root command must not fail: %+v\", err)\ncommand_test.go:223:\t\tt.Errorf(\"Root command must not fai", + "detail": "" + }, + { + "symbol": "doc::GenMarkdownTreeCustom", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::FlagErrorFunc", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::SetGlobalNormalizationFunc", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::UseLine", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::GenZshCompletion", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::flagCompError::Error", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "bash_completions.go:120: # Error code. No completion.\nbash_completionsV2.go:107: # Error code. No completion.\nbash_completions_test.go:49:\t\tt.Errorf(\"Error thrown performing MatchString: \\n %s\\n\", err)\ncobra.go:234:// CheckErr prints the msg with the prefix 'Error:' and exits with er", + "detail": "go:377:135: err.ErrorGnx undefined (type error has no field or method ErrorGnx)\n./completions.go:388:15: impossible type assertion: flagErr.(*flagCompError)\n\t*flagCompError does not implement error (missing method Error)\n./completions.go:727:33: cannot use &flagCompError{…} (value of type *flagCompError) as error value in return statement: *flagCompError does not implement error (missing method Error)\nFAIL\tgithub.com/spf13/cobra [build failed]\nFAIL\tgithub.com/spf13/cobra/doc [build failed]\nFAIL\n" + }, + { + "symbol": "main::Command::HasPersistentFlags", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::PrintErr", + "ok": false, + "compiled": true, + "tests_ok": false, + "tests_failed": [ + "TestCommandPrintRedirection" + ], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "doc::GenYamlCustom", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::HasSubCommands", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Traverse", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "command.go:819:// Traverse the command tree to find the command, and parse args for\ncommand_test.go:2390:\t// Traverse.\ncompletions_test.go:256:\t// Test that we don't use Traverse when we shouldn't.", + "detail": "" + }, + { + "symbol": "main::Command::SuggestionsFor", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Usage", + "ok": false, + "compiled": true, + "tests_ok": false, + "tests_failed": [ + "TestFlagErrorFuncHelp", + "TestHelpCommandExecutedOnChildWithFlagThatShadowsParentFlag" + ], + "old_name_left": "cobra.go:83:// AddTemplateFunc adds a template function that's available to Usage and Help\ncobra.go:89:// AddTemplateFuncs adds multiple template functions that are available to Usage and\ncommand.go:312:// SetUsageFunc sets usage function. Usage can be defined by application.\ncommand.go:475:// Usage", + "detail": "" + }, + { + "symbol": "main::Command::ValidateArgs", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::HasFlags", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "command.go:1802:\treturn c.Flags().HasFlags()\ncommand.go:1807:\treturn c.PersistentFlags().HasFlags()\ncommand.go:1812:\treturn c.LocalFlags().HasFlags()\ncommand.go:1817:\treturn c.InheritedFlags().HasFlags()\ndoc/yaml_docs.go:112:\tif flags.HasFlags() {", + "detail": "" + } + ], + "mutants": { + "7": [ + "main::Command::NamePadding", + "main::CheckErr", + "main::Command::CommandPathPadding", + "main::Command::GenPowerShellCompletionWithDesc", + "main::Command::Print", + "main::Command::OutOrStderr", + "main::Command::PrintErrf", + "main::MinimumNArgs", + "main::Command::Flags", + "main::Command::LocalFlags" + ], + "8": [ + "main::Command::ValidateFlagGroups", + "main::Command::PrintErrln", + "main::Command::Help", + "main::Command::CalledAs", + "main::Command::CommandPathPadding", + "main::CompErrorln", + "main::Command::HasParent", + "main::Command::InitDefaultVersionFlag", + "main::Command::Commands" + ], + "9": [ + "main::Command::FlagErrorFunc", + "main::Command::SetGlobalNormalizationFunc", + "main::Command::UseLine", + "main::Command::GenZshCompletion", + "main::Command::GenPowerShellCompletionWithDesc", + "main::Command::LocalFlags", + "main::flagCompError::Error", + "main::Command::Root", + "main::Command::HasPersistentFlags", + "main::Command::OutOrStderr" + ] + }, + "tests": [ + { + "symbol": "main::Command::NamePadding", + "level": "name", + "truth": 21, + "predicted": 125, + "recall": 0.9047619047619048, + "precision": 0.152, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "top_best": 1.0, + "caught": 0.0, + "missed": [ + "TestDefaultCompletionCmd", + "TestValidateFlagGroups" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "main::CheckErr", + "level": "name", + "truth": 109, + "predicted": 232, + "recall": 0.926605504587156, + "precision": 0.4353448275862069, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestBashCompletionV2WithActiveHelp", + "TestCompleteCmdInZshScript", + "TestCompleteNoDesCmdInZshScript", + "TestGenFishCompletionFile", + "TestGenManTree", + "TestHelpFuncExecuted", + "TestPwshCompletionNoActiveHelp", + "TestZshCompletionWithActiveHelp" + ], + "recall_graph_only": 0.926605504587156 + }, + { + "symbol": "main::Command::CommandPathPadding", + "level": "name", + "truth": 1, + "predicted": 125, + "recall": 1.0, + "precision": 0.008, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "top_best": 0.1, + "caught": 0.0, + "missed": [], + "recall_graph_only": 0.0 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "skipped": "no test fails when it throws", + "predicted": 203 + }, + { + "symbol": "main::Command::Print", + "level": "name", + "truth": 59, + "predicted": 210, + "recall": 1.0, + "precision": 0.28095238095238095, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "main::Command::OutOrStderr", + "level": "name", + "truth": 87, + "predicted": 203, + "recall": 0.9885057471264368, + "precision": 0.4236453201970443, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestValidateFlagGroups" + ], + "recall_graph_only": 0.9885057471264368 + }, + { + "symbol": "main::Command::PrintErrf", + "level": "name", + "truth": 7, + "predicted": 205, + "recall": 0.8571428571428571, + "precision": 0.02926829268292683, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "top_best": 0.6, + "caught": 1.0, + "missed": [ + "TestCalledAs" + ], + "recall_graph_only": 0.8571428571428571 + }, + { + "symbol": "main::MinimumNArgs", + "level": "name", + "truth": 204, + "predicted": 204, + "recall": 0.9803921568627451, + "precision": 0.9803921568627451, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestCalledAs", + "TestExecuteContext", + "TestHelpFuncExecuted", + "TestSetContextPreRunOverwrite" + ], + "recall_graph_only": 0.9803921568627451 + }, + { + "symbol": "main::Command::Flags", + "skipped": "mutant does not compile" + }, + { + "symbol": "main::Command::LocalFlags", + "level": "name", + "truth": 149, + "predicted": 9, + "recall": 0.053691275167785234, + "precision": 0.8888888888888888, + "top_hits": 8, + "top_n": 9, + "top_precision": 0.8888888888888888, + "top_best": 0.8888888888888888, + "caught": 1.0, + "missed": [ + "TestActiveHelpAlone", + "TestActiveHelpWithComps", + "TestAddGroup", + "TestArbitraryArgs_WithValidOnly_WithInvalidArgs", + "TestArgAliasesCompletionInGo", + "TestArgsNotDetectedAsFlagsCompletionInGo", + "TestBashCompletionDeprecatedFlag", + "TestBashCompletionHiddenFlag" + ], + "recall_graph_only": 0.053691275167785234 + }, + { + "symbol": "main::Command::ValidateFlagGroups", + "level": "name", + "truth": 116, + "predicted": 202, + "recall": 0.9655172413793104, + "precision": 0.5544554455445545, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestCalledAs", + "TestExecuteContext", + "TestHelpFuncExecuted", + "TestSetContextPreRunOverwrite" + ], + "recall_graph_only": 0.9655172413793104 + }, + { + "symbol": "main::Command::PrintErrln", + "level": "name", + "truth": 61, + "predicted": 207, + "recall": 0.9836065573770492, + "precision": 0.2898550724637681, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestCalledAs" + ], + "recall_graph_only": 0.9836065573770492 + }, + { + "symbol": "main::Command::Help", + "level": "name", + "truth": 7, + "predicted": 223, + "recall": 1.0, + "precision": 0.03139013452914798, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "top_best": 0.7, + "caught": 0.0, + "missed": [], + "recall_graph_only": 0.8571428571428571 + }, + { + "symbol": "main::Command::CalledAs", + "level": "name", + "truth": 47, + "predicted": 204, + "recall": 1.0, + "precision": 0.23039215686274508, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 0.9787234042553191 + }, + { + "symbol": "main::CompErrorln", + "level": "name", + "truth": 1, + "predicted": 203, + "recall": 1.0, + "precision": 0.0049261083743842365, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "top_best": 0.1, + "caught": 0.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "main::Command::HasParent", + "skipped": "mutant does not compile" + }, + { + "symbol": "main::Command::InitDefaultVersionFlag", + "level": "name", + "truth": 197, + "predicted": 217, + "recall": 0.9796954314720813, + "precision": 0.8894009216589862, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestCalledAs", + "TestExecuteContext", + "TestHelpFuncExecuted", + "TestSetContextPreRunOverwrite" + ], + "recall_graph_only": 0.9796954314720813 + }, + { + "symbol": "main::Command::Commands", + "level": "name", + "truth": 96, + "predicted": 231, + "recall": 1.0, + "precision": 0.4155844155844156, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "main::Command::FlagErrorFunc", + "level": "name", + "truth": 17, + "predicted": 202, + "recall": 1.0, + "precision": 0.08415841584158416, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "main::Command::SetGlobalNormalizationFunc", + "level": "name", + "truth": 4, + "predicted": 229, + "recall": 1.0, + "precision": 0.017467248908296942, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "top_best": 0.4, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "main::Command::UseLine", + "level": "name", + "truth": 86, + "predicted": 19, + "recall": 0.11627906976744186, + "precision": 0.5263157894736842, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestAddGroup", + "TestArbitraryArgs_WithValidOnly_WithInvalidArgs", + "TestChildFlagWithParentLocalFlag", + "TestChildTakesNoArgs", + "TestExactArgs_WithInvalidCount", + "TestExactArgs_WithInvalidCount_WithValid", + "TestExactArgs_WithInvalidCount_WithValidOnly_WithInvalidArgs", + "TestExactArgs_WithInvalidCount_WithValid_WithInvalidArgs" + ], + "recall_graph_only": 0.11627906976744186 + }, + { + "symbol": "main::Command::GenZshCompletion", + "level": "name", + "truth": 3, + "predicted": 205, + "recall": 1.0, + "precision": 0.014634146341463415, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "top_best": 0.3, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "main::flagCompError::Error", + "skipped": "no test fails when it throws", + "predicted": 208 + }, + { + "symbol": "main::Command::Root", + "level": "name", + "truth": 248, + "predicted": 237, + "recall": 0.9435483870967742, + "precision": 0.9873417721518988, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestAddTemplateFunctions", + "TestCalledAs", + "TestCompletionFuncCompatibility", + "TestFind", + "TestGenManTree", + "TestGenMdTree", + "TestGenRSTTree", + "TestGenYamlTree" + ], + "recall_graph_only": 0.9435483870967742 + }, + { + "symbol": "main::Command::HasPersistentFlags", + "level": "name", + "truth": 4, + "predicted": 11, + "recall": 1.0, + "precision": 0.36363636363636365, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "top_best": 0.4, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + } + ], + "look": [ + { + "symbol": "main::Command::NamePadding", + "look_tokens": 255, + "file_tokens": 15286 + }, + { + "symbol": "main::CheckErr", + "look_tokens": 315, + "file_tokens": 1871 + }, + { + "symbol": "main::Command::CommandPathPadding", + "look_tokens": 279, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "look_tokens": 303, + "file_tokens": 3403 + }, + { + "symbol": "main::Command::Print", + "look_tokens": 284, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::OutOrStderr", + "look_tokens": 250, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::PrintErrf", + "look_tokens": 263, + "file_tokens": 15286 + }, + { + "symbol": "main::MinimumNArgs", + "look_tokens": 346, + "file_tokens": 1120 + }, + { + "symbol": "main::Command::Flags", + "look_tokens": 403, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::LocalFlags", + "look_tokens": 510, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::Println", + "look_tokens": 273, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::Execute", + "look_tokens": 274, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::CalledAs", + "look_tokens": 262, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::HasAvailableInheritedFlags", + "look_tokens": 294, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::Parent", + "look_tokens": 320, + "file_tokens": 15286 + }, + { + "symbol": "main::CompError", + "look_tokens": 277, + "file_tokens": 9767 + }, + { + "symbol": "main::CompErrorln", + "look_tokens": 262, + "file_tokens": 9767 + }, + { + "symbol": "main::Command::LocalNonPersistentFlags", + "look_tokens": 403, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::ParseFlags", + "look_tokens": 428, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::InitDefaultCompletionCmd", + "look_tokens": 1797, + "file_tokens": 9767 + }, + { + "symbol": "main::Command::ValidateFlagGroups", + "look_tokens": 525, + "file_tokens": 2405 + }, + { + "symbol": "main::Command::PrintErrln", + "look_tokens": 272, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::Help", + "look_tokens": 257, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::HasParent", + "look_tokens": 315, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::InitDefaultVersionFlag", + "look_tokens": 430, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::Commands", + "look_tokens": 390, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::HelpFunc", + "look_tokens": 373, + "file_tokens": 15286 + }, + { + "symbol": "doc::GenMarkdownCustom", + "look_tokens": 665, + "file_tokens": 1164 + }, + { + "symbol": "main::Command::GenBashCompletionV2", + "look_tokens": 298, + "file_tokens": 4463 + }, + { + "symbol": "main::Command::InheritedFlags", + "look_tokens": 535, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::Root", + "look_tokens": 346, + "file_tokens": 15286 + }, + { + "symbol": "doc::GenMarkdownTreeCustom", + "look_tokens": 409, + "file_tokens": 1164 + }, + { + "symbol": "main::Command::FlagErrorFunc", + "look_tokens": 306, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::SetGlobalNormalizationFunc", + "look_tokens": 353, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::UseLine", + "look_tokens": 360, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::GenZshCompletion", + "look_tokens": 276, + "file_tokens": 2755 + }, + { + "symbol": "main::flagCompError::Error", + "look_tokens": 245, + "file_tokens": 9767 + }, + { + "symbol": "main::Command::HasPersistentFlags", + "look_tokens": 310, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::PrintErr", + "look_tokens": 268, + "file_tokens": 15286 + }, + { + "symbol": "doc::GenYamlCustom", + "look_tokens": 528, + "file_tokens": 1237 + }, + { + "symbol": "main::Command::HasSubCommands", + "look_tokens": 263, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::Traverse", + "look_tokens": 556, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::SuggestionsFor", + "look_tokens": 402, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::Usage", + "look_tokens": 267, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::ValidateArgs", + "look_tokens": 236, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::HasFlags", + "look_tokens": 270, + "file_tokens": 15286 + } + ], + "seconds": 16, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.989, + "callers_checked": 45, + "blind_recall": 1.0, + "blind_checked": 31, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 0.913, + "rename_checked": 46, + "tests_recall": 0.89, + "tests_precision": 0.362, + "tests_top10_precision": 0.442, + "tests_top10_best": 0.785, + "tests_caught": 0.81, + "tests_checked": 21, + "look_vs_file": 0.071 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 0.975, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 12, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.839, + "tests_precision": 0.4, + "tests_top10_precision": 0.436, + "tests_top10_best": 0.824, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.055 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 15, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 1.0, + "rename_checked": 20, + "tests_recall": 0.991, + "tests_precision": 0.303, + "tests_top10_precision": 0.4, + "tests_top10_best": 0.738, + "tests_caught": 0.625, + "tests_checked": 8, + "look_vs_file": 0.1 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 10, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 0.85, + "rename_checked": 20, + "tests_recall": 0.763, + "tests_precision": 0.413, + "tests_top10_precision": 0.486, + "tests_top10_best": 0.749, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.05 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 45, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 0.989, + "functions": 45, + "boot_lo": 0.978, + "boot_hi": 1.0, + "boot_half": 0.011, + "seeds": [ + 0.975, + 1.0, + 1.0 + ], + "seed_sd": 0.014, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 1.0, + "functions": 31, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_recall": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "common_precision": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "rename_ok": { + "mean": 0.913, + "functions": 46, + "boot_lo": 0.848, + "boot_hi": 0.978, + "boot_half": 0.065, + "seeds": [ + 0.95, + 1.0, + 0.85 + ], + "seed_sd": 0.076, + "threshold": 0.07 + }, + "tests_recall": { + "mean": 0.89, + "functions": 21, + "boot_lo": 0.794, + "boot_hi": 0.977, + "boot_half": 0.091, + "seeds": [ + 0.839, + 0.991, + 0.763 + ], + "seed_sd": 0.116, + "threshold": 0.1 + }, + "tests_precision": { + "mean": 0.362, + "functions": 21, + "boot_lo": 0.244, + "boot_hi": 0.486, + "boot_half": 0.121, + "seeds": [ + 0.4, + 0.303, + 0.413 + ], + "seed_sd": 0.06, + "threshold": 0.13 + }, + "tests_top10_precision": { + "mean": 0.442, + "functions": 21, + "boot_lo": 0.305, + "boot_hi": 0.576, + "boot_half": 0.135, + "seeds": [ + 0.436, + 0.4, + 0.486 + ], + "seed_sd": 0.043, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.785, + "functions": 21, + "boot_lo": 0.665, + "boot_hi": 0.895, + "boot_half": 0.115, + "seeds": [ + 0.824, + 0.738, + 0.749 + ], + "seed_sd": 0.047, + "threshold": 0.12 + }, + "tests_caught": { + "mean": 0.81, + "functions": 21, + "boot_lo": 0.667, + "boot_hi": 0.952, + "boot_half": 0.143, + "seeds": [ + 0.75, + 0.625, + 1.0 + ], + "seed_sd": 0.191, + "threshold": 0.15 + }, + "look_vs_file": { + "mean": 0.071, + "functions": 46, + "boot_lo": 0.044, + "boot_hi": 0.101, + "boot_half": 0.028, + "seeds": [ + 0.055, + 0.1, + 0.05 + ], + "seed_sd": 0.028, + "threshold": 0.03 + } + } + }, + { + "repo": "chi", + "lang": "go", + "commit": "c64ed7d6635f", + "index_seconds": 0.1, + "symbols": 351, + "files": 55, + "seeds": [ + 7, + 8, + 9 + ], + "edges": 5078, + "sample": [ + "middleware::GetLogEntry", + "_examples::fileserver::FileServer", + "main::Chain", + "middleware::NewCompressor", + "main::Walk", + "main::RouteContext", + "middleware::RequestLogger", + "main::NewMux", + "_examples::rest::NewArticleListResponse", + "middleware::GetClientIPAddr", + "main::Middlewares::HandlerFunc", + "main::NewRouteContext", + "middleware::NewPattern", + "middleware::Throttle", + "middleware::Timeout", + "main::Context::RoutePattern", + "main::Mux::NotFoundHandler", + "main::endpoints::Value", + "main::node::InsertRoute", + "main::node::FindRoute", + "main::URLParamFromCtx", + "middleware::GetReqID", + "middleware::NewWrapResponseWriter", + "middleware::compressResponseWriter::Close", + "main::NewRouter", + "middleware::Compressor::SetEncoder", + "_examples::rest::ErrRender", + "_examples::rest::NewUserPayloadResponse", + "main::Mux::MethodNotAllowedHandler", + "middleware::PrintPrettyStack", + "_examples::rest::ErrInvalidRequest", + "middleware::HeaderRoute::IsMatch", + "main::RegisterMethod", + "middleware::ThrottleWithOpts", + "middleware::WithLogEntry" + ], + "sample_common": [ + "main::Mux::Method", + "middleware::defaultLogEntry::Write", + "middleware::basicWriter::WriteHeader", + "main::contextKey::String", + "_examples::custom_handler::Handler::ServeHTTP", + "main::Context::Reset", + "main::Mux::Find", + "middleware::hijackWriter::Hijack", + "middleware::httpFancyWriter::Flush", + "main::Context::URLParam", + "middleware::compressResponseWriter::Push", + "_examples::todos_resource::usersResource::Routes", + "main::Mux::Match", + "main::Mux::Mount", + "main::Mux::With", + "main::Mux::Handle", + "main::Mux::MethodNotAllowed", + "main::Mux::Query", + "main::Mux::NotFound", + "main::Middlewares::Handler", + "middleware::flushHijackWriter::Flush", + "middleware::httpFancyWriter::Hijack", + "middleware::http2FancyWriter::Push", + "middleware::basicWriter::Write", + "main::ChainHandler::ServeHTTP", + "middleware::http2FancyWriter::Flush" + ], + "samples": { + "7": [ + "middleware::GetLogEntry", + "_examples::fileserver::FileServer", + "main::Chain", + "middleware::NewCompressor", + "main::Walk", + "main::RouteContext", + "middleware::RequestLogger", + "main::NewMux", + "_examples::rest::NewArticleListResponse", + "middleware::GetClientIPAddr", + "main::Middlewares::HandlerFunc", + "main::NewRouteContext", + "middleware::NewPattern", + "middleware::Throttle", + "middleware::Timeout", + "main::Context::RoutePattern", + "main::Mux::NotFoundHandler", + "main::endpoints::Value", + "main::node::InsertRoute", + "main::node::FindRoute" + ], + "8": [ + "middleware::GetLogEntry", + "_examples::fileserver::FileServer", + "main::URLParamFromCtx", + "middleware::GetReqID", + "main::RouteContext", + "main::Mux::NotFoundHandler", + "middleware::NewWrapResponseWriter", + "middleware::Throttle", + "middleware::compressResponseWriter::Close", + "main::Walk", + "main::Context::RoutePattern", + "main::NewRouter", + "middleware::Compressor::SetEncoder", + "_examples::rest::ErrRender", + "_examples::rest::NewUserPayloadResponse", + "main::Mux::MethodNotAllowedHandler", + "main::NewRouteContext", + "middleware::Timeout", + "main::node::FindRoute", + "middleware::PrintPrettyStack" + ], + "9": [ + "main::Chain", + "middleware::NewWrapResponseWriter", + "_examples::rest::ErrInvalidRequest", + "_examples::rest::NewUserPayloadResponse", + "middleware::NewCompressor", + "middleware::compressResponseWriter::Close", + "main::URLParamFromCtx", + "main::endpoints::Value", + "main::Mux::MethodNotAllowedHandler", + "middleware::HeaderRoute::IsMatch", + "middleware::GetClientIPAddr", + "middleware::GetLogEntry", + "main::node::FindRoute", + "_examples::rest::ErrRender", + "middleware::Timeout", + "middleware::GetReqID", + "main::RegisterMethod", + "middleware::ThrottleWithOpts", + "middleware::WithLogEntry", + "main::NewMux" + ] + }, + "samples_common": { + "7": [ + "main::Mux::Method", + "middleware::defaultLogEntry::Write", + "middleware::basicWriter::WriteHeader", + "main::contextKey::String", + "_examples::custom_handler::Handler::ServeHTTP", + "main::Context::Reset", + "main::Mux::Find", + "middleware::hijackWriter::Hijack", + "middleware::httpFancyWriter::Flush", + "main::Context::URLParam", + "middleware::compressResponseWriter::Push", + "_examples::todos_resource::usersResource::Routes", + "main::Mux::Match", + "main::Mux::Mount", + "main::Mux::With", + "main::Mux::Handle", + "main::Mux::MethodNotAllowed", + "main::Mux::Query", + "main::Mux::NotFound", + "main::Middlewares::Handler" + ], + "8": [ + "middleware::flushHijackWriter::Flush", + "_examples::custom_handler::Handler::ServeHTTP", + "middleware::defaultLogEntry::Write", + "main::Mux::Query", + "_examples::todos_resource::usersResource::Routes", + "middleware::httpFancyWriter::Hijack", + "main::contextKey::String", + "main::Mux::Match", + "main::Middlewares::Handler", + "middleware::http2FancyWriter::Push", + "main::Context::URLParam", + "main::Context::Reset", + "middleware::basicWriter::WriteHeader", + "main::Mux::Method", + "main::Mux::NotFound", + "main::Mux::With", + "main::Mux::Handle", + "main::Mux::Mount", + "main::Mux::MethodNotAllowed", + "main::Mux::Find" + ], + "9": [ + "middleware::basicWriter::Write", + "main::Mux::Mount", + "main::Context::URLParam", + "_examples::todos_resource::usersResource::Routes", + "middleware::http2FancyWriter::Push", + "main::ChainHandler::ServeHTTP", + "main::Mux::MethodNotAllowed", + "main::Middlewares::Handler", + "middleware::http2FancyWriter::Flush", + "main::Mux::Match", + "main::Mux::Handle", + "middleware::httpFancyWriter::Hijack", + "main::Context::Reset", + "middleware::basicWriter::WriteHeader", + "main::Mux::With", + "main::Mux::Query", + "main::Mux::Method", + "main::Mux::NotFound", + "main::Mux::Find", + "main::contextKey::String" + ] + }, + "samples_blind": { + "7": [ + "middleware::SetHeader", + "middleware::GetLogEntry", + "_examples::fileserver::FileServer", + "main::Chain", + "middleware::RedirectSlashes", + "middleware::Compress", + "middleware::Sunset", + "main::Context::Clone", + "_examples::rest::ListArticles", + "middleware::NewCompressor", + "middleware::URLFormat", + "middleware::ClientIPFromRemoteAddr", + "main::Walk", + "middleware::ClientIPFromXFFTrustedProxies", + "middleware::PageRoute", + "main::RouteContext", + "middleware::Profiler", + "middleware::Heartbeat", + "_examples::rest::GetArticle", + "middleware::RequestLogger" + ], + "8": [ + "middleware::HeaderRouter::RouteAny", + "middleware::GetLogEntry", + "middleware::CleanPath", + "_examples::fileserver::FileServer", + "middleware::RouteHeaders", + "middleware::Deprecation", + "middleware::Compress", + "middleware::AllowContentEncoding", + "main::URLParamFromCtx", + "main::Context::Clone", + "middleware::GetReqID", + "_examples::rest::AdminOnly", + "middleware::RealIP", + "main::RouteContext", + "middleware::PathRewrite", + "middleware::GetHead", + "main::Mux::NotFoundHandler", + "middleware::Logger", + "middleware::Recoverer", + "middleware::RequestID" + ], + "9": [ + "middleware::GetHead", + "middleware::Deprecation", + "main::Chain", + "middleware::NewWrapResponseWriter", + "_examples::versions::data::PresentError", + "_examples::rest::ErrInvalidRequest", + "middleware::RequestSize", + "middleware::ClientIPFromXFFTrustedProxies", + "middleware::StripPrefix", + "middleware::ClientIPFromXFF", + "middleware::RealIP", + "middleware::ClientIPFromRemoteAddr", + "_examples::rest::NewUserPayloadResponse", + "_examples::rest::ListArticles", + "middleware::HeaderRouter::RouteAny", + "main::Context::Clone", + "middleware::SupressNotFound", + "middleware::SetHeader", + "middleware::NewCompressor", + "middleware::WithValue" + ] + }, + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "middleware::GetLogEntry", + "truth": [ + "middleware::Recoverer" + ], + "found": [ + "middleware::Recoverer" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "_examples::fileserver::FileServer", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Chain", + "truth": [ + "main::Mux::MethodNotAllowed", + "main::Mux::NotFound", + "main::Mux::handle" + ], + "found": [ + "main::Mux::MethodNotAllowed", + "main::Mux::NotFound", + "main::Mux::handle" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::NewCompressor", + "truth": [ + "middleware::Compress" + ], + "found": [ + "middleware::Compress" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Walk", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::RouteContext", + "truth": [ + "main::Mux::Mount", + "main::URLParamFromCtx", + "middleware::CleanPath", + "middleware::GetHead", + "middleware::RedirectSlashes", + "middleware::StripSlashes", + "middleware::SupressNotFound", + "middleware::URLFormat" + ], + "found": [ + "main::Mux::Mount", + "main::URLParamFromCtx", + "middleware::CleanPath", + "middleware::GetHead", + "middleware::RedirectSlashes", + "middleware::StripSlashes", + "middleware::SupressNotFound", + "middleware::URLFormat" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::RequestLogger", + "truth": [ + "middleware::init" + ], + "found": [ + "middleware::init" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::NewMux", + "truth": [ + "main::NewRouter" + ], + "found": [ + "main::NewRouter" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "_examples::rest::NewArticleListResponse", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::GetClientIPAddr", + "truth": [ + "middleware::GetClientIP" + ], + "found": [ + "middleware::GetClientIP" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Middlewares::HandlerFunc", + "truth": [ + "main::Mux::MethodNotAllowed", + "main::Mux::NotFound" + ], + "found": [ + "main::Mux::MethodNotAllowed", + "main::Mux::NotFound" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::NewRouteContext", + "truth": [ + "main::NewMux", + "middleware::GetHead", + "middleware::SupressNotFound" + ], + "found": [ + "main::NewMux", + "middleware::GetHead", + "middleware::SupressNotFound" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::NewPattern", + "truth": [ + "middleware::HeaderRouter::Route", + "middleware::HeaderRouter::RouteAny" + ], + "found": [ + "middleware::HeaderRouter::Route", + "middleware::HeaderRouter::RouteAny" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::Throttle", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::Timeout", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Context::RoutePattern", + "truth": [ + "main::Mux::routeHTTP" + ], + "found": [ + "main::Mux::routeHTTP" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Mux::NotFoundHandler", + "truth": [ + "main::Mux::ServeHTTP", + "main::Mux::routeHTTP", + "middleware::SupressNotFound" + ], + "found": [ + "main::Mux::ServeHTTP", + "main::Mux::routeHTTP", + "middleware::SupressNotFound" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::endpoints::Value", + "truth": [ + "main::node::setEndpoint" + ], + "found": [ + "main::RouteContext", + "main::node::setEndpoint", + "middleware::GetClientIPAddr", + "middleware::GetReqID" + ], + "maybe": [ + "main::Mux::ServeHTTP", + "main::Mux::routeHTTP", + "middleware::GetLogEntry" + ], + "import_files": [], + "recall": 1.0, + "precision": 0.25, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::node::InsertRoute", + "truth": [ + "main::Mux::handle" + ], + "found": [ + "main::Mux::handle" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::node::FindRoute", + "truth": [ + "main::Mux::Find", + "main::Mux::routeHTTP" + ], + "found": [ + "main::Mux::Find", + "main::Mux::routeHTTP" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::URLParamFromCtx", + "truth": [ + "main::URLParam" + ], + "found": [ + "main::URLParam" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::GetReqID", + "truth": [ + "middleware::DefaultLogFormatter::NewLogEntry" + ], + "found": [ + "middleware::DefaultLogFormatter::NewLogEntry" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::NewWrapResponseWriter", + "truth": [ + "middleware::RequestLogger" + ], + "found": [ + "middleware::RequestLogger" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::compressResponseWriter::Close", + "truth": [ + "middleware::Compressor::Handler" + ], + "found": [ + "middleware::Compressor::Handler" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::NewRouter", + "truth": [ + "main::Mux::Route", + "middleware::Profiler" + ], + "found": [ + "main::Mux::Route", + "middleware::Profiler" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::Compressor::SetEncoder", + "truth": [ + "middleware::NewCompressor" + ], + "found": [ + "middleware::NewCompressor" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "_examples::rest::ErrRender", + "skipped": "compiler reported no uses" + }, + { + "symbol": "_examples::rest::NewUserPayloadResponse", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Mux::MethodNotAllowedHandler", + "truth": [ + "main::Mux::routeHTTP" + ], + "found": [ + "main::Mux::routeHTTP" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::PrintPrettyStack", + "truth": [ + "middleware::Recoverer" + ], + "found": [ + "middleware::Recoverer" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "_examples::rest::ErrInvalidRequest", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::HeaderRoute::IsMatch", + "truth": [ + "middleware::HeaderRouter::Handler" + ], + "found": [ + "middleware::HeaderRouter::Handler" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::RegisterMethod", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::ThrottleWithOpts", + "truth": [ + "middleware::Throttle", + "middleware::ThrottleBacklog" + ], + "found": [ + "middleware::Throttle", + "middleware::ThrottleBacklog" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::WithLogEntry", + "truth": [ + "middleware::RequestLogger" + ], + "found": [ + "middleware::RequestLogger" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "callers_common": [ + { + "symbol": "main::Mux::Method", + "truth": [ + "main::Mux::Handle", + "main::Mux::MethodFunc" + ], + "found": [ + "main::Mux::Handle", + "main::Mux::MethodFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::defaultLogEntry::Write", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::basicWriter::WriteHeader", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::contextKey::String", + "skipped": "compiler reported no uses" + }, + { + "symbol": "_examples::custom_handler::Handler::ServeHTTP", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Context::Reset", + "truth": [ + "main::Mux::ServeHTTP" + ], + "found": [], + "maybe": [ + "main::Mux::ServeHTTP", + "middleware::Compressor::selectEncoder" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Mux::Find", + "truth": [ + "main::Mux::Match" + ], + "found": [ + "main::Mux::Match" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::hijackWriter::Hijack", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::httpFancyWriter::Flush", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Context::URLParam", + "truth": [ + "main::URLParamFromCtx" + ], + "found": [ + "main::URLParamFromCtx" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::compressResponseWriter::Push", + "skipped": "compiler reported no uses" + }, + { + "symbol": "_examples::todos_resource::usersResource::Routes", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Mux::Match", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Mux::Mount", + "truth": [ + "main::Mux::Route" + ], + "found": [ + "main::Mux::Route" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Mux::With", + "truth": [ + "main::Mux::Group" + ], + "found": [ + "main::Mux::Group" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Mux::Handle", + "truth": [ + "main::Mux::HandleFunc" + ], + "found": [ + "main::Mux::HandleFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Mux::MethodNotAllowed", + "truth": [ + "main::Mux::Mount" + ], + "found": [], + "maybe": [ + "main::Mux::Mount" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Mux::Query", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Mux::NotFound", + "truth": [ + "main::Mux::Mount" + ], + "found": [], + "maybe": [ + "main::Mux::Mount" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Middlewares::Handler", + "truth": [ + "main::Mux::handle" + ], + "found": [ + "main::Mux::handle" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::flushHijackWriter::Flush", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::httpFancyWriter::Hijack", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::http2FancyWriter::Push", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::basicWriter::Write", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::ChainHandler::ServeHTTP", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::http2FancyWriter::Flush", + "skipped": "compiler reported no uses" + } + ], + "callers_blind": [ + { + "symbol": "middleware::SetHeader", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::GetLogEntry", + "truth": [ + "middleware::Recoverer" + ], + "found": [ + "middleware::Recoverer" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "_examples::fileserver::FileServer", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Chain", + "truth": [ + "main::Mux::MethodNotAllowed", + "main::Mux::NotFound", + "main::Mux::handle" + ], + "found": [ + "main::Mux::MethodNotAllowed", + "main::Mux::NotFound", + "main::Mux::handle" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::RedirectSlashes", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::Compress", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::Sunset", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Context::Clone", + "skipped": "compiler reported no uses" + }, + { + "symbol": "_examples::rest::ListArticles", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::NewCompressor", + "truth": [ + "middleware::Compress" + ], + "found": [ + "middleware::Compress" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::URLFormat", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::ClientIPFromRemoteAddr", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Walk", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::ClientIPFromXFFTrustedProxies", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::PageRoute", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::RouteContext", + "truth": [ + "main::Mux::Mount", + "main::URLParamFromCtx", + "middleware::CleanPath", + "middleware::GetHead", + "middleware::RedirectSlashes", + "middleware::StripSlashes", + "middleware::SupressNotFound", + "middleware::URLFormat" + ], + "found": [ + "main::Mux::Mount", + "main::URLParamFromCtx", + "middleware::CleanPath", + "middleware::GetHead", + "middleware::RedirectSlashes", + "middleware::StripSlashes", + "middleware::SupressNotFound", + "middleware::URLFormat" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::Profiler", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::Heartbeat", + "skipped": "compiler reported no uses" + }, + { + "symbol": "_examples::rest::GetArticle", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::RequestLogger", + "truth": [ + "middleware::init" + ], + "found": [ + "middleware::init" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::HeaderRouter::RouteAny", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::CleanPath", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::RouteHeaders", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::Deprecation", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::AllowContentEncoding", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::URLParamFromCtx", + "truth": [ + "main::URLParam" + ], + "found": [ + "main::URLParam" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::GetReqID", + "truth": [ + "middleware::DefaultLogFormatter::NewLogEntry" + ], + "found": [ + "middleware::DefaultLogFormatter::NewLogEntry" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "_examples::rest::AdminOnly", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::RealIP", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::PathRewrite", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::GetHead", + "skipped": "compiler reported no uses" + }, + { + "symbol": "main::Mux::NotFoundHandler", + "truth": [ + "main::Mux::ServeHTTP", + "main::Mux::routeHTTP", + "middleware::SupressNotFound" + ], + "found": [ + "main::Mux::ServeHTTP", + "main::Mux::routeHTTP", + "middleware::SupressNotFound" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "middleware::Logger", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::Recoverer", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::RequestID", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::NewWrapResponseWriter", + "truth": [ + "middleware::RequestLogger" + ], + "found": [ + "middleware::RequestLogger" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "_examples::versions::data::PresentError", + "skipped": "compiler reported no uses" + }, + { + "symbol": "_examples::rest::ErrInvalidRequest", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::RequestSize", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::StripPrefix", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::ClientIPFromXFF", + "skipped": "compiler reported no uses" + }, + { + "symbol": "_examples::rest::NewUserPayloadResponse", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::SupressNotFound", + "skipped": "compiler reported no uses" + }, + { + "symbol": "middleware::WithValue", + "skipped": "compiler reported no uses" + } + ], + "rename": [ + { + "symbol": "middleware::GetLogEntry", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "_examples::fileserver::FileServer", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "_examples/fileserver/main.go:62:\t\tfs := http.StripPrefix(pathPrefix, http.FileServer(root))", + "detail": "" + }, + { + "symbol": "main::Chain", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "chain.go:5:// Chain returns a Middlewares type from a slice of middleware handlers.", + "detail": "" + }, + { + "symbol": "middleware::NewCompressor", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Walk", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "tree.go:878:// WalkFunc is the type of the function called for each method and route visited by Walk.\ntree.go:881:// Walk walks any router tree that implements Routes interface.\ntree_test.go:515:\t// Walk the muxBig router tree.\ntree_test.go:603:\t\t\tt.Fatalf(\"expected Walk to include %s, got %v\", rout", + "detail": "" + }, + { + "symbol": "main::RouteContext", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "middleware::RequestLogger", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "_examples/rest/routes.json:14: \"comment\": \"Logger is a middleware that logs the start and end of each request, along\\nwith some useful data about what was requested, what the response status was,\\nand how long it took to return. When standard output is a TTY, Logger will\\nprint in color, othe", + "detail": "" + }, + { + "symbol": "main::NewMux", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "_examples::rest::NewArticleListResponse", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "middleware::GetClientIPAddr", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Middlewares::HandlerFunc", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "_examples/rest/main.go:125:\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n_examples/rest/main.go:236:\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n_examples/rest/main.go:249:\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n_ex", + "detail": "" + }, + { + "symbol": "main::NewRouteContext", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "middleware::NewPattern", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "middleware::Throttle", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "_examples/limits/main.go:1:// This example demonstrates the use of Timeout, and Throttle middlewares.\n_examples/limits/main.go:6:// Throttle: limit the number of in-flight requests along a particular\n_examples/limits/main.go:63:\t// Throttle very expensive handlers/operations.\nmiddleware/throttle.go:", + "detail": "" + }, + { + "symbol": "middleware::Timeout", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "_examples/limits/main.go:1:// This example demonstrates the use of Timeout, and Throttle middlewares.\n_examples/limits/main.go:3:// Timeout: cancel a request if processing takes longer than 2.5 seconds,\nmiddleware/throttle_test.go:32:\t\tTimeout: time.Second * 5, // Maximum waiting time.\nmiddleware/th", + "detail": "" + }, + { + "symbol": "main::Context::RoutePattern", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Mux::NotFoundHandler", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "middleware/heartbeat_test.go:16:\tr.Handle(endpoint, http.NotFoundHandler())\nmiddleware/strip_test.go:277:\th := RedirectSlashes(http.NotFoundHandler())", + "detail": "" + }, + { + "symbol": "main::endpoints::Value", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "_examples/rest/main.go:177:\tarticle := r.Context().Value(\"article\").(*Article)\n_examples/rest/main.go:187:\tarticle := r.Context().Value(\"article\").(*Article)\n_examples/rest/main.go:207:\tarticle := r.Context().Value(\"article\").(*Article)\n_examples/rest/routes.json:28: \"comment\": \"URLFormat is ", + "detail": "# github.com/go-chi/chi/v5\n./context.go:26:16: ctx.ValueGnx undefined (type context.Context has no field or method ValueGnx)\nFAIL\tgithub.com/go-chi/chi/v5 [build failed]\nFAIL\tgithub.com/go-chi/chi/v5/middleware [build failed]\nFAIL\n" + }, + { + "symbol": "main::node::InsertRoute", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::node::FindRoute", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::URLParamFromCtx", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "middleware::GetReqID", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "middleware::NewWrapResponseWriter", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "middleware::compressResponseWriter::Close", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "middleware/compress_test.go:50:\tdefer ts.Close()\nmiddleware/compress_test.go:123:\t\t\tdefer ts.Close()\nmiddleware/compress_test.go:248:\treader.Close()\nmiddleware/get_head_test.go:38:\tdefer ts.Close()\nmiddleware/middleware_test.go:118:\tdefer server.Close()", + "detail": "sp.Body.CloseGnx undefined (type io.ReadCloser has no field or method CloseGnx)\nmiddleware/middleware_test.go:189:18: resp.Body.CloseGnx undefined (type io.ReadCloser has no field or method CloseGnx)\nmiddleware/strip_test.go:300:19: res.Body.CloseGnx undefined (type io.ReadCloser has no field or method CloseGnx)\nmiddleware/supress_notfound_test.go:66:20: resp.Body.CloseGnx undefined (type io.ReadCloser has no field or method CloseGnx)\nFAIL\tgithub.com/go-chi/chi/v5/middleware [build failed]\nFAIL\n" + }, + { + "symbol": "main::NewRouter", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "_examples/rest/main.go:58:\tr := chi.NewRouter()\n_examples/rest/main.go:220:\tr := chi.NewRouter()\n_examples/rest/routes.json:28: \"comment\": \"URLFormat is a middleware that parses the url extension from a request path and stores it\\non the context as a string under the key `middleware.URLFormat", + "detail": "" + }, + { + "symbol": "middleware::Compressor::SetEncoder", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "_examples::rest::ErrRender", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "_examples::rest::NewUserPayloadResponse", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Mux::MethodNotAllowedHandler", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "middleware::PrintPrettyStack", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "_examples::rest::ErrInvalidRequest", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "middleware::HeaderRoute::IsMatch", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::RegisterMethod", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "middleware::ThrottleWithOpts", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "middleware::WithLogEntry", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + } + ], + "mutants": { + "7": [ + "middleware::GetLogEntry", + "_examples::fileserver::FileServer", + "main::Chain", + "middleware::NewCompressor", + "main::Walk", + "main::RouteContext", + "middleware::RequestLogger", + "main::NewMux", + "_examples::rest::NewArticleListResponse", + "middleware::GetClientIPAddr", + "main::Middlewares::HandlerFunc" + ], + "8": [ + "middleware::GetLogEntry", + "_examples::fileserver::FileServer", + "main::URLParamFromCtx", + "middleware::GetReqID", + "main::RouteContext", + "main::Mux::NotFoundHandler", + "middleware::NewWrapResponseWriter", + "middleware::Throttle", + "middleware::compressResponseWriter::Close", + "main::Walk" + ], + "9": [ + "main::Chain", + "middleware::NewWrapResponseWriter", + "_examples::rest::ErrInvalidRequest", + "_examples::rest::NewUserPayloadResponse", + "middleware::NewCompressor", + "middleware::compressResponseWriter::Close", + "main::URLParamFromCtx", + "main::endpoints::Value", + "main::Mux::MethodNotAllowedHandler", + "middleware::HeaderRoute::IsMatch" + ] + }, + "tests": [ + { + "symbol": "middleware::GetLogEntry", + "level": "name", + "truth": 2, + "predicted": 2, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 2, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "TestRecoverer", + "TestRecovererNoColor" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "_examples::fileserver::FileServer", + "skipped": "no test fails when it throws", + "predicted": 0 + }, + { + "symbol": "main::Chain", + "level": "name", + "truth": 11, + "predicted": 2, + "recall": 0.18181818181818182, + "precision": 1.0, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestMuxComplicatedNotFound", + "TestMuxMiddlewareStack", + "TestMuxNestedNotFound", + "TestMuxRouteGroups", + "TestMuxWith", + "TestNestedGroups", + "TestRouterFromMuxWith", + "TestWalkInlineMiddlewaresAcrossSubrouter" + ], + "recall_graph_only": 0.18181818181818182 + }, + { + "symbol": "middleware::NewCompressor", + "level": "name", + "truth": 3, + "predicted": 3, + "recall": 1.0, + "precision": 1.0, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "main::Walk", + "level": "name", + "truth": 5, + "predicted": 5, + "recall": 1.0, + "precision": 1.0, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "main::RouteContext", + "level": "name", + "truth": 31, + "predicted": 27, + "recall": 0.7419354838709677, + "precision": 0.8518518518518519, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestCleanPath", + "TestMuxComplicatedNotFound", + "TestMuxNestedMethodNotAllowed", + "TestMuxNestedNotFound", + "TestMuxRegexp3", + "TestMuxSubroutes", + "TestNestedGroups", + "TestPattern" + ], + "recall_graph_only": 0.7419354838709677 + }, + { + "symbol": "middleware::RequestLogger", + "skipped": "mutant does not compile" + }, + { + "symbol": "main::NewMux", + "level": "name", + "truth": 101, + "predicted": 104, + "recall": 0.9801980198019802, + "precision": 0.9519230769230769, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "Example_clientIP", + "Example_clientIPFromXFFTrustedProxies" + ], + "recall_graph_only": 0.9801980198019802 + }, + { + "symbol": "_examples::rest::NewArticleListResponse", + "skipped": "no test fails when it throws", + "predicted": 0 + }, + { + "symbol": "middleware::GetClientIPAddr", + "level": "name", + "truth": 24, + "predicted": 19, + "recall": 0.7916666666666666, + "precision": 1.0, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "Example_clientIP", + "Example_clientIPFromXFFTrustedProxies", + "TestRecovererNoColor", + "TestRequestLogger", + "TestRequestLoggerReadFrom" + ], + "recall_graph_only": 0.7916666666666666 + }, + { + "symbol": "main::Middlewares::HandlerFunc", + "level": "name", + "truth": 1, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "TestMuxNestedNotFound" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "main::URLParamFromCtx", + "level": "name", + "truth": 20, + "predicted": 23, + "recall": 1.0, + "precision": 0.8695652173913043, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "middleware::GetReqID", + "level": "name", + "truth": 4, + "predicted": 1, + "recall": 0.25, + "precision": 1.0, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestRecovererNoColor", + "TestRequestLogger", + "TestRequestLoggerReadFrom" + ], + "recall_graph_only": 0.25 + }, + { + "symbol": "main::Mux::NotFoundHandler", + "level": "name", + "truth": 14, + "predicted": 43, + "recall": 0.6428571428571429, + "precision": 0.20930232558139536, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "top_best": 0.9, + "caught": 1.0, + "missed": [ + "TestGetHead", + "TestRedirectSlashes", + "TestStripPrefix", + "TestStripSlashes", + "TestStripSlashesInRoute" + ], + "recall_graph_only": 0.07142857142857142 + }, + { + "symbol": "middleware::NewWrapResponseWriter", + "level": "name", + "truth": 5, + "predicted": 8, + "recall": 0.6, + "precision": 0.375, + "top_hits": 3, + "top_n": 8, + "top_precision": 0.375, + "top_best": 0.375, + "caught": 1.0, + "missed": [ + "TestRequestLogger", + "TestRequestLoggerReadFrom" + ], + "recall_graph_only": 0.6 + }, + { + "symbol": "middleware::Throttle", + "skipped": "no test fails when it throws", + "predicted": 7 + }, + { + "symbol": "middleware::compressResponseWriter::Close", + "level": "name", + "truth": 2, + "predicted": 46, + "recall": 1.0, + "precision": 0.043478260869565216, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "top_best": 0.2, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "_examples::rest::ErrInvalidRequest", + "skipped": "no test fails when it throws", + "predicted": 0 + }, + { + "symbol": "_examples::rest::NewUserPayloadResponse", + "skipped": "no test fails when it throws", + "predicted": 0 + }, + { + "symbol": "main::endpoints::Value", + "level": "name", + "truth": 105, + "predicted": 52, + "recall": 0.45714285714285713, + "precision": 0.9230769230769231, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "Example_clientIP", + "Example_clientIPFromXFFTrustedProxies", + "TestBasicAuth", + "TestCleanPath", + "TestCompressor", + "TestCompressorDefaultTextTypes", + "TestContentCharset", + "TestContentCharsetMediaParameters" + ], + "recall_graph_only": 0.4380952380952381 + }, + { + "symbol": "main::Mux::MethodNotAllowedHandler", + "level": "name", + "truth": 4, + "predicted": 41, + "recall": 1.0, + "precision": 0.0975609756097561, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "top_best": 0.4, + "caught": 1.0, + "missed": [], + "recall_graph_only": 0.0 + }, + { + "symbol": "middleware::HeaderRoute::IsMatch", + "level": "name", + "truth": 1, + "predicted": 2, + "recall": 1.0, + "precision": 0.5, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "top_best": 0.5, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + } + ], + "look": [ + { + "symbol": "middleware::GetLogEntry", + "look_tokens": 166, + "file_tokens": 1260 + }, + { + "symbol": "_examples::fileserver::FileServer", + "look_tokens": 278, + "file_tokens": 381 + }, + { + "symbol": "main::Chain", + "look_tokens": 146, + "file_tokens": 380 + }, + { + "symbol": "middleware::NewCompressor", + "look_tokens": 950, + "file_tokens": 3041 + }, + { + "symbol": "main::Walk", + "look_tokens": 187, + "file_tokens": 5518 + }, + { + "symbol": "main::RouteContext", + "look_tokens": 328, + "file_tokens": 1447 + }, + { + "symbol": "middleware::RequestLogger", + "look_tokens": 308, + "file_tokens": 1260 + }, + { + "symbol": "main::NewMux", + "look_tokens": 244, + "file_tokens": 4327 + }, + { + "symbol": "_examples::rest::NewArticleListResponse", + "look_tokens": 149, + "file_tokens": 3876 + }, + { + "symbol": "middleware::GetClientIPAddr", + "look_tokens": 352, + "file_tokens": 3263 + }, + { + "symbol": "main::Middlewares::HandlerFunc", + "look_tokens": 145, + "file_tokens": 380 + }, + { + "symbol": "main::NewRouteContext", + "look_tokens": 217, + "file_tokens": 1447 + }, + { + "symbol": "middleware::NewPattern", + "look_tokens": 153, + "file_tokens": 1042 + }, + { + "symbol": "middleware::Throttle", + "look_tokens": 297, + "file_tokens": 1175 + }, + { + "symbol": "middleware::Timeout", + "look_tokens": 417, + "file_tokens": 306 + }, + { + "symbol": "main::Context::RoutePattern", + "look_tokens": 390, + "file_tokens": 1447 + }, + { + "symbol": "main::Mux::NotFoundHandler", + "look_tokens": 292, + "file_tokens": 4327 + }, + { + "symbol": "main::endpoints::Value", + "look_tokens": 262, + "file_tokens": 5518 + }, + { + "symbol": "main::node::InsertRoute", + "look_tokens": 782, + "file_tokens": 5518 + }, + { + "symbol": "main::node::FindRoute", + "look_tokens": 361, + "file_tokens": 5518 + }, + { + "symbol": "main::URLParamFromCtx", + "look_tokens": 263, + "file_tokens": 1447 + }, + { + "symbol": "middleware::GetReqID", + "look_tokens": 172, + "file_tokens": 736 + }, + { + "symbol": "middleware::NewWrapResponseWriter", + "look_tokens": 415, + "file_tokens": 1604 + }, + { + "symbol": "middleware::compressResponseWriter::Close", + "look_tokens": 276, + "file_tokens": 3041 + }, + { + "symbol": "main::NewRouter", + "look_tokens": 316, + "file_tokens": 1203 + }, + { + "symbol": "middleware::Compressor::SetEncoder", + "look_tokens": 607, + "file_tokens": 3041 + }, + { + "symbol": "_examples::rest::ErrRender", + "look_tokens": 125, + "file_tokens": 3876 + }, + { + "symbol": "_examples::rest::NewUserPayloadResponse", + "look_tokens": 109, + "file_tokens": 3876 + }, + { + "symbol": "main::Mux::MethodNotAllowedHandler", + "look_tokens": 293, + "file_tokens": 4327 + }, + { + "symbol": "middleware::PrintPrettyStack", + "look_tokens": 143, + "file_tokens": 1291 + }, + { + "symbol": "_examples::rest::ErrInvalidRequest", + "look_tokens": 140, + "file_tokens": 3876 + }, + { + "symbol": "middleware::HeaderRoute::IsMatch", + "look_tokens": 166, + "file_tokens": 1042 + }, + { + "symbol": "main::RegisterMethod", + "look_tokens": 319, + "file_tokens": 5518 + }, + { + "symbol": "middleware::ThrottleWithOpts", + "look_tokens": 736, + "file_tokens": 1175 + }, + { + "symbol": "middleware::WithLogEntry", + "look_tokens": 194, + "file_tokens": 1260 + } + ], + "seconds": 8, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.971, + "callers_checked": 26, + "blind_recall": 1.0, + "blind_checked": 9, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.943, + "rename_checked": 35, + "tests_recall": 0.665, + "tests_precision": 0.614, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.711, + "tests_caught": 0.875, + "tests_checked": 16, + "look_vs_file": 0.219 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 0.95, + "callers_checked": 15, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.587, + "tests_precision": 0.725, + "tests_top10_precision": 0.75, + "tests_top10_best": 0.75, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.258 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 14, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.654, + "tests_precision": 0.544, + "tests_top10_precision": 0.609, + "tests_top10_best": 0.684, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.238 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 0.95, + "callers_checked": 15, + "blind_recall": 1.0, + "blind_checked": 3, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.9, + "rename_checked": 20, + "tests_recall": 0.78, + "tests_precision": 0.601, + "tests_top10_precision": 0.672, + "tests_top10_best": 0.684, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.22 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 26, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "callers_precision": { + "mean": 0.971, + "functions": 26, + "boot_lo": 0.913, + "boot_hi": 1.0, + "boot_half": 0.043, + "seeds": [ + 0.95, + 1.0, + 0.95 + ], + "seed_sd": 0.029, + "threshold": 0.05 + }, + "blind_recall": { + "mean": 1.0, + "functions": 9, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.12 + }, + "common_recall": { + "mean": 0.7, + "functions": 10, + "boot_lo": 0.5, + "boot_hi": 0.9, + "boot_half": 0.2, + "seeds": [ + 0.7, + 0.7, + 0.7 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 10, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.1 + }, + "common_precision": { + "mean": 1.0, + "functions": 7, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.15 + }, + "rename_ok": { + "mean": 0.943, + "functions": 35, + "boot_lo": 0.886, + "boot_hi": 1.0, + "boot_half": 0.057, + "seeds": [ + 0.95, + 0.95, + 0.9 + ], + "seed_sd": 0.029, + "threshold": 0.06 + }, + "tests_recall": { + "mean": 0.665, + "functions": 16, + "boot_lo": 0.514, + "boot_hi": 0.807, + "boot_half": 0.146, + "seeds": [ + 0.587, + 0.654, + 0.78 + ], + "seed_sd": 0.098, + "threshold": 0.15 + }, + "tests_precision": { + "mean": 0.614, + "functions": 16, + "boot_lo": 0.443, + "boot_hi": 0.776, + "boot_half": 0.166, + "seeds": [ + 0.725, + 0.544, + 0.601 + ], + "seed_sd": 0.093, + "threshold": 0.17 + }, + "tests_top10_precision": { + "mean": 0.667, + "functions": 16, + "boot_lo": 0.509, + "boot_hi": 0.823, + "boot_half": 0.157, + "seeds": [ + 0.75, + 0.609, + 0.672 + ], + "seed_sd": 0.07, + "threshold": 0.16 + }, + "tests_top10_best": { + "mean": 0.711, + "functions": 16, + "boot_lo": 0.55, + "boot_hi": 0.861, + "boot_half": 0.155, + "seeds": [ + 0.75, + 0.684, + 0.684 + ], + "seed_sd": 0.038, + "threshold": 0.16 + }, + "tests_caught": { + "mean": 0.875, + "functions": 16, + "boot_lo": 0.75, + "boot_hi": 1.0, + "boot_half": 0.125, + "seeds": [ + 0.75, + 0.875, + 1.0 + ], + "seed_sd": 0.125, + "threshold": 0.13 + }, + "look_vs_file": { + "mean": 0.219, + "functions": 35, + "boot_lo": 0.156, + "boot_hi": 0.294, + "boot_half": 0.069, + "seeds": [ + 0.258, + 0.238, + 0.22 + ], + "seed_sd": 0.019, + "threshold": 0.07 + } + } + }, + { + "repo": "click", + "lang": "python", + "commit": "8abb77a8432e", + "index_seconds": 0.2, + "symbols": 761, + "files": 32, + "seeds": [ + 7, + 8, + 9 + ], + "edges": 9729, + "sample": [ + "click::types::Path::coerce_path_result", + "click::core::Option::get_help_extra", + "click::formatting::HelpFormatter::write_heading", + "click::formatting::HelpFormatter::indentation", + "click::globals::push_context", + "click::_textwrap::TextWrapper::extra_indent", + "click::termui::confirm", + "click::decorators::argument", + "click::core::Command::format_usage", + "click::decorators::option", + "click::_compat::should_strip_ansi", + "click::_winconsole::get_buffer", + "click::core::Parameter::handle_parse_result", + "click::core::Context::get_parameter_source", + "click::core::Context::call_on_close", + "click::formatting::HelpFormatter::write_dl", + "click::core::Group::result_callback", + "click::core::Context::ensure_object", + "click::_compat::get_best_encoding", + "click::_termui_impl::ProgressBar::format_bar", + "click::testing::make_input_stream", + "click::utils::format_filename", + "click::formatting::HelpFormatter::indent", + "click::_compat::get_text_stdout", + "click::_termui_impl::Editor::get_editor", + "click::types::Choice::get_invalid_choice_message", + "click::testing::_NamedTextIOWrapper::fileno", + "click::core::Command::get_short_help_str", + "click::decorators::confirmation_option", + "click::_termui_impl::ProgressBar::render_progress", + "examples::repo::repo::Repo::set_config", + "click::termui::hidden_prompt_func", + "click::shell_completion::split_arg_string", + "click::core::Option::prompt_for_value", + "click::utils::make_str", + "click::core::Context::find_object", + "click::core::Command::format_help_text", + "click::core::Context::abort", + "click::formatting::iter_rows", + "click::_compat::open_stream", + "click::_compat::get_binary_stderr", + "examples::validation::validation::validate_count", + "click::_termui_impl::ProgressBar::format_progress_line", + "click::core::Parameter::value_is_missing", + "click::testing::_FDCapture::start", + "click::testing::_FDCapture::stop", + "click::_termui_impl::ProgressBar::make_step", + "click::termui::echo_via_pager", + "click::_termui_impl::ProgressBar::update", + "click::termui::style", + "click::parser::_OptionParser::add_argument" + ], + "sample_common": [], + "samples": { + "7": [ + "click::types::Path::coerce_path_result", + "click::core::Option::get_help_extra", + "click::formatting::HelpFormatter::write_heading", + "click::formatting::HelpFormatter::indentation", + "click::globals::push_context", + "click::_textwrap::TextWrapper::extra_indent", + "click::termui::confirm", + "click::decorators::argument", + "click::core::Command::format_usage", + "click::decorators::option", + "click::_compat::should_strip_ansi", + "click::_winconsole::get_buffer", + "click::core::Parameter::handle_parse_result", + "click::core::Context::get_parameter_source", + "click::core::Context::call_on_close", + "click::formatting::HelpFormatter::write_dl", + "click::core::Group::result_callback", + "click::core::Context::ensure_object", + "click::_compat::get_best_encoding", + "click::_termui_impl::ProgressBar::format_bar" + ], + "8": [ + "click::testing::make_input_stream", + "click::utils::format_filename", + "click::formatting::HelpFormatter::indent", + "click::_compat::get_text_stdout", + "click::_termui_impl::Editor::get_editor", + "click::types::Choice::get_invalid_choice_message", + "click::testing::_NamedTextIOWrapper::fileno", + "click::core::Command::get_short_help_str", + "click::_compat::get_best_encoding", + "click::decorators::confirmation_option", + "click::_termui_impl::ProgressBar::render_progress", + "examples::repo::repo::Repo::set_config", + "click::termui::hidden_prompt_func", + "click::shell_completion::split_arg_string", + "click::core::Option::prompt_for_value", + "click::utils::make_str", + "click::core::Context::find_object", + "click::core::Command::format_help_text", + "click::core::Context::abort", + "click::formatting::iter_rows" + ], + "9": [ + "click::core::Context::get_parameter_source", + "click::_compat::open_stream", + "click::_compat::get_binary_stderr", + "examples::validation::validation::validate_count", + "click::_termui_impl::ProgressBar::format_bar", + "click::_termui_impl::ProgressBar::format_progress_line", + "click::_termui_impl::Editor::get_editor", + "click::core::Parameter::value_is_missing", + "click::utils::make_str", + "click::testing::_FDCapture::start", + "click::testing::_FDCapture::stop", + "click::_termui_impl::ProgressBar::make_step", + "click::termui::echo_via_pager", + "click::formatting::HelpFormatter::indent", + "click::_termui_impl::ProgressBar::update", + "click::_compat::get_best_encoding", + "click::shell_completion::split_arg_string", + "click::termui::style", + "click::core::Context::call_on_close", + "click::parser::_OptionParser::add_argument" + ] + }, + "samples_common": { + "7": [], + "8": [], + "9": [] + }, + "samples_blind": { + "7": [], + "8": [], + "9": [] + }, + "baseline_failing_tests": [], + "callers": [], + "callers_common": [], + "callers_blind": [], + "rename": [ + { + "symbol": "click::types::Path::coerce_path_result", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Option::get_help_extra", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/click/core.py:3099: Help text indentation is cleaned here instead of only in the\nsrc/click/formatting.py:151: \"\"\"Increases the indentation.\"\"\"\nsrc/click/formatting.py:155: \"\"\"Decreases the indentation.\"\"\"\nsrc/click/formatting.py:290: \"\"\"A context manager that increase", + "detail": "" + }, + { + "symbol": "click::globals::push_context", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::_textwrap::TextWrapper::extra_indent", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::termui::confirm", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/click/core.py:227: \"\"\"Used a prompt to confirm a default or provide a value.\"\"\"\nsrc/click/core.py:3063: :param confirmation_prompt: Prompt a second time to confirm the\nsrc/click/termui.py:191: :param confirmation_prompt: Prompt a second time to confirm the\ntests/test_utils/test_prompt.p", + "detail": "" + }, + { + "symbol": "click::decorators::argument", + "ok": false, + "compiled": true, + "tests_ok": false, + "tests_failed": [ + "tests/test_arguments.py::test_deprecated_warning" + ], + "old_name_left": "examples/repo/repo.py:122: \" argument gets converted into a new line.\",\nsrc/click/core.py:892: 1. the first argument can be a callback and all other arguments and\nsrc/click/core.py:894: 2. the first argument is a click command object. In that case all\nsrc/click/core.py:1005: ", + "detail": "" + }, + { + "symbol": "click::core::Command::format_usage", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::decorators::option", + "ok": false, + "compiled": true, + "tests_ok": false, + "tests_failed": [ + "tests/test_context.py::test_parameter_source", + "tests/test_options.py::test_deprecated_warning" + ], + "old_name_left": "examples/aliases/aliases.py:57: # Alternative option: if we did not find an explicit alias we\nsrc/click/_termui_impl.py:522: line: only short-option clusters (``-R``, ``-rX``, ``-XrY``) and the\nsrc/click/_termui_impl.py:523: ``--raw-control-chars`` long option request raw mode. Filename", + "detail": "" + }, + { + "symbol": "click::_compat::should_strip_ansi", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/click/testing.py:535: def should_strip_ansi(\nsrc/click/testing.py:551: utils.should_strip_ansi_gnx = should_strip_ansi # type: ignore\nsrc/click/testing.py:552: _compat.should_strip_ansi_gnx = should_strip_ansi", + "detail": "" + }, + { + "symbol": "click::_winconsole::get_buffer", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/click/_winconsole.py:80: get_buffer = None\nsrc/click/_winconsole.py:276: get_buffer is None", + "detail": "" + }, + { + "symbol": "click::core::Parameter::handle_parse_result", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Context::get_parameter_source", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Context::call_on_close", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::formatting::HelpFormatter::write_dl", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Group::result_callback", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/click/core.py:1765: result_callback: t.Callable[..., t.Any] | None = None,\nsrc/click/core.py:1801: self._result_callback = result_callback", + "detail": "" + }, + { + "symbol": "click::core::Context::ensure_object", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::_compat::get_best_encoding", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::_termui_impl::ProgressBar::format_bar", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::testing::make_input_stream", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::utils::format_filename", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::formatting::HelpFormatter::indent", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/click/_textwrap.py:86: indent = self.subsequent_indent\nsrc/click/_textwrap.py:88: indent = self.initial_indent\nsrc/click/_textwrap.py:89: if term_len(indent) + term_len(self.placeholder.lstrip()) > self.width:\nsrc/click/_textwrap.py:99: ind", + "detail": "" + }, + { + "symbol": "click::_compat::get_text_stdout", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::_termui_impl::Editor::get_editor", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::types::Choice::get_invalid_choice_message", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::testing::_NamedTextIOWrapper::fileno", + "ok": false, + "compiled": true, + "tests_ok": false, + "tests_failed": [ + "tests/test_testing.py::test_capture_fd_faulthandler", + "tests/test_testing.py::test_capture_fd_logging_handler", + "tests/test_testing.py::test_capture_fd_nesting", + "tests/test_testing.py::test_capture_fd_os_write", + "tests/test_testing.py::test_capture_fd_stale_reference", + "tests/test_testing.py::test_capture_fd_stderr_separation", + "tests/test_testing.py::test_capture_pytest_matrix", + "tests/test_types/test_convert_type.py::test_type_inferred_from_default" + ], + "old_name_left": "src/click/_termui_impl.py:944: fd = sys.stdin.fileno()\nsrc/click/_winconsole.py:264: fileno = f.fileno_gnx()\nsrc/click/_winconsole.py:268: handle = msvcrt.get_osfhandle(fileno)\ntests/test_testing.py:877: sys.stdout.fileno()\ntests/test_testing.py:879: sys.st", + "detail": "" + }, + { + "symbol": "click::core::Command::get_short_help_str", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::decorators::confirmation_option", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::_termui_impl::ProgressBar::render_progress", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "examples::repo::repo::Repo::set_config", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::termui::hidden_prompt_func", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::shell_completion::split_arg_string", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Option::prompt_for_value", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::utils::make_str", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Context::find_object", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Command::format_help_text", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Context::abort", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/click/core.py:104: \"\"\"Write the final abort message to standard error.\"\"\"\nsrc/click/exceptions.py:363: \"\"\"An internal signalling exception that signals Click to abort.\"\"\"\nsrc/click/termui.py:292: abort: bool = False,\nsrc/click/termui.py:305: :param abort: if this is set to `True` a n", + "detail": "" + }, + { + "symbol": "click::formatting::iter_rows", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::_compat::open_stream", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::_compat::get_binary_stderr", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "examples::validation::validation::validate_count", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::_termui_impl::ProgressBar::format_progress_line", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Parameter::value_is_missing", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::testing::_FDCapture::start", + "ok": false, + "compiled": true, + "tests_ok": false, + "tests_failed": [ + "tests/test_compat.py::test_ansi_re_matches_whole_sequence", + "tests/test_stream_lifecycle.py::test_invoke_with_threads_writing_to_streams", + "tests/test_testing.py::test_tempdir_isolation_is_thread_safe" + ], + "old_name_left": "pyproject.toml:207:description = \"continuously rebuild docs and start a local server\"\nsrc/click/_termui_impl.py:105: self.start: float\nsrc/click/_termui_impl.py:106: self.start = self.last_eta = time.time()\nsrc/click/_termui_impl.py:310: step = (time.time() - self.start) / s", + "detail": "" + }, + { + "symbol": "click::testing::_FDCapture::stop", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "docs/_static/click-logo.svg:16: (src, { schema: 'yaml-1.1' })\ntests/doc/YAML-1.2.spec.ts:675: const doc = YAML.pa", + "detail": "" + }, + { + "symbol": "src::doc::anchors::anchorIsValid", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::nodes::toJS::ToJSContext::setAnchor", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::doc::anchors::anchorNames", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::parse::cst::prettyToken", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::log::warn", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/log.ts:8: if (logLevel === 'debug' || logLevel === 'warn') {\nsrc/log.ts:15: console.warn(warning)\nsrc/options.ts:82: * When parsing, warn about compatibility issues with the given schema.\ntests/doc/YAML-1.1.spec.ts:21: const warn = (tag: string) => ({ message: `Unresolved tag: ${tag}` }", + "detail": "src/log.ts(8,31): error TS2367: This comparison appears to be unintentional because the types '\"silent\" | \"error\" | \"warn_gnx\"' and '\"warn\"' have no overlap.\n" + }, + { + "symbol": "src::nodes::toJS::ToJSContext::setSource", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::stringify::stringifyComment::lineComment", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::nodes::YAMLSeq::YAMLSeq::#stringifyBlockSeq", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "fatal: no pattern given", + "detail": "" + }, + { + "symbol": "src::compose::composer::Composer::compose", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/cli.ts:8:import { Composer } from './compose/composer.ts'\nsrc/compose/compose-collection.ts:14:import type { ComposeContext, ComposeNode } from './compose-node.ts'\nsrc/compose/compose-doc.ts:13:} from './compose-node.ts'\nsrc/compose/compose-node.ts:8:import { composeCollection } from './compose-", + "detail": "" + }, + { + "symbol": "src::doc::NodeCreator::NodeCreator::setAnchors", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::compose::resolve_block_seq::resolveBlockSeq", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::compose::compose_scalar::composeScalar", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::parse::cst::tokenType", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::parse::lexer::Lexer::flow", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/compose/compose-collection.ts:18:import { resolveFlowCollection } from './resolve-flow-collection.ts'\nsrc/compose/compose-node.ts:66: case 'flow-collection':\nsrc/compose/compose-scalar.ts:8:import { resolveFlowScalar } from './resolve-flow-scalar.ts'\nsrc/compose/composer.ts:107: } else i", + "detail": "src/parse/lexer.ts(73,9): error TS2322: Type '\"stream\" | \"document\" | \"flow\"' is not assignable to type '\"stream\" | \"document\" | \"flow_gnx\"'.\n Type '\"flow\"' is not assignable to type '\"stream\" | \"document\" | \"flow_gnx\"'.\nsrc/parse/lexer.ts(334,33): error TS2322: Type '\"flow_gnx\"' is not assignable to type '\"stream\" | \"document\" | \"flow\"'.\nsrc/parse/lexer.ts(366,5): error TS2322: Type '\"flow_gnx\"' is not assignable to type '\"stream\" | \"document\" | \"flow\"'.\n" + }, + { + "symbol": "src::compose::resolve_block_map::resolveBlockMap", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::nodes::YAMLSeq::YAMLSeq::unshift", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "ift_gnx' does not exist on type 'number[]'.\nsrc/schema/yaml-1.1/timestamp.ts(41,11): error TS2339: Property 'unshift_gnx' does not exist on type 'number[]'.\nsrc/schema/yaml-1.1/timestamp.ts(44,13): error TS2339: Property 'unshift_gnx' does not exist on type 'number[]'.\nsrc/stringify/stringifyDocument.ts(29,35): error TS2339: Property 'unshift_gnx' does not exist on type 'string[]'.\nsrc/stringify/stringifyDocument.ts(31,11): error TS2339: Property 'unshift_gnx' does not exist on type 'string[]'.\n" + }, + { + "symbol": "src::nodes::YAMLSet::YAMLSet::#stringifyFlowSet", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "fatal: no pattern given", + "detail": "" + }, + { + "symbol": "src::nodes::YAMLSeq::YAMLSeq::#stringifyFlowSeq", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "fatal: no pattern given", + "detail": "" + }, + { + "symbol": "src::compose::util_contains_newline::containsNewline", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::nodes::YAMLSet::YAMLSet::#stringifyBlockSet", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "fatal: no pattern given", + "detail": "" + }, + { + "symbol": "src::compose::compose_doc::composeDoc", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::schema::yaml_1_1::pairs::resolvePairs", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/schema/yaml-1.1/pairs.ts:78: resolve: resolvePairs,", + "detail": "src/schema/yaml-1.1/pairs.ts(78,12): error TS2552: Cannot find name 'resolvePairs'. Did you mean 'resolvePairsGnx'?\n" + }, + { + "symbol": "src::stringify::stringify::createStringifyContext", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::schema::tags::getTags", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::errors::prettifyError", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "src::compose::resolve_props::resolveProps", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + } + ], + "mutants": { + "7": [ + "src::compose::resolve_flow_scalar::resolveFlowScalar", + "src::compose::resolve_end::resolveEnd", + "src::nodes::toJS::ToJSContext::resolveAlias", + "src::public_api::parseAllDocuments", + "src::nodes::YAMLMap::YAMLMap::#stringifyFlowMap", + "src::compose::util_flow_indent_check::flowIndentCheck", + "src::compose::compose_collection::composeCollection", + "src::doc::Document::Document::setSchema", + "src::doc::directives::Directives::atDocument" + ], + "8": [ + "src::nodes::YAMLSeq::YAMLSeq::#stringifyBlockSeq", + "src::compose::composer::Composer::compose", + "src::nodes::toJS::ToJSContext::setAnchor", + "src::doc::NodeCreator::NodeCreator::setAnchors", + "src::compose::resolve_block_seq::resolveBlockSeq", + "src::compose::compose_collection::composeCollection", + "src::compose::compose_scalar::composeScalar", + "src::parse::cst::tokenType" + ], + "9": [ + "src::doc::Document::Document::setSchema", + "src::compose::util_contains_newline::containsNewline", + "src::nodes::YAMLSet::YAMLSet::#stringifyBlockSet", + "src::compose::compose_doc::composeDoc", + "src::schema::yaml_1_1::pairs::resolvePairs", + "src::parse::lexer::Lexer::flow", + "src::nodes::YAMLMap::YAMLMap::#stringifyFlowMap", + "src::nodes::YAMLSet::YAMLSet::#stringifyFlowSet" + ] + }, + "tests": [ + { + "symbol": "src::compose::resolve_flow_scalar::resolveFlowScalar", + "skipped": "mutant does not compile" + }, + { + "symbol": "src::compose::resolve_end::resolveEnd", + "level": "file", + "truth": 19, + "predicted": 13, + "recall": 0.5789473684210527, + "precision": 0.8461538461538461, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "tests/cst.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/properties.ts" + ] + }, + { + "symbol": "src::nodes::toJS::ToJSContext::resolveAlias", + "level": "file", + "truth": 6, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/cli.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/node-to-js.ts" + ] + }, + { + "symbol": "src::public_api::parseAllDocuments", + "level": "file", + "truth": 4, + "predicted": 2, + "recall": 0.25, + "precision": 0.5, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "top_best": 0.5, + "caught": 1.0, + "missed": [ + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/errors.ts", + "tests/doc/parse.ts" + ] + }, + { + "symbol": "src::nodes::YAMLMap::YAMLMap::#stringifyFlowMap", + "level": "file", + "truth": 8, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/cli.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts" + ] + }, + { + "symbol": "src::compose::util_flow_indent_check::flowIndentCheck", + "level": "file", + "truth": 1, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/compat.ts" + ] + }, + { + "symbol": "src::compose::compose_collection::composeCollection", + "level": "file", + "truth": 17, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts" + ] + }, + { + "symbol": "src::doc::Document::Document::setSchema", + "level": "file", + "truth": 20, + "predicted": 1, + "recall": 0.05, + "precision": 1.0, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts" + ] + }, + { + "symbol": "src::doc::directives::Directives::atDocument", + "level": "file", + "truth": 18, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts" + ] + }, + { + "symbol": "src::nodes::YAMLSeq::YAMLSeq::#stringifyBlockSeq", + "level": "file", + "truth": 12, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/collection-access.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts" + ] + }, + { + "symbol": "src::compose::composer::Composer::compose", + "level": "file", + "truth": 17, + "predicted": 14, + "recall": 0.7058823529411765, + "precision": 0.8571428571428571, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/stringify.ts" + ] + }, + { + "symbol": "src::nodes::toJS::ToJSContext::setAnchor", + "level": "file", + "truth": 6, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/cli.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/node-to-js.ts" + ] + }, + { + "symbol": "src::doc::NodeCreator::NodeCreator::setAnchors", + "level": "file", + "truth": 20, + "predicted": 7, + "recall": 0.35, + "precision": 1.0, + "top_hits": 7, + "top_n": 7, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "tests/cli.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts" + ] + }, + { + "symbol": "src::compose::resolve_block_seq::resolveBlockSeq", + "level": "file", + "truth": 13, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts" + ] + }, + { + "symbol": "src::compose::compose_scalar::composeScalar", + "level": "file", + "truth": 18, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts" + ] + }, + { + "symbol": "src::parse::cst::tokenType", + "level": "file", + "truth": 19, + "predicted": 14, + "recall": 0.631578947368421, + "precision": 0.8571428571428571, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/properties.ts" + ] + }, + { + "symbol": "src::compose::util_contains_newline::containsNewline", + "level": "file", + "truth": 17, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts" + ] + }, + { + "symbol": "src::nodes::YAMLSet::YAMLSet::#stringifyBlockSet", + "level": "file", + "truth": 2, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/types.ts" + ] + }, + { + "symbol": "src::compose::compose_doc::composeDoc", + "level": "file", + "truth": 18, + "predicted": 13, + "recall": 0.6111111111111112, + "precision": 0.8461538461538461, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/properties.ts" + ] + }, + { + "symbol": "src::schema::yaml_1_1::pairs::resolvePairs", + "level": "file", + "truth": 4, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts" + ] + }, + { + "symbol": "src::parse::lexer::Lexer::flow", + "level": "file", + "truth": 15, + "predicted": 16, + "recall": 0.6, + "precision": 0.5625, + "top_hits": 6, + "top_n": 10, + "top_precision": 0.6, + "top_best": 0.9, + "caught": 1.0, + "missed": [ + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/properties.ts" + ] + }, + { + "symbol": "src::nodes::YAMLSet::YAMLSet::#stringifyFlowSet", + "level": "file", + "truth": 1, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "tests/doc/types.ts" + ] + } + ], + "look": [ + { + "symbol": "src::compose::resolve_flow_scalar::resolveFlowScalar", + "look_tokens": 464, + "file_tokens": 1935 + }, + { + "symbol": "src::compose::resolve_end::resolveEnd", + "look_tokens": 466, + "file_tokens": 298 + }, + { + "symbol": "src::nodes::toJS::ToJSContext::resolveAlias", + "look_tokens": 269, + "file_tokens": 810 + }, + { + "symbol": "src::public_api::parseAllDocuments", + "look_tokens": 431, + "file_tokens": 1638 + }, + { + "symbol": "src::nodes::YAMLMap::YAMLMap::#stringifyFlowMap", + "look_tokens": 660, + "file_tokens": 2836 + }, + { + "symbol": "src::compose::util_flow_indent_check::flowIndentCheck", + "look_tokens": 213, + "file_tokens": 153 + }, + { + "symbol": "src::compose::compose_collection::composeCollection", + "look_tokens": 721, + "file_tokens": 1052 + }, + { + "symbol": "src::doc::Document::Document::setSchema", + "look_tokens": 506, + "file_tokens": 3274 + }, + { + "symbol": "src::doc::directives::Directives::atDocument", + "look_tokens": 232, + "file_tokens": 1479 + }, + { + "symbol": "src::compose::resolve_flow_collection::resolveFlowCollection", + "look_tokens": 1956, + "file_tokens": 2045 + }, + { + "symbol": "src::compose::resolve_block_scalar::resolveBlockScalar", + "look_tokens": 1163, + "file_tokens": 1720 + }, + { + "symbol": "src::nodes::YAMLMap::YAMLMap::#stringifyBlockMap", + "look_tokens": 450, + "file_tokens": 2836 + }, + { + "symbol": "src::public_api::parseDocument", + "look_tokens": 492, + "file_tokens": 1638 + }, + { + "symbol": "src::doc::anchors::anchorIsValid", + "look_tokens": 175, + "file_tokens": 248 + }, + { + "symbol": "src::nodes::toJS::ToJSContext::setAnchor", + "look_tokens": 138, + "file_tokens": 810 + }, + { + "symbol": "src::doc::anchors::anchorNames", + "look_tokens": 240, + "file_tokens": 248 + }, + { + "symbol": "src::parse::cst::prettyToken", + "look_tokens": 179, + "file_tokens": 1265 + }, + { + "symbol": "src::log::warn", + "look_tokens": 217, + "file_tokens": 129 + }, + { + "symbol": "src::nodes::toJS::ToJSContext::setSource", + "look_tokens": 284, + "file_tokens": 810 + }, + { + "symbol": "src::stringify::stringifyComment::lineComment", + "look_tokens": 253, + "file_tokens": 189 + }, + { + "symbol": "src::nodes::YAMLSeq::YAMLSeq::#stringifyBlockSeq", + "look_tokens": 508, + "file_tokens": 2805 + }, + { + "symbol": "src::compose::composer::Composer::compose", + "look_tokens": 333, + "file_tokens": 2191 + }, + { + "symbol": "src::doc::NodeCreator::NodeCreator::setAnchors", + "look_tokens": 337, + "file_tokens": 1323 + }, + { + "symbol": "src::compose::resolve_block_seq::resolveBlockSeq", + "look_tokens": 464, + "file_tokens": 467 + }, + { + "symbol": "src::compose::compose_scalar::composeScalar", + "look_tokens": 477, + "file_tokens": 971 + }, + { + "symbol": "src::parse::cst::tokenType", + "look_tokens": 465, + "file_tokens": 1265 + }, + { + "symbol": "src::parse::lexer::Lexer::flow", + "look_tokens": 772, + "file_tokens": 4124 + }, + { + "symbol": "src::compose::resolve_block_map::resolveBlockMap", + "look_tokens": 1288, + "file_tokens": 1334 + }, + { + "symbol": "src::nodes::YAMLSeq::YAMLSeq::unshift", + "look_tokens": 234, + "file_tokens": 2805 + }, + { + "symbol": "src::nodes::YAMLSet::YAMLSet::#stringifyFlowSet", + "look_tokens": 556, + "file_tokens": 2129 + }, + { + "symbol": "src::nodes::YAMLSeq::YAMLSeq::#stringifyFlowSeq", + "look_tokens": 666, + "file_tokens": 2805 + }, + { + "symbol": "src::compose::util_contains_newline::containsNewline", + "look_tokens": 306, + "file_tokens": 203 + }, + { + "symbol": "src::nodes::YAMLSet::YAMLSet::#stringifyBlockSet", + "look_tokens": 507, + "file_tokens": 2129 + }, + { + "symbol": "src::compose::compose_doc::composeDoc", + "look_tokens": 521, + "file_tokens": 475 + }, + { + "symbol": "src::schema::yaml_1_1::pairs::resolvePairs", + "look_tokens": 340, + "file_tokens": 661 + }, + { + "symbol": "src::stringify::stringify::createStringifyContext", + "look_tokens": 387, + "file_tokens": 1463 + }, + { + "symbol": "src::schema::tags::getTags", + "look_tokens": 430, + "file_tokens": 1031 + }, + { + "symbol": "src::errors::prettifyError", + "look_tokens": 550, + "file_tokens": 718 + }, + { + "symbol": "src::compose::resolve_props::resolveProps", + "look_tokens": 1452, + "file_tokens": 1417 + } + ], + "seconds": 10, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 38, + "blind_recall": 1.0, + "blind_checked": 33, + "common_recall": 0.65, + "common_precision": 1.0, + "common_recall_with_maybe": 0.9, + "common_checked": 10, + "rename_ok": 0.846, + "rename_checked": 39, + "tests_recall": 0.18, + "tests_precision": 0.308, + "tests_top10_precision": 0.319, + "tests_top10_best": 0.352, + "tests_caught": 0.381, + "tests_checked": 21, + "look_vs_file": 0.576 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 17, + "common_recall": 0.688, + "common_precision": 1.0, + "common_recall_with_maybe": 0.938, + "common_checked": 8, + "rename_ok": 0.85, + "rename_checked": 20, + "tests_recall": 0.11, + "tests_precision": 0.293, + "tests_top10_precision": 0.3, + "tests_top10_best": 0.312, + "tests_caught": 0.375, + "tests_checked": 8, + "look_vs_file": 0.623 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 16, + "common_recall": 0.688, + "common_precision": 1.0, + "common_recall_with_maybe": 0.938, + "common_checked": 8, + "rename_ok": 0.9, + "rename_checked": 20, + "tests_recall": 0.211, + "tests_precision": 0.339, + "tests_top10_precision": 0.35, + "tests_top10_best": 0.375, + "tests_caught": 0.375, + "tests_checked": 8, + "look_vs_file": 0.532 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 15, + "common_recall": 0.688, + "common_precision": 1.0, + "common_recall_with_maybe": 0.875, + "common_checked": 8, + "rename_ok": 0.85, + "rename_checked": 20, + "tests_recall": 0.158, + "tests_precision": 0.301, + "tests_top10_precision": 0.312, + "tests_top10_best": 0.362, + "tests_caught": 0.375, + "tests_checked": 8, + "look_vs_file": 0.51 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 38, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 1.0, + "functions": 38, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 1.0, + "functions": 33, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_recall": { + "mean": 0.65, + "functions": 10, + "boot_lo": 0.4, + "boot_hi": 0.9, + "boot_half": 0.25, + "seeds": [ + 0.688, + 0.688, + 0.688 + ], + "seed_sd": 0.0, + "threshold": 0.25 + }, + "common_recall_with_maybe": { + "mean": 0.9, + "functions": 10, + "boot_lo": 0.8, + "boot_hi": 1.0, + "boot_half": 0.1, + "seeds": [ + 0.938, + 0.938, + 0.875 + ], + "seed_sd": 0.036, + "threshold": 0.1 + }, + "common_precision": { + "mean": 1.0, + "functions": 7, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.15 + }, + "rename_ok": { + "mean": 0.846, + "functions": 39, + "boot_lo": 0.744, + "boot_hi": 0.923, + "boot_half": 0.09, + "seeds": [ + 0.85, + 0.9, + 0.85 + ], + "seed_sd": 0.029, + "threshold": 0.09 + }, + "tests_recall": { + "mean": 0.18, + "functions": 21, + "boot_lo": 0.088, + "boot_hi": 0.28, + "boot_half": 0.096, + "seeds": [ + 0.11, + 0.211, + 0.158 + ], + "seed_sd": 0.051, + "threshold": 0.1 + }, + "tests_precision": { + "mean": 0.308, + "functions": 21, + "boot_lo": 0.168, + "boot_hi": 0.453, + "boot_half": 0.142, + "seeds": [ + 0.293, + 0.339, + 0.301 + ], + "seed_sd": 0.025, + "threshold": 0.15 + }, + "tests_top10_precision": { + "mean": 0.319, + "functions": 21, + "boot_lo": 0.171, + "boot_hi": 0.471, + "boot_half": 0.15, + "seeds": [ + 0.3, + 0.35, + 0.312 + ], + "seed_sd": 0.026, + "threshold": 0.15 + }, + "tests_top10_best": { + "mean": 0.352, + "functions": 21, + "boot_lo": 0.19, + "boot_hi": 0.519, + "boot_half": 0.164, + "seeds": [ + 0.312, + 0.375, + 0.362 + ], + "seed_sd": 0.033, + "threshold": 0.17 + }, + "tests_caught": { + "mean": 0.381, + "functions": 21, + "boot_lo": 0.19, + "boot_hi": 0.571, + "boot_half": 0.19, + "seeds": [ + 0.375, + 0.375, + 0.375 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "look_vs_file": { + "mean": 0.576, + "functions": 39, + "boot_lo": 0.463, + "boot_hi": 0.702, + "boot_half": 0.119, + "seeds": [ + 0.623, + 0.532, + 0.51 + ], + "seed_sd": 0.06, + "threshold": 0.12 + } + } + }, + { + "repo": "jsoup", + "lang": "java", + "commit": "d90d57521d93", + "index_seconds": 3.0, + "symbols": 2663, + "files": 105, + "seeds": [ + 7, + 8, + 9 + ], + "edges": 42271, + "sample": [ + "org::jsoup::internal::SoftPool::release", + "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::select::Evaluator::asPredicate", + "org::jsoup::parser::TokenQueue::matchesWord", + "org::jsoup::internal::StringUtil::isAsciiLetter", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::nodes::DocumentType::publicId", + "org::jsoup::parser::ParseErrorList::tracking", + "org::jsoup::nodes::Node::ownerDocument", + "org::jsoup::select::Collector::findFirst", + "org::jsoup::internal::CssMatching::isQuirksMode", + "org::jsoup::nodes::Attributes::hasKey", + "org::jsoup::internal::NamespaceBindings::isDeclaration", + "org::jsoup::select::Collector::streamNodes", + "org::jsoup::Jsoup::newSession", + "org::jsoup::nodes::Document::location", + "org::jsoup::nodes::Entities::isBaseNamedEntity", + "org::jsoup::nodes::Attribute::getValue", + "org::jsoup::nodes::Element::wholeOwnText", + "org::jsoup::safety::Safelist::addTags", + "org::jsoup::internal::StringUtil::isActuallyWhitespace", + "org::jsoup::nodes::Attributes::getIgnoreCase", + "org::jsoup::parser::Parser::getMaxDepth", + "org::jsoup::parser::Tag::isFormSubmittable", + "org::jsoup::nodes::Attributes::removeIgnoreCase", + "org::jsoup::parser::Token::Doctype::getSystemIdentifier", + "org::jsoup::internal::Normalizer::lowerCase", + "org::jsoup::parser::TokenQueue::remainder", + "org::jsoup::select::Selector::evaluatorOf", + "org::jsoup::nodes::Range::AttributeRange::valueRange", + "org::jsoup::nodes::TextNode::getWholeText", + "org::jsoup::internal::LineMap::addLineStart", + "org::jsoup::parser::Tag::isInline", + "org::jsoup::nodes::Element::lastElementChild", + "org::jsoup::parser::Parser::isTrackErrors", + "org::jsoup::internal::LegacyMatching::attributeMatches", + "org::jsoup::nodes::Range::AttributeRange::nameRange", + "org::jsoup::nodes::DocumentType::systemId", + "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "org::jsoup::safety::Safelist::addEnforcedAttribute", + "org::jsoup::parser::TokenQueue::consumeCssIdentifier", + "org::jsoup::nodes::Attributes::deduplicate", + "org::jsoup::nodes::Entities::isNamedEntity", + "org::jsoup::nodes::Attribute::getValidKey", + "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "org::jsoup::nodes::Node::siblingIndex", + "org::jsoup::nodes::Attributes::normalize", + "org::jsoup::internal::StringUtil::joining" + ], + "sample_common": [ + "org::jsoup::parser::Tag::isSelfClosing", + "org::jsoup::nodes::Document::shallowClone", + "org::jsoup::internal::StringUtil::isWhitespace", + "org::jsoup::internal::ControllableInputStream::onProgress", + "org::jsoup::helper::Regex::compile", + "org::jsoup::nodes::Node::normalName", + "org::jsoup::nodes::LeafNode::attributes", + "org::jsoup::parser::Tag::getName", + "org::jsoup::nodes::Document::body", + "org::jsoup::parser::TokenQueue::escapeCssIdentifier", + "org::jsoup::nodes::NodeInternals::sourceDataStart", + "org::jsoup::parser::Parser::parseAttributes", + "org::jsoup::internal::StringUtil::normaliseWhitespace", + "org::jsoup::helper::HttpConnection::KeyVal::hasInputStream", + "org::jsoup::parser::Parser::unescapeEntities", + "org::jsoup::nodes::NodeInternals::clearEndSourceRange", + "org::jsoup::nodes::Element::toggleClass", + "org::jsoup::helper::Re2jRegex::Re2jMatcher::find", + "org::jsoup::internal::ControllableInputStream::mark", + "org::jsoup::parser::CharacterReader::current", + "org::jsoup::helper::Re2jRegex::compile", + "org::jsoup::parser::Tag::localName", + "org::jsoup::nodes::Attributes::attribute", + "org::jsoup::parser::Tag::isBlock", + "org::jsoup::internal::CssMatching::sameType", + "org::jsoup::select::Elements::first", + "org::jsoup::helper::HttpConnection::Base::multiHeaders", + "org::jsoup::nodes::Element::normalName", + "org::jsoup::nodes::Attribute::prefix", + "org::jsoup::parser::Tag::isEmpty", + "org::jsoup::nodes::Node::hasAttr", + "org::jsoup::internal::NamespaceBindings::clear", + "org::jsoup::nodes::Attributes::Dataset::EntrySet::iterator", + "org::jsoup::nodes::Attributes::dataset", + "org::jsoup::select::Elements::forms", + "org::jsoup::parser::TokenQueue::advance", + "org::jsoup::internal::QueryMode::current", + "org::jsoup::nodes::Element::removeClass", + "org::jsoup::parser::TokenQueue::matchesAny", + "org::jsoup::nodes::Element::addClass", + "org::jsoup::nodes::Attributes::size", + "org::jsoup::internal::LineMap::complete", + "org::jsoup::nodes::Node::nodeValue", + "org::jsoup::internal::StringUtil::isBlank", + "org::jsoup::parser::StreamParser::ElementIterator::hasNext", + "org::jsoup::internal::ControllableInputStream::resetFullyRead", + "org::jsoup::nodes::Element::hasText", + "org::jsoup::parser::Tag::prefix", + "org::jsoup::helper::HttpConnection::Response::readFully", + "org::jsoup::nodes::Comment::getData" + ], + "samples": { + "7": [ + "org::jsoup::internal::SoftPool::release", + "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::select::Evaluator::asPredicate", + "org::jsoup::parser::TokenQueue::matchesWord", + "org::jsoup::internal::StringUtil::isAsciiLetter", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::nodes::DocumentType::publicId", + "org::jsoup::parser::ParseErrorList::tracking", + "org::jsoup::nodes::Node::ownerDocument", + "org::jsoup::select::Collector::findFirst", + "org::jsoup::internal::CssMatching::isQuirksMode", + "org::jsoup::nodes::Attributes::hasKey", + "org::jsoup::internal::NamespaceBindings::isDeclaration", + "org::jsoup::select::Collector::streamNodes", + "org::jsoup::Jsoup::newSession", + "org::jsoup::nodes::Document::location", + "org::jsoup::nodes::Entities::isBaseNamedEntity", + "org::jsoup::nodes::Attribute::getValue", + "org::jsoup::nodes::Element::wholeOwnText" + ], + "8": [ + "org::jsoup::safety::Safelist::addTags", + "org::jsoup::internal::StringUtil::isActuallyWhitespace", + "org::jsoup::nodes::Attributes::getIgnoreCase", + "org::jsoup::parser::Parser::getMaxDepth", + "org::jsoup::parser::Tag::isFormSubmittable", + "org::jsoup::nodes::Attributes::removeIgnoreCase", + "org::jsoup::parser::Token::Doctype::getSystemIdentifier", + "org::jsoup::internal::Normalizer::lowerCase", + "org::jsoup::parser::TokenQueue::remainder", + "org::jsoup::select::Selector::evaluatorOf", + "org::jsoup::nodes::Range::AttributeRange::valueRange", + "org::jsoup::nodes::TextNode::getWholeText", + "org::jsoup::internal::LineMap::addLineStart", + "org::jsoup::parser::Tag::isInline", + "org::jsoup::nodes::Element::lastElementChild", + "org::jsoup::select::Evaluator::asPredicate", + "org::jsoup::parser::Parser::isTrackErrors", + "org::jsoup::internal::LegacyMatching::attributeMatches", + "org::jsoup::nodes::Range::AttributeRange::nameRange", + "org::jsoup::nodes::DocumentType::systemId" + ], + "9": [ + "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "org::jsoup::safety::Safelist::addEnforcedAttribute", + "org::jsoup::parser::TokenQueue::consumeCssIdentifier", + "org::jsoup::nodes::Attributes::deduplicate", + "org::jsoup::nodes::DocumentType::publicId", + "org::jsoup::nodes::Entities::isNamedEntity", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::safety::Safelist::addTags", + "org::jsoup::nodes::Attribute::getValidKey", + "org::jsoup::nodes::Element::wholeOwnText", + "org::jsoup::select::Selector::evaluatorOf", + "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "org::jsoup::nodes::Range::AttributeRange::valueRange", + "org::jsoup::nodes::DocumentType::systemId", + "org::jsoup::select::Collector::findFirst", + "org::jsoup::nodes::Node::siblingIndex", + "org::jsoup::nodes::Attributes::normalize", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::internal::CssMatching::isQuirksMode", + "org::jsoup::internal::StringUtil::joining" + ] + }, + "samples_common": { + "7": [ + "org::jsoup::parser::Tag::isSelfClosing", + "org::jsoup::nodes::Document::shallowClone", + "org::jsoup::internal::StringUtil::isWhitespace", + "org::jsoup::internal::ControllableInputStream::onProgress", + "org::jsoup::helper::Regex::compile", + "org::jsoup::nodes::Node::normalName", + "org::jsoup::nodes::LeafNode::attributes", + "org::jsoup::parser::Tag::getName", + "org::jsoup::nodes::Document::body", + "org::jsoup::parser::TokenQueue::escapeCssIdentifier", + "org::jsoup::nodes::NodeInternals::sourceDataStart", + "org::jsoup::parser::Parser::parseAttributes", + "org::jsoup::internal::StringUtil::normaliseWhitespace", + "org::jsoup::helper::HttpConnection::KeyVal::hasInputStream", + "org::jsoup::parser::Parser::unescapeEntities", + "org::jsoup::nodes::NodeInternals::clearEndSourceRange", + "org::jsoup::nodes::Element::toggleClass", + "org::jsoup::helper::Re2jRegex::Re2jMatcher::find", + "org::jsoup::internal::ControllableInputStream::mark", + "org::jsoup::parser::CharacterReader::current" + ], + "8": [ + "org::jsoup::helper::Re2jRegex::compile", + "org::jsoup::parser::Tag::localName", + "org::jsoup::nodes::Attributes::attribute", + "org::jsoup::parser::Tag::isBlock", + "org::jsoup::parser::Parser::parseAttributes", + "org::jsoup::internal::CssMatching::sameType", + "org::jsoup::select::Elements::first", + "org::jsoup::internal::ControllableInputStream::onProgress", + "org::jsoup::helper::HttpConnection::Base::multiHeaders", + "org::jsoup::nodes::Element::normalName", + "org::jsoup::nodes::Attribute::prefix", + "org::jsoup::parser::Tag::isEmpty", + "org::jsoup::nodes::Node::hasAttr", + "org::jsoup::internal::NamespaceBindings::clear", + "org::jsoup::nodes::Attributes::Dataset::EntrySet::iterator", + "org::jsoup::nodes::Attributes::dataset", + "org::jsoup::select::Elements::forms", + "org::jsoup::parser::TokenQueue::advance", + "org::jsoup::internal::QueryMode::current", + "org::jsoup::nodes::Element::removeClass" + ], + "9": [ + "org::jsoup::parser::TokenQueue::matchesAny", + "org::jsoup::nodes::Element::addClass", + "org::jsoup::nodes::Node::hasAttr", + "org::jsoup::nodes::Attributes::size", + "org::jsoup::nodes::Attributes::dataset", + "org::jsoup::nodes::Node::normalName", + "org::jsoup::helper::HttpConnection::KeyVal::hasInputStream", + "org::jsoup::parser::Tag::isSelfClosing", + "org::jsoup::internal::LineMap::complete", + "org::jsoup::nodes::Node::nodeValue", + "org::jsoup::helper::Re2jRegex::Re2jMatcher::find", + "org::jsoup::internal::StringUtil::isBlank", + "org::jsoup::parser::StreamParser::ElementIterator::hasNext", + "org::jsoup::internal::ControllableInputStream::resetFullyRead", + "org::jsoup::nodes::Attributes::Dataset::EntrySet::iterator", + "org::jsoup::internal::ControllableInputStream::mark", + "org::jsoup::nodes::Element::hasText", + "org::jsoup::parser::Tag::prefix", + "org::jsoup::helper::HttpConnection::Response::readFully", + "org::jsoup::nodes::Comment::getData" + ] + }, + "samples_blind": { + "7": [ + "org::jsoup::parser::Parser::parseXmlFragment", + "org::jsoup::nodes::Element::cssSelector", + "org::jsoup::internal::SoftPool::release", + "org::jsoup::select::Nodes::removeIf", + "org::jsoup::internal::SimpleBufferedInput::available", + "org::jsoup::nodes::Element::getElementsByIndexGreaterThan", + "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::nodes::Element::getElementsByAttributeValueStarting", + "org::jsoup::select::Evaluator::asPredicate", + "org::jsoup::nodes::Document::documentType", + "org::jsoup::nodes::Node::parentElementIs", + "org::jsoup::nodes::Element::appendText", + "org::jsoup::parser::TokenQueue::matchesWord", + "org::jsoup::internal::StringUtil::isAsciiLetter", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::nodes::DocumentType::publicId", + "org::jsoup::nodes::Element::children", + "org::jsoup::parser::ParseErrorList::tracking", + "org::jsoup::nodes::Node::ownerDocument" + ], + "8": [ + "org::jsoup::safety::Safelist::addTags", + "org::jsoup::helper::HttpClientExecutor::ProxyWrap::connectFailed", + "org::jsoup::HttpStatusException::getStatusCode", + "org::jsoup::internal::StringUtil::isActuallyWhitespace", + "org::jsoup::nodes::Attributes::getIgnoreCase", + "org::jsoup::parser::Parser::getMaxDepth", + "org::jsoup::nodes::Node::parentElementIs", + "org::jsoup::nodes::DataNode::setWholeData", + "org::jsoup::parser::Tag::isFormSubmittable", + "org::jsoup::nodes::Attributes::removeIgnoreCase", + "org::jsoup::parser::Token::Doctype::getSystemIdentifier", + "org::jsoup::internal::Normalizer::lowerCase", + "org::jsoup::safety::Safelist::none", + "org::jsoup::parser::TokenQueue::remainder", + "org::jsoup::select::Selector::evaluatorOf", + "org::jsoup::safety::Safelist::isSafeTag", + "org::jsoup::nodes::Range::AttributeRange::valueRange", + "org::jsoup::nodes::TextNode::getWholeText", + "org::jsoup::internal::LineMap::addLineStart", + "org::jsoup::parser::Tag::isInline" + ], + "9": [ + "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "org::jsoup::safety::Safelist::addEnforcedAttribute", + "org::jsoup::internal::ControllableInputStream::skip", + "org::jsoup::nodes::Element::getElementsByAttribute", + "org::jsoup::parser::TokenQueue::consumeCssIdentifier", + "org::jsoup::nodes::Attributes::deduplicate", + "org::jsoup::nodes::DocumentType::publicId", + "org::jsoup::nodes::Element::getElementsByTag", + "org::jsoup::nodes::Entities::isNamedEntity", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::safety::Safelist::addTags", + "org::jsoup::nodes::Attribute::getValidKey", + "org::jsoup::nodes::Element::getElementsByAttributeValueStarting", + "org::jsoup::nodes::Element::classList", + "org::jsoup::nodes::Element::wholeOwnText", + "org::jsoup::select::Selector::evaluatorOf", + "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "org::jsoup::nodes::Range::AttributeRange::valueRange", + "org::jsoup::nodes::DocumentType::systemId", + "org::jsoup::select::Collector::findFirst" + ] + }, + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "truth": [ + "org::jsoup::internal::ControllableInputStream::readToByteBuffer", + "org::jsoup::internal::ControllableInputStream::skip", + "org::jsoup::internal::SimpleBufferedInput::close", + "org::jsoup::internal::SimpleStreamReader::close", + "org::jsoup::internal::StringUtil::releaseBuilderVoid", + "org::jsoup::parser::CharacterReader::close", + "org::jsoup::select::HasEvaluator::Traversal::matchesAny" + ], + "found": [ + "org::jsoup::internal::ControllableInputStream::readToByteBuffer", + "org::jsoup::internal::ControllableInputStream::skip", + "org::jsoup::internal::SimpleBufferedInput::close", + "org::jsoup::internal::SimpleStreamReader::close", + "org::jsoup::internal::StringUtil::releaseBuilderVoid", + "org::jsoup::parser::CharacterReader::close", + "org::jsoup::select::HasEvaluator::Traversal::matchesAny" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "truth": [ + "org::jsoup::internal::StringUtil::normaliseWhitespace", + "org::jsoup::nodes::Element::appendNormalisedText" + ], + "found": [ + "org::jsoup::internal::StringUtil::normaliseWhitespace", + "org::jsoup::nodes::Element::appendNormalisedText" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "truth": [ + "org::jsoup::select::Evaluator::AttributeKeyPair::matchesValue" + ], + "found": [ + "org::jsoup::select::Evaluator::AttributeKeyPair::matchesValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "truth": [ + "org::jsoup::select::EvaluatorInternals::stream" + ], + "found": [ + "org::jsoup::select::EvaluatorInternals::stream" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "truth": [ + "org::jsoup::parser::TokenQueue::matchesCssIdentifier", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "found": [ + "org::jsoup::parser::TokenQueue::matchesCssIdentifier", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "truth": [ + "org::jsoup::parser::CharacterReader::consumeLetterSequence", + "org::jsoup::parser::CharacterReader::consumeLetterThenDigitSequence", + "org::jsoup::parser::CharacterReader::matchesAsciiAlpha", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::isIdentStart" + ], + "found": [ + "org::jsoup::parser::CharacterReader::consumeLetterSequence", + "org::jsoup::parser::CharacterReader::consumeLetterThenDigitSequence", + "org::jsoup::parser::CharacterReader::matchesAsciiAlpha", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::isIdentStart" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "truth": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeWhitespace", + "org::jsoup::select::QueryParser::consumeAttributeValue" + ], + "found": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeWhitespace", + "org::jsoup::select::QueryParser::consumeAttributeValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendDocumentType", + "org::jsoup::parser::HtmlTreeBuilderState::process" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendDocumentType", + "org::jsoup::parser::HtmlTreeBuilderState::process" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::ParseErrorList::tracking", + "truth": [ + "org::jsoup::parser::Parser::setTrackErrors", + "org::jsoup::safety::Cleaner::isValidBodyHtml" + ], + "found": [ + "org::jsoup::parser::Parser::setTrackErrors", + "org::jsoup::safety::Cleaner::isValidBodyHtml" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Node::ownerDocument", + "truth": [ + "org::jsoup::helper::W3CDom::convert", + "org::jsoup::helper::W3CDom::fromJsoup", + "org::jsoup::internal::CssMatching::document", + "org::jsoup::internal::CssMatching::withDocument", + "org::jsoup::nodes::Element::cssSelector", + "org::jsoup::nodes::FormElement::elements", + "org::jsoup::nodes::FormElement::submit", + "org::jsoup::nodes::Node::attr", + "org::jsoup::nodes::Node::doClone", + "org::jsoup::nodes::NodeUtils::outputSettings", + "org::jsoup::nodes::NodeUtils::parser", + "org::jsoup::nodes::ProcessingInstruction::data", + "org::jsoup::nodes::ProcessingInstruction::parseAttributes", + "org::jsoup::parser::HtmlTreeBuilder::initialiseParseFragment" + ], + "found": [ + "org::jsoup::helper::W3CDom::convert", + "org::jsoup::helper::W3CDom::fromJsoup", + "org::jsoup::internal::CssMatching::document", + "org::jsoup::internal::CssMatching::withDocument", + "org::jsoup::nodes::Element::cssSelector", + "org::jsoup::nodes::FormElement::elements", + "org::jsoup::nodes::FormElement::submit", + "org::jsoup::nodes::Node::attr", + "org::jsoup::nodes::Node::doClone", + "org::jsoup::nodes::NodeUtils::outputSettings", + "org::jsoup::nodes::NodeUtils::parser", + "org::jsoup::nodes::ProcessingInstruction::data", + "org::jsoup::nodes::ProcessingInstruction::parseAttributes", + "org::jsoup::parser::HtmlTreeBuilder::initialiseParseFragment" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::select::Collector::findFirst", + "truth": [ + "org::jsoup::nodes::Element::getElementById", + "org::jsoup::nodes::Element::selectFirst", + "org::jsoup::select::Selector::selectFirst" + ], + "found": [ + "org::jsoup::nodes::Element::getElementById", + "org::jsoup::nodes::Element::selectFirst", + "org::jsoup::select::Selector::selectFirst" + ], + "maybe": [ + "org::jsoup::parser::StreamParser::selectNext", + "org::jsoup::select::Collector::findFirstNode" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::CssMatching::isQuirksMode", + "truth": [ + "org::jsoup::internal::CssMatching::hasClass", + "org::jsoup::select::Evaluator::Id::matches" + ], + "found": [ + "org::jsoup::internal::CssMatching::hasClass", + "org::jsoup::select::Evaluator::Id::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attributes::hasKey", + "truth": [ + "org::jsoup::nodes::Attributes::Dataset::put", + "org::jsoup::nodes::Attributes::hasUserData", + "org::jsoup::nodes::Attributes::userData", + "org::jsoup::nodes::DocumentType::outerHtmlHead", + "org::jsoup::nodes::Element::searchUpForAttribute", + "org::jsoup::parser::HtmlTreeBuilderState::mergeAttributes", + "org::jsoup::parser::Token::Tag::rangeKey" + ], + "found": [ + "org::jsoup::nodes::Attributes::Dataset::put", + "org::jsoup::nodes::Attributes::hasUserData", + "org::jsoup::nodes::Attributes::userData", + "org::jsoup::nodes::DocumentType::outerHtmlHead", + "org::jsoup::nodes::Element::searchUpForAttribute", + "org::jsoup::parser::HtmlTreeBuilderState::mergeAttributes", + "org::jsoup::parser::Token::Tag::rangeKey" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::NamespaceBindings::isDeclaration", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::copyAttributes", + "org::jsoup::parser::XmlTreeBuilder::applyNamespacesToAttributes" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::copyAttributes", + "org::jsoup::parser::XmlTreeBuilder::applyNamespacesToAttributes" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::select::Collector::streamNodes", + "truth": [ + "org::jsoup::select::Collector::collect", + "org::jsoup::select::Collector::collectNodes", + "org::jsoup::select::Collector::findFirstNode" + ], + "found": [ + "org::jsoup::select::Collector::collect", + "org::jsoup::select::Collector::collectNodes", + "org::jsoup::select::Collector::findFirstNode" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::Jsoup::newSession", + "truth": [ + "org::jsoup::examples::HtmlToPlainText::main", + "org::jsoup::nodes::Document::connection", + "org::jsoup::nodes::FormElement::submit" + ], + "found": [ + "org::jsoup::examples::HtmlToPlainText::main", + "org::jsoup::nodes::Document::connection", + "org::jsoup::nodes::FormElement::submit" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Document::location", + "truth": [ + "org::jsoup::helper::W3CDom::convert" + ], + "found": [ + "org::jsoup::helper::W3CDom::convert" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Entities::isBaseNamedEntity", + "truth": [ + "org::jsoup::parser::Tokeniser::consumeCharacterReference" + ], + "found": [ + "org::jsoup::parser::Tokeniser::consumeCharacterReference" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attribute::getValue", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::setAttribute", + "org::jsoup::internal::CssMatching::rawAttributeValue", + "org::jsoup::internal::NamespaceBindings::applyDeclarations", + "org::jsoup::nodes::Attributes::Dataset::DatasetIterator::next", + "org::jsoup::nodes::Attributes::addAll", + "org::jsoup::nodes::Attributes::put", + "org::jsoup::nodes::XmlDeclaration::getWholeDeclaration", + "org::jsoup::safety::Cleaner::createSafeElement", + "org::jsoup::safety::Safelist::getProtocolValue", + "org::jsoup::safety::Safelist::isSafeAttribute" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::setAttribute", + "org::jsoup::internal::CssMatching::rawAttributeValue", + "org::jsoup::internal::NamespaceBindings::applyDeclarations", + "org::jsoup::nodes::Attributes::Dataset::DatasetIterator::next", + "org::jsoup::nodes::Attributes::addAll", + "org::jsoup::nodes::Attributes::put", + "org::jsoup::nodes::XmlDeclaration::getWholeDeclaration", + "org::jsoup::safety::Cleaner::createSafeElement", + "org::jsoup::safety::Safelist::getProtocolValue", + "org::jsoup::safety::Safelist::isSafeAttribute" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Element::wholeOwnText", + "truth": [ + "org::jsoup::nodes::Element::nodeValue", + "org::jsoup::select::Evaluator::ContainsWholeOwnText::matches", + "org::jsoup::select::Evaluator::MatchesWholeOwnText::matches" + ], + "found": [ + "org::jsoup::nodes::Element::nodeValue", + "org::jsoup::select::Evaluator::ContainsWholeOwnText::matches", + "org::jsoup::select::Evaluator::MatchesWholeOwnText::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::safety::Safelist::addTags", + "truth": [ + "org::jsoup::safety::Safelist::addAttributes", + "org::jsoup::safety::Safelist::basic", + "org::jsoup::safety::Safelist::basicWithImages", + "org::jsoup::safety::Safelist::relaxed", + "org::jsoup::safety::Safelist::simpleText" + ], + "found": [ + "org::jsoup::safety::Safelist::addAttributes", + "org::jsoup::safety::Safelist::basic", + "org::jsoup::safety::Safelist::basicWithImages", + "org::jsoup::safety::Safelist::relaxed", + "org::jsoup::safety::Safelist::simpleText" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isActuallyWhitespace", + "truth": [ + "org::jsoup::internal::StringUtil::appendNormalisedWhitespace" + ], + "found": [ + "org::jsoup::internal::StringUtil::appendNormalisedWhitespace" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attributes::getIgnoreCase", + "truth": [ + "org::jsoup::internal::CssMatching::hasClass", + "org::jsoup::internal::LegacyMatching::hasClass", + "org::jsoup::nodes::Element::classList", + "org::jsoup::nodes::Element::classNames", + "org::jsoup::nodes::Element::id", + "org::jsoup::nodes::Node::absUrl", + "org::jsoup::nodes::Node::attr" + ], + "found": [ + "org::jsoup::internal::CssMatching::hasClass", + "org::jsoup::internal::LegacyMatching::hasClass", + "org::jsoup::nodes::Element::classList", + "org::jsoup::nodes::Element::classNames", + "org::jsoup::nodes::Element::id", + "org::jsoup::nodes::Node::absUrl", + "org::jsoup::nodes::Node::attr" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::Parser::getMaxDepth", + "truth": [ + "org::jsoup::parser::TreeBuilder::enforceStackDepthLimit" + ], + "found": [ + "org::jsoup::parser::TreeBuilder::enforceStackDepthLimit" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::Tag::isFormSubmittable", + "truth": [ + "org::jsoup::nodes::FormElement::formData" + ], + "found": [ + "org::jsoup::nodes::FormElement::formData" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attributes::removeIgnoreCase", + "truth": [ + "org::jsoup::nodes::Node::removeAttr", + "org::jsoup::safety::Cleaner::createSafeElement" + ], + "found": [ + "org::jsoup::nodes::Node::removeAttr", + "org::jsoup::safety::Cleaner::createSafeElement" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::Token::Doctype::getSystemIdentifier", + "truth": [ + "org::jsoup::parser::HtmlTreeBuilderState::process", + "org::jsoup::parser::XmlTreeBuilder::insertDoctypeFor" + ], + "found": [ + "org::jsoup::parser::HtmlTreeBuilderState::process", + "org::jsoup::parser::XmlTreeBuilder::insertDoctypeFor" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::Normalizer::lowerCase", + "truth": [ + "org::jsoup::helper::DataUtil::openStream", + "org::jsoup::helper::HttpConnection::Base::scanHeaders", + "org::jsoup::internal::LegacyMatching::attributeMatches", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::safety::Safelist::isSafeProtocol", + "org::jsoup::select::Evaluator::AttributeKeyPair::AttributeKeyPair", + "org::jsoup::select::Evaluator::ContainsData::ContainsData", + "org::jsoup::select::Evaluator::ContainsData::matches", + "org::jsoup::select::Evaluator::ContainsOwnText::ContainsOwnText", + "org::jsoup::select::Evaluator::ContainsOwnText::matches", + "org::jsoup::select::Evaluator::ContainsText::ContainsText", + "org::jsoup::select::Evaluator::ContainsText::matches", + "org::jsoup::select::NodeEvaluator::ContainsValue::ContainsValue", + "org::jsoup::select::NodeEvaluator::ContainsValue::evaluateMatch" + ], + "found": [ + "org::jsoup::helper::DataUtil::openStream", + "org::jsoup::helper::HttpConnection::Base::scanHeaders", + "org::jsoup::internal::LegacyMatching::attributeMatches", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::safety::Safelist::isSafeProtocol", + "org::jsoup::select::Evaluator::AttributeKeyPair::AttributeKeyPair", + "org::jsoup::select::Evaluator::ContainsData::ContainsData", + "org::jsoup::select::Evaluator::ContainsData::matches", + "org::jsoup::select::Evaluator::ContainsOwnText::ContainsOwnText", + "org::jsoup::select::Evaluator::ContainsOwnText::matches", + "org::jsoup::select::Evaluator::ContainsText::ContainsText", + "org::jsoup::select::Evaluator::ContainsText::matches", + "org::jsoup::select::NodeEvaluator::ContainsValue::ContainsValue", + "org::jsoup::select::NodeEvaluator::ContainsValue::evaluateMatch" + ], + "maybe": [], + "import_files": [ + "src/main/java/org/jsoup/helper/HttpConnection.java", + "src/main/java/org/jsoup/internal/LegacyMatching.java", + "src/main/java/org/jsoup/safety/Safelist.java", + "src/main/java/org/jsoup/select/Evaluator.java", + "src/main/java/org/jsoup/select/NodeEvaluator.java" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::remainder", + "truth": [ + "org::jsoup::select::LegacyQueryParser::rawAttribute", + "org::jsoup::select::QueryParser::parse", + "org::jsoup::select::QueryParser::parsePseudoSelector", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "found": [ + "org::jsoup::select::LegacyQueryParser::rawAttribute", + "org::jsoup::select::QueryParser::parse", + "org::jsoup::select::QueryParser::parsePseudoSelector", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::select::Selector::evaluatorOf", + "truth": [ + "org::jsoup::helper::DataUtil", + "org::jsoup::nodes::Element::selectFirstNode", + "org::jsoup::nodes::Element::selectNodes", + "org::jsoup::nodes::FormElement", + "org::jsoup::parser::StreamParser::selectFirst", + "org::jsoup::parser::StreamParser::selectNext", + "org::jsoup::select::Elements::is", + "org::jsoup::select::Elements::not", + "org::jsoup::select::Elements::siblings", + "org::jsoup::select::Selector::selectStream" + ], + "found": [ + "org::jsoup::helper", + "org::jsoup::nodes", + "org::jsoup::nodes::Element::selectFirstNode", + "org::jsoup::nodes::Element::selectNodes", + "org::jsoup::parser::StreamParser::selectFirst", + "org::jsoup::parser::StreamParser::selectNext", + "org::jsoup::select::Elements::is", + "org::jsoup::select::Elements::not", + "org::jsoup::select::Elements::siblings", + "org::jsoup::select::Selector::selectStream" + ], + "maybe": [], + "import_files": [ + "src/main/java/org/jsoup/nodes/Element.java" + ], + "recall": 0.8, + "precision": 0.8, + "recall_with_maybe": 0.8 + }, + { + "symbol": "org::jsoup::nodes::Range::AttributeRange::valueRange", + "truth": [ + "org::jsoup::nodes::Range::AttributeRange::toString" + ], + "found": [ + "org::jsoup::nodes::Range::AttributeRange::toString" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::TextNode::getWholeText", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendCdata", + "org::jsoup::helper::W3CDom::W3CBuilder::head", + "org::jsoup::nodes::CDataNode::outerHtmlHead", + "org::jsoup::nodes::CDataNode::text", + "org::jsoup::nodes::Element::appendNormalisedText", + "org::jsoup::nodes::Element::data", + "org::jsoup::nodes::Element::wholeTextOf", + "org::jsoup::nodes::Printer::addHead", + "org::jsoup::nodes::TextNode::text", + "org::jsoup::safety::Cleaner::CleaningVisitor::head" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendCdata", + "org::jsoup::helper::W3CDom::W3CBuilder::head", + "org::jsoup::nodes::CDataNode::outerHtmlHead", + "org::jsoup::nodes::CDataNode::text", + "org::jsoup::nodes::Element::appendNormalisedText", + "org::jsoup::nodes::Element::data", + "org::jsoup::nodes::Element::wholeTextOf", + "org::jsoup::nodes::Printer::addHead", + "org::jsoup::nodes::TextNode::text", + "org::jsoup::safety::Cleaner::CleaningVisitor::head" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::LineMap::addLineStart", + "truth": [ + "org::jsoup::parser::CharacterReader::scanBufferForNewlines" + ], + "found": [ + "org::jsoup::parser::CharacterReader::scanBufferForNewlines" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::Tag::isInline", + "truth": [ + "org::jsoup::nodes::Element::TextAccumulator::needsTrailingTextSeparator", + "org::jsoup::nodes::Element::TextAccumulator::tail" + ], + "found": [ + "org::jsoup::nodes::Element::TextAccumulator::needsTrailingTextSeparator", + "org::jsoup::nodes::Element::TextAccumulator::tail" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Element::lastElementChild", + "truth": [ + "org::jsoup::nodes::Element::lastElementSibling", + "org::jsoup::parser::StreamParser::ElementIterator::tail", + "org::jsoup::select::Evaluator::IsLastChild::matches" + ], + "found": [ + "org::jsoup::nodes::Element::lastElementSibling", + "org::jsoup::parser::StreamParser::ElementIterator::tail", + "org::jsoup::select::Evaluator::IsLastChild::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::Parser::isTrackErrors", + "truth": [ + "org::jsoup::parser::TreeBuilder::initialiseParse" + ], + "found": [ + "org::jsoup::parser::TreeBuilder::initialiseParse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::attributeMatches", + "truth": [ + "org::jsoup::select::Evaluator::AttributeKeyPair::matchesValue" + ], + "found": [ + "org::jsoup::select::Evaluator::AttributeKeyPair::matchesValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Range::AttributeRange::nameRange", + "truth": [ + "org::jsoup::nodes::Range::AttributeRange::toString" + ], + "found": [ + "org::jsoup::nodes::Range::AttributeRange::toString" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::systemId", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendDocumentType" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendDocumentType" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "truth": [ + "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "org::jsoup::nodes::Attribute::Attribute", + "org::jsoup::nodes::Attribute::setKey", + "org::jsoup::nodes::Element::getElementsByTag", + "org::jsoup::parser::ParseSettings::normalizeAttribute", + "org::jsoup::parser::ParseSettings::normalizeTag", + "org::jsoup::parser::TagSet::valueOf", + "org::jsoup::select::Evaluator::AttributeKeyPair::AttributeKeyPair", + "org::jsoup::select::Evaluator::AttributeWithValueMatching::AttributeWithValueMatching", + "org::jsoup::select::LegacyQueryParser::rawAttribute", + "org::jsoup::select::QueryParser::QueryParser", + "org::jsoup::select::QueryParser::cssNthChild", + "org::jsoup::select::QueryParser::piSelector" + ], + "found": [ + "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "org::jsoup::nodes::Attribute::Attribute", + "org::jsoup::nodes::Attribute::setKey", + "org::jsoup::nodes::Element::getElementsByTag", + "org::jsoup::parser::ParseSettings::normalizeAttribute", + "org::jsoup::parser::ParseSettings::normalizeTag", + "org::jsoup::parser::TagSet::valueOf", + "org::jsoup::select::Evaluator::AttributeKeyPair::AttributeKeyPair", + "org::jsoup::select::Evaluator::AttributeWithValueMatching::AttributeWithValueMatching", + "org::jsoup::select::LegacyQueryParser::rawAttribute", + "org::jsoup::select::QueryParser::QueryParser", + "org::jsoup::select::QueryParser::cssNthChild", + "org::jsoup::select::QueryParser::piSelector" + ], + "maybe": [], + "import_files": [ + "src/main/java/org/jsoup/internal/LegacyMatching.java", + "src/main/java/org/jsoup/select/Evaluator.java", + "src/main/java/org/jsoup/select/LegacyQueryParser.java", + "src/main/java/org/jsoup/select/QueryParser.java" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::safety::Safelist::addEnforcedAttribute", + "truth": [ + "org::jsoup::safety::Safelist::basic" + ], + "found": [ + "org::jsoup::safety::Safelist::basic" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::consumeCssIdentifier", + "truth": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::select::QueryParser::byClass", + "org::jsoup::select::QueryParser::byId", + "org::jsoup::select::QueryParser::consumeAttributeName", + "org::jsoup::select::QueryParser::consumeAttributeValue", + "org::jsoup::select::QueryParser::cssAttribute", + "org::jsoup::select::QueryParser::matchesAttr", + "org::jsoup::select::QueryParser::parseNodeSelector", + "org::jsoup::select::QueryParser::parsePseudoSelector", + "org::jsoup::select::QueryParser::piSelector", + "org::jsoup::select::Selector::unescapeCssIdentifier" + ], + "found": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::select::QueryParser::byClass", + "org::jsoup::select::QueryParser::byId", + "org::jsoup::select::QueryParser::consumeAttributeName", + "org::jsoup::select::QueryParser::consumeAttributeValue", + "org::jsoup::select::QueryParser::cssAttribute", + "org::jsoup::select::QueryParser::matchesAttr", + "org::jsoup::select::QueryParser::parseNodeSelector", + "org::jsoup::select::QueryParser::parsePseudoSelector", + "org::jsoup::select::QueryParser::piSelector", + "org::jsoup::select::Selector::unescapeCssIdentifier" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attributes::deduplicate", + "truth": [ + "org::jsoup::parser::HtmlTreeBuilder::createElementFor", + "org::jsoup::parser::TreeBuilder::parseAttributes", + "org::jsoup::parser::XmlTreeBuilder::insertElementFor" + ], + "found": [ + "org::jsoup::parser::HtmlTreeBuilder::createElementFor", + "org::jsoup::parser::TreeBuilder::parseAttributes", + "org::jsoup::parser::XmlTreeBuilder::insertElementFor" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Entities::isNamedEntity", + "truth": [ + "org::jsoup::parser::Tokeniser::consumeCharacterReference" + ], + "found": [ + "org::jsoup::parser::Tokeniser::consumeCharacterReference" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attribute::getValidKey", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::w3cSafeName", + "org::jsoup::helper::W3CDom::W3CBuilder::w3cSafeNcName", + "org::jsoup::nodes::Attribute::html", + "org::jsoup::nodes::Attributes::html", + "org::jsoup::nodes::Element::safeTagName" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::w3cSafeName", + "org::jsoup::helper::W3CDom::W3CBuilder::w3cSafeNcName", + "org::jsoup::nodes::Attribute::html", + "org::jsoup::nodes::Attributes::html", + "org::jsoup::nodes::Element::safeTagName" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "truth": [ + "org::jsoup::internal::LegacyMatching::attributeString", + "org::jsoup::select::LegacyQueryParser::tryCssAttribute" + ], + "found": [ + "org::jsoup::internal::LegacyMatching::attributeString", + "org::jsoup::select::LegacyQueryParser::tryCssAttribute" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Node::siblingIndex", + "truth": [ + "org::jsoup::nodes::Node::after", + "org::jsoup::nodes::Node::before", + "org::jsoup::nodes::Node::doClone", + "org::jsoup::nodes::Node::nextSibling", + "org::jsoup::nodes::Node::previousSibling", + "org::jsoup::nodes::Node::replaceChild", + "org::jsoup::nodes::Node::unwrap", + "org::jsoup::nodes::TextNode::splitText", + "org::jsoup::select::NodeTraversor::traverse" + ], + "found": [ + "org::jsoup::nodes::Node::after", + "org::jsoup::nodes::Node::before", + "org::jsoup::nodes::Node::doClone", + "org::jsoup::nodes::Node::nextSibling", + "org::jsoup::nodes::Node::previousSibling", + "org::jsoup::nodes::Node::replaceChild", + "org::jsoup::nodes::Node::unwrap", + "org::jsoup::nodes::TextNode::splitText", + "org::jsoup::select::NodeTraversor::traverse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attributes::normalize", + "truth": [ + "org::jsoup::parser::ParseSettings::normalizeAttributes" + ], + "found": [ + "org::jsoup::parser::ParseSettings::normalizeAttributes" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::joining", + "truth": [ + "org::jsoup::nodes::Element::cssSelectorComponent", + "org::jsoup::nodes::Element::wholeTextOf", + "org::jsoup::select::Elements::html", + "org::jsoup::select::Elements::text", + "org::jsoup::select::Nodes::outerHtml" + ], + "found": [ + "org::jsoup::nodes::Element::cssSelectorComponent", + "org::jsoup::nodes::Element::wholeTextOf", + "org::jsoup::select::Elements::html", + "org::jsoup::select::Elements::text", + "org::jsoup::select::Nodes::outerHtml" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "callers_common": [ + { + "symbol": "org::jsoup::parser::Tag::isSelfClosing", + "truth": [ + "org::jsoup::nodes::Element::outerHtmlHead", + "org::jsoup::parser::HtmlTreeBuilder::insertElementFor", + "org::jsoup::parser::TreeBuilder::trackNodePosition" + ], + "found": [ + "org::jsoup::nodes::Element::outerHtmlHead", + "org::jsoup::parser::HtmlTreeBuilder::insertElementFor" + ], + "maybe": [ + "org::jsoup::parser::TreeBuilder::trackNodePosition" + ], + "import_files": [], + "recall": 0.6666666666666666, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Document::shallowClone", + "truth": [ + "org::jsoup::nodes::Node::doClone" + ], + "found": [ + "org::jsoup::nodes::Node::doClone" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isWhitespace", + "truth": [ + "org::jsoup::internal::CssMatching::matchesToken", + "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "org::jsoup::internal::StringUtil::isBlank", + "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "org::jsoup::nodes::Element::nextClassEnd", + "org::jsoup::nodes::Element::nextClassStart", + "org::jsoup::nodes::Entities::doEscape", + "org::jsoup::nodes::Printer::Pretty::textTrim", + "org::jsoup::parser::CharacterReader::consumeWhitespace", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::parser::Tokeniser::isWhitespaceReference", + "org::jsoup::parser::TokeniserState::isCustomEndTagNameChar", + "org::jsoup::parser::TokeniserState::read", + "org::jsoup::parser::TokeniserState::readDoctypeInternalSubset", + "org::jsoup::select::Evaluator::AttributeWithValueMatching::toString" + ], + "found": [ + "org::jsoup::internal::CssMatching::matchesToken", + "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "org::jsoup::internal::StringUtil::isBlank", + "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "org::jsoup::nodes::Element::nextClassEnd", + "org::jsoup::nodes::Element::nextClassStart", + "org::jsoup::nodes::Entities::doEscape", + "org::jsoup::nodes::Printer::Pretty::textTrim", + "org::jsoup::parser::CharacterReader::consumeWhitespace", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::parser::Tokeniser::isWhitespaceReference", + "org::jsoup::parser::TokeniserState::isCustomEndTagNameChar", + "org::jsoup::parser::TokeniserState::read", + "org::jsoup::parser::TokeniserState::readDoctypeInternalSubset", + "org::jsoup::select::Evaluator::AttributeWithValueMatching::toString" + ], + "maybe": [], + "import_files": [ + "src/main/java/org/jsoup/select/Evaluator.java" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::ControllableInputStream::onProgress", + "truth": [ + "org::jsoup::helper::HttpConnection::Response::execute" + ], + "found": [], + "maybe": [ + "org::jsoup::helper::HttpConnection::Response::execute" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::helper::Regex::compile", + "truth": [ + "org::jsoup::nodes::Element::getElementsByAttributeValueMatching", + "org::jsoup::nodes::Element::getElementsMatchingOwnText", + "org::jsoup::nodes::Element::getElementsMatchingText", + "org::jsoup::select::LegacyQueryParser::rawAttribute", + "org::jsoup::select::QueryParser::consumeRegex", + "org::jsoup::select::QueryParser::matchesAttr" + ], + "found": [ + "org::jsoup::nodes::Element::getElementsByAttributeValueMatching", + "org::jsoup::nodes::Element::getElementsMatchingOwnText", + "org::jsoup::nodes::Element::getElementsMatchingText", + "org::jsoup::select::LegacyQueryParser::rawAttribute", + "org::jsoup::select::QueryParser::consumeRegex", + "org::jsoup::select::QueryParser::matchesAttr" + ], + "maybe": [ + "org::jsoup::helper", + "org::jsoup::helper::Re2jRegex::compile", + "org::jsoup::helper::W3CDom::selectXpath" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Node::normalName", + "truth": [ + "org::jsoup::nodes::Node::nameIs", + "org::jsoup::safety::Cleaner::CleaningVisitor::head", + "org::jsoup::safety::Cleaner::CleaningVisitor::tail", + "org::jsoup::select::Evaluator::sameType" + ], + "found": [ + "org::jsoup::safety::Cleaner::CleaningVisitor::head", + "org::jsoup::safety::Cleaner::CleaningVisitor::tail", + "org::jsoup::select::Evaluator::sameType" + ], + "maybe": [ + "org::jsoup::parser::HtmlTreeBuilder::onStackNot" + ], + "import_files": [], + "recall": 0.75, + "precision": 1.0, + "recall_with_maybe": 0.75 + }, + { + "symbol": "org::jsoup::nodes::LeafNode::attributes", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::Tag::getName", + "truth": [ + "org::jsoup::nodes::Element::nodeName", + "org::jsoup::nodes::Element::tagName" + ], + "found": [ + "org::jsoup::nodes::Element::nodeName", + "org::jsoup::nodes::Element::tagName" + ], + "maybe": [ + "org::jsoup::helper", + "org::jsoup::helper::RequestAuthHandler::enable", + "org::jsoup::helper::W3CDom::asString", + "org::jsoup::select::QueryCompat::isInternalFrame" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Document::body", + "truth": [ + "org::jsoup::Jsoup::clean", + "org::jsoup::nodes::Document::text", + "org::jsoup::parser::HtmlTreeBuilder::resetBody", + "org::jsoup::parser::Parser::parseBodyFragment", + "org::jsoup::safety::Cleaner::clean", + "org::jsoup::safety::Cleaner::isValid", + "org::jsoup::safety::Cleaner::isValidBodyHtml" + ], + "found": [ + "org::jsoup::Jsoup::clean", + "org::jsoup::nodes::Document::text", + "org::jsoup::parser::Parser::parseBodyFragment", + "org::jsoup::safety::Cleaner::clean", + "org::jsoup::safety::Cleaner::isValid", + "org::jsoup::safety::Cleaner::isValidBodyHtml" + ], + "maybe": [ + "org::jsoup::parser::HtmlTreeBuilder::resetBody" + ], + "import_files": [], + "recall": 0.8571428571428571, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::escapeCssIdentifier", + "truth": [ + "org::jsoup::nodes::Element::cssSelectorComponent", + "org::jsoup::nodes::Element::uniqueIdSelector", + "org::jsoup::select::Evaluator::AttributeKeyPair::attributeString", + "org::jsoup::select::Evaluator::AttributeWithValueMatching::toString", + "org::jsoup::select::Selector::escapeCssIdentifier" + ], + "found": [ + "org::jsoup::nodes::Element::cssSelectorComponent", + "org::jsoup::nodes::Element::uniqueIdSelector", + "org::jsoup::select::Evaluator::AttributeKeyPair::attributeString", + "org::jsoup::select::Evaluator::AttributeWithValueMatching::toString", + "org::jsoup::select::Selector::escapeCssIdentifier" + ], + "maybe": [], + "import_files": [ + "src/main/java/org/jsoup/nodes/Element.java" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::NodeInternals::sourceDataStart", + "truth": [ + "org::jsoup::parser::HtmlTreeBuilder::insertCommentNode", + "org::jsoup::parser::XmlTreeBuilder::insertCommentFor" + ], + "found": [ + "org::jsoup::parser::HtmlTreeBuilder::insertCommentNode", + "org::jsoup::parser::XmlTreeBuilder::insertCommentFor" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::Parser::parseAttributes", + "truth": [ + "org::jsoup::nodes::ProcessingInstruction::parseAttributes" + ], + "found": [ + "org::jsoup::nodes::ProcessingInstruction::parseAttributes" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::normaliseWhitespace", + "truth": [ + "org::jsoup::nodes::Document::title", + "org::jsoup::nodes::TextNode::normaliseWhitespace", + "org::jsoup::nodes::TextNode::text", + "org::jsoup::select::Evaluator::ContainsOwnText::ContainsOwnText", + "org::jsoup::select::Evaluator::ContainsText::ContainsText", + "org::jsoup::select::NodeEvaluator::ContainsValue::ContainsValue", + "org::jsoup::select::QueryCompat::warn" + ], + "found": [ + "org::jsoup::nodes::Document::title", + "org::jsoup::nodes::TextNode::normaliseWhitespace", + "org::jsoup::nodes::TextNode::text", + "org::jsoup::select::Evaluator::ContainsOwnText::ContainsOwnText", + "org::jsoup::select::Evaluator::ContainsText::ContainsText", + "org::jsoup::select::NodeEvaluator::ContainsValue::ContainsValue", + "org::jsoup::select::QueryCompat::warn" + ], + "maybe": [], + "import_files": [ + "src/main/java/org/jsoup/select/Evaluator.java", + "src/main/java/org/jsoup/select/NodeEvaluator.java" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::helper::HttpConnection::KeyVal::hasInputStream", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::Parser::unescapeEntities", + "truth": [ + "org::jsoup::nodes::Entities::unescape" + ], + "found": [ + "org::jsoup::nodes::Entities::unescape" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::NodeInternals::clearEndSourceRange", + "truth": [ + "org::jsoup::parser::HtmlTreeBuilder::recreateElement" + ], + "found": [ + "org::jsoup::parser::HtmlTreeBuilder::recreateElement" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Element::toggleClass", + "truth": [ + "org::jsoup::select::Elements::toggleClass" + ], + "found": [ + "org::jsoup::select::Elements::toggleClass" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::helper::Re2jRegex::Re2jMatcher::find", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::CharacterReader::current", + "truth": [ + "org::jsoup::nodes::Entities::load", + "org::jsoup::parser::TokenQueue::current", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::parser::TokenQueue::matchesWord", + "org::jsoup::parser::Tokeniser::consumeCharacterReference", + "org::jsoup::parser::Tokeniser::error", + "org::jsoup::parser::TokeniserState::handleDataEndTag", + "org::jsoup::parser::TokeniserState::read", + "org::jsoup::parser::TokeniserState::readRawData" + ], + "found": [ + "org::jsoup::parser::TokenQueue::current", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::parser::TokenQueue::matchesWord", + "org::jsoup::parser::Tokeniser::consumeCharacterReference", + "org::jsoup::parser::Tokeniser::error", + "org::jsoup::parser::TokeniserState::handleDataEndTag", + "org::jsoup::parser::TokeniserState::read", + "org::jsoup::parser::TokeniserState::readRawData" + ], + "maybe": [ + "org::jsoup::nodes::Entities::load" + ], + "import_files": [], + "recall": 0.8888888888888888, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::helper::Re2jRegex::compile", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::Tag::localName", + "truth": [ + "org::jsoup::internal::CssMatching::sameType" + ], + "found": [], + "maybe": [ + "org::jsoup::internal::CssMatching::sameType" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attributes::attribute", + "truth": [ + "org::jsoup::nodes::Element::attribute" + ], + "found": [ + "org::jsoup::nodes::Element::attribute" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::Tag::isBlock", + "truth": [ + "org::jsoup::nodes::Element::isBlock" + ], + "found": [ + "org::jsoup::nodes::Element::isBlock" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::CssMatching::sameType", + "truth": [ + "org::jsoup::select::Evaluator::sameType" + ], + "found": [ + "org::jsoup::select::Evaluator::sameType" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::select::Elements::first", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::helper::HttpConnection::Base::multiHeaders", + "truth": [ + "org::jsoup::helper::UrlConnectionExecutor::createConnection" + ], + "found": [], + "maybe": [ + "org::jsoup::helper::HttpClientExecutor::execute" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 0.0 + }, + { + "symbol": "org::jsoup::nodes::Element::normalName", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::nodes::Attribute::prefix", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::setAttribute", + "org::jsoup::nodes::Attribute::namespace", + "org::jsoup::parser::XmlTreeBuilder::applyNamespacesToAttributes" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::setAttribute", + "org::jsoup::nodes::Attribute::namespace", + "org::jsoup::parser::XmlTreeBuilder::applyNamespacesToAttributes" + ], + "maybe": [ + "org::jsoup::helper::W3CDom::W3CBuilder::w3cNamespace" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::Tag::isEmpty", + "truth": [ + "org::jsoup::nodes::Element::isHtmlVoid", + "org::jsoup::nodes::Element::outerHtmlHead", + "org::jsoup::parser::HtmlTreeBuilder::insertElementFor", + "org::jsoup::parser::TreeBuilder::trackNodePosition", + "org::jsoup::parser::XmlTreeBuilder::insertElementFor" + ], + "found": [ + "org::jsoup::nodes::Element::isHtmlVoid", + "org::jsoup::nodes::Element::outerHtmlHead", + "org::jsoup::parser::HtmlTreeBuilder::insertElementFor", + "org::jsoup::parser::XmlTreeBuilder::insertElementFor" + ], + "maybe": [ + "org::jsoup::Jsoup::clean", + "org::jsoup::helper::CookieUtil::parseCookie", + "org::jsoup::helper::HttpConnection::Base::addHeader", + "org::jsoup::helper::HttpConnection::Base::hasHeader", + "org::jsoup::helper::HttpConnection::Base::header", + "org::jsoup::helper::HttpConnection::Base::headers", + "org::jsoup::helper::HttpConnection::Response::execute", + "org::jsoup::helper::W3CDom::W3CBuilder::setAttribute", + "org::jsoup::helper::W3CDom::W3CBuilder::w3cNamespace", + "org::jsoup::internal::CssMatching::attributeValue", + "org::jsoup::internal::CssMatching::hasClass", + "org::jsoup::internal::CssMatching::matchesAttributeValue", + "org::jsoup::internal::CssMatching::rawAttributeValue", + "org::jsoup::internal::LegacyMatching::hasClass", + "org::jsoup::internal::StringUtil::isBlank", + "org::jsoup::internal::StringUtil::validateHttpUrl", + "org::jsoup::nodes::Attribute::getValidKey", + "org::jsoup::nodes::Attribute::shouldCollapseAttribute", + "org::jsoup::nodes::Comment::asXmlDeclaration", + "org::jsoup::nodes::Element::classNames", + "org::jsoup::nodes::Element::cssSelector", + "org::jsoup::nodes::Element::cssSelectorComponent", + "org::jsoup::nodes::Element::empty", + "org::jsoup::nodes::Element::outerHtmlTail", + "org::jsoup::nodes::Element::shallowClone", + "org::jsoup::nodes::Element::uniqueIdSelector", + "org::jsoup::nodes::Entities::load", + "org::jsoup::nodes::Node::hasAttr", + "org::jsoup::nodes::ProcessingInstruction::outerHtmlHead", + "org::jsoup::nodes::XmlDeclaration::getWholeDeclaration", + "org::jsoup::parser::HtmlTreeBuilder::insertCharacterNode", + "org::jsoup::parser::HtmlTreeBuilder::useCurrentOrForeignInsert", + "org::jsoup::parser::HtmlTreeBuilderState::breakoutToHtml", + "org::jsoup::parser::HtmlTreeBuilderState::process", + "org::jsoup::parser::HtmlTreeBuilderState::processFramesetCharacters", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TagSet::TagSet", + "org::jsoup::parser::Token::PI::toString", + "org::jsoup::parser::Token::Tag::newAttribute", + "org::jsoup::parser::Token::Tag::normalName", + "org::jsoup::parser::Token::Tag::toStringName", + "org::jsoup::parser::TokenQueue::consumeCssIdentifier", + "org::jsoup::parser::TokenQueue::escapeCssIdentifier", + "org::jsoup::parser::Tokeniser::consumeCharacterReference", + "org::jsoup::parser::Tokeniser::emit", + "org::jsoup::parser::TokeniserState::read", + "org::jsoup::parser::TreeBuilder::trackNodePosition", + "org::jsoup::parser::XmlTreeBuilder::applyNamespacesToAttributes", + "org::jsoup::safety::Cleaner::createSafeElement", + "org::jsoup::safety::Cleaner::isValid", + "org::jsoup::safety::Cleaner::isValidBodyHtml", + "org::jsoup::safety::Safelist::getProtocolValue", + "org::jsoup::safety::Safelist::removeAttributes", + "org::jsoup::safety::Safelist::removeEnforcedAttribute", + "org::jsoup::safety::Safelist::removeProtocols", + "org::jsoup::select::Evaluator::AttributeKeyPair::attributeString", + "org::jsoup::select::Evaluator::AttributeStarting::matchesNode", + "org::jsoup::select::Evaluator::AttributeWithValueMatching::toString", + "org::jsoup::select::Evaluator::IsOnlyChild::matches", + "org::jsoup::select::QueryParser::consumeAttributeName", + "org::jsoup::select::QueryParser::parseSelector", + "org::jsoup::select::QueryParser::piSelector" + ], + "import_files": [], + "recall": 0.8, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Node::hasAttr", + "truth": [ + "org::jsoup::helper::DataUtil::detectCharset", + "org::jsoup::internal::LegacyMatching::attribute", + "org::jsoup::nodes::FormElement::formData", + "org::jsoup::nodes::FormElement::submit", + "org::jsoup::nodes::LeafNode::hasAttr", + "org::jsoup::parser::HtmlTreeBuilder::doInsertElement", + "org::jsoup::parser::HtmlTreeBuilderState::process", + "org::jsoup::select::Elements::attr", + "org::jsoup::select::Elements::eachAttr", + "org::jsoup::select::Elements::hasAttr", + "org::jsoup::select::Evaluator::Attribute::matchesNode" + ], + "found": [ + "org::jsoup::helper::DataUtil::detectCharset", + "org::jsoup::internal::LegacyMatching::attribute", + "org::jsoup::nodes::FormElement::formData", + "org::jsoup::nodes::FormElement::submit", + "org::jsoup::parser::HtmlTreeBuilder::doInsertElement", + "org::jsoup::parser::HtmlTreeBuilderState::process", + "org::jsoup::select::Elements::attr", + "org::jsoup::select::Elements::eachAttr", + "org::jsoup::select::Elements::hasAttr", + "org::jsoup::select::Evaluator::Attribute::matchesNode" + ], + "maybe": [], + "import_files": [], + "recall": 0.9090909090909091, + "precision": 1.0, + "recall_with_maybe": 0.9090909090909091 + }, + { + "symbol": "org::jsoup::internal::NamespaceBindings::clear", + "truth": [ + "org::jsoup::parser::XmlTreeBuilder::initialiseParse" + ], + "found": [ + "org::jsoup::parser::XmlTreeBuilder::initialiseParse" + ], + "maybe": [ + "org::jsoup::nodes::Element::empty", + "org::jsoup::parser::TreeBuilder::initialiseParse" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attributes::Dataset::EntrySet::iterator", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::nodes::Attributes::dataset", + "truth": [ + "org::jsoup::nodes::Element::dataset" + ], + "found": [ + "org::jsoup::nodes::Element::dataset" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::select::Elements::forms", + "truth": [ + "org::jsoup::nodes::Document::forms" + ], + "found": [ + "org::jsoup::nodes::Document::forms" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::advance", + "truth": [ + "org::jsoup::parser::TokenQueue::consumeCssEscapeSequenceInto", + "org::jsoup::parser::TokenQueue::consumeCssIdentifier", + "org::jsoup::parser::TokenQueue::consumeCssString", + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeEscapedCssIdentifier", + "org::jsoup::parser::TokenQueue::consumeWhitespace", + "org::jsoup::parser::TokenQueue::escapeCssIdentifier", + "org::jsoup::select::QueryParser::consumeAttribute" + ], + "found": [ + "org::jsoup::parser::TokenQueue::consumeCssEscapeSequenceInto", + "org::jsoup::parser::TokenQueue::consumeCssIdentifier", + "org::jsoup::parser::TokenQueue::consumeCssString", + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeEscapedCssIdentifier", + "org::jsoup::parser::TokenQueue::consumeWhitespace", + "org::jsoup::parser::TokenQueue::escapeCssIdentifier", + "org::jsoup::select::QueryParser::consumeAttribute" + ], + "maybe": [ + "org::jsoup::nodes::Entities::load" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::QueryMode::current", + "truth": [ + "org::jsoup::nodes::Element::hasClass", + "org::jsoup::select::Evaluator::Evaluator", + "org::jsoup::select::EvaluatorInternals::closest", + "org::jsoup::select::EvaluatorInternals::matches", + "org::jsoup::select::QueryParser::parse", + "org::jsoup::select::Selector::select", + "org::jsoup::select::Selector::selectFirst" + ], + "found": [ + "org::jsoup::nodes::Element::hasClass", + "org::jsoup::select::Evaluator::Evaluator", + "org::jsoup::select::EvaluatorInternals::closest", + "org::jsoup::select::EvaluatorInternals::matches", + "org::jsoup::select::QueryParser::parse", + "org::jsoup::select::Selector::select", + "org::jsoup::select::Selector::selectFirst" + ], + "maybe": [ + "org::jsoup::nodes::Entities::load" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Element::removeClass", + "truth": [ + "org::jsoup::select::Elements::removeClass" + ], + "found": [ + "org::jsoup::select::Elements::removeClass" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesAny", + "truth": [ + "org::jsoup::select::QueryParser::parseSelector" + ], + "found": [ + "org::jsoup::select::QueryParser::parseSelector" + ], + "maybe": [ + "org::jsoup::select::HasEvaluator::matches" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Element::addClass", + "truth": [ + "org::jsoup::select::Elements::addClass" + ], + "found": [ + "org::jsoup::select::Elements::addClass" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attributes::size", + "truth": [ + "org::jsoup::nodes::Attributes::addAll", + "org::jsoup::nodes::Attributes::equals", + "org::jsoup::nodes::Attributes::isEmpty", + "org::jsoup::nodes::Node::attributesSize", + "org::jsoup::nodes::ProcessingInstruction::attributesSize", + "org::jsoup::parser::HtmlTreeBuilderState::mergeAttributes", + "org::jsoup::parser::Token::StartTag::toString", + "org::jsoup::parser::Token::Tag::newAttribute", + "org::jsoup::parser::Token::XmlDecl::toString" + ], + "found": [ + "org::jsoup::nodes::Attributes::addAll", + "org::jsoup::nodes::Attributes::equals", + "org::jsoup::nodes::Attributes::isEmpty", + "org::jsoup::nodes::Node::attributesSize", + "org::jsoup::nodes::ProcessingInstruction::attributesSize", + "org::jsoup::parser::HtmlTreeBuilderState::mergeAttributes", + "org::jsoup::parser::Token::Tag::newAttribute" + ], + "maybe": [ + "org::jsoup::examples::HtmlToPlainText::trimParents", + "org::jsoup::examples::ListLinks::main", + "org::jsoup::helper::W3CDom::W3CBuilder::seedSourceNamespaces", + "org::jsoup::nodes::Element::appendChild", + "org::jsoup::nodes::Element::child", + "org::jsoup::nodes::Element::childNodeSize", + "org::jsoup::nodes::Element::cssSelectorComponent", + "org::jsoup::nodes::Element::doClone", + "org::jsoup::nodes::Element::empty", + "org::jsoup::nodes::Element::firstElementChild", + "org::jsoup::nodes::Element::lastElementChild", + "org::jsoup::nodes::Element::reindexChildren", + "org::jsoup::nodes::Element::uniqueIdSelector", + "org::jsoup::parser::XmlTreeBuilder::initialiseParseFragment", + "org::jsoup::select::QueryCompat::check" + ], + "import_files": [], + "recall": 0.7777777777777778, + "precision": 1.0, + "recall_with_maybe": 0.7777777777777778 + }, + { + "symbol": "org::jsoup::internal::LineMap::complete", + "truth": [ + "org::jsoup::parser::TreeBuilder::closeParse" + ], + "found": [ + "org::jsoup::parser::TreeBuilder::closeParse" + ], + "maybe": [ + "org::jsoup::internal::StringUtil::joining" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Node::nodeValue", + "truth": [ + "org::jsoup::nodes::Printer::Pretty::textTrim", + "org::jsoup::select::NodeEvaluator::BlankValue::evaluateMatch", + "org::jsoup::select::NodeEvaluator::ContainsValue::evaluateMatch", + "org::jsoup::select::NodeEvaluator::MatchesValue::evaluateMatch" + ], + "found": [ + "org::jsoup::nodes::Printer::Pretty::textTrim", + "org::jsoup::select::NodeEvaluator::BlankValue::evaluateMatch", + "org::jsoup::select::NodeEvaluator::ContainsValue::evaluateMatch", + "org::jsoup::select::NodeEvaluator::MatchesValue::evaluateMatch" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isBlank", + "truth": [ + "org::jsoup::helper::W3CDom::asString", + "org::jsoup::helper::W3CDom::convert", + "org::jsoup::nodes::DocumentType::has", + "org::jsoup::nodes::Element::Element", + "org::jsoup::nodes::TextNode::isBlank", + "org::jsoup::parser::HtmlTreeBuilder::processNoscriptToken", + "org::jsoup::parser::HtmlTreeBuilderState::isWhitespace", + "org::jsoup::parser::HtmlTreeBuilderState::process", + "org::jsoup::parser::HtmlTreeBuilderState::processFramesetCharacters", + "org::jsoup::select::NodeEvaluator::BlankValue::evaluateMatch" + ], + "found": [ + "org::jsoup::helper::W3CDom::asString", + "org::jsoup::helper::W3CDom::convert", + "org::jsoup::nodes::DocumentType::has", + "org::jsoup::nodes::Element::Element", + "org::jsoup::nodes::TextNode::isBlank", + "org::jsoup::parser::HtmlTreeBuilder::processNoscriptToken", + "org::jsoup::parser::HtmlTreeBuilderState::isWhitespace", + "org::jsoup::parser::HtmlTreeBuilderState::process", + "org::jsoup::parser::HtmlTreeBuilderState::processFramesetCharacters", + "org::jsoup::select::NodeEvaluator::BlankValue::evaluateMatch" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::StreamParser::ElementIterator::hasNext", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::internal::ControllableInputStream::resetFullyRead", + "truth": [ + "org::jsoup::helper::DataUtil::detectCharset" + ], + "found": [ + "org::jsoup::helper::DataUtil::detectCharset" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Element::hasText", + "truth": [ + "org::jsoup::nodes::Element::TextAccumulator::needsLeadingTextSeparator", + "org::jsoup::select::Elements::eachText", + "org::jsoup::select::Elements::hasText" + ], + "found": [ + "org::jsoup::nodes::Element::TextAccumulator::needsLeadingTextSeparator", + "org::jsoup::select::Elements::eachText", + "org::jsoup::select::Elements::hasText" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::Tag::prefix", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::w3cNamespace" + ], + "found": [], + "maybe": [ + "org::jsoup::helper::W3CDom::W3CBuilder::w3cNamespace" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::helper::HttpConnection::Response::readFully", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::nodes::Comment::getData", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::head", + "org::jsoup::nodes::Comment::asXmlDeclaration", + "org::jsoup::nodes::Comment::isXmlDeclaration", + "org::jsoup::nodes::Comment::outerHtmlHead", + "org::jsoup::nodes::Element::data" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::head", + "org::jsoup::nodes::Comment::asXmlDeclaration", + "org::jsoup::nodes::Comment::isXmlDeclaration", + "org::jsoup::nodes::Comment::outerHtmlHead", + "org::jsoup::nodes::Element::data", + "org::jsoup::parser::HtmlTreeBuilder::insertCommentNode", + "org::jsoup::parser::XmlTreeBuilder::insertCommentFor" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.7142857142857143, + "recall_with_maybe": 1.0 + } + ], + "callers_blind": [ + { + "symbol": "org::jsoup::parser::Parser::parseXmlFragment", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::nodes::Element::cssSelector", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::internal::SoftPool::release", + "truth": [ + "org::jsoup::internal::ControllableInputStream::readToByteBuffer", + "org::jsoup::internal::ControllableInputStream::skip", + "org::jsoup::internal::SimpleBufferedInput::close", + "org::jsoup::internal::SimpleStreamReader::close", + "org::jsoup::internal::StringUtil::releaseBuilderVoid", + "org::jsoup::parser::CharacterReader::close", + "org::jsoup::select::HasEvaluator::Traversal::matchesAny" + ], + "found": [ + "org::jsoup::internal::ControllableInputStream::readToByteBuffer", + "org::jsoup::internal::ControllableInputStream::skip", + "org::jsoup::internal::SimpleBufferedInput::close", + "org::jsoup::internal::SimpleStreamReader::close", + "org::jsoup::internal::StringUtil::releaseBuilderVoid", + "org::jsoup::parser::CharacterReader::close", + "org::jsoup::select::HasEvaluator::Traversal::matchesAny" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::select::Nodes::removeIf", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::internal::SimpleBufferedInput::available", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::nodes::Element::getElementsByIndexGreaterThan", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "truth": [ + "org::jsoup::internal::StringUtil::normaliseWhitespace", + "org::jsoup::nodes::Element::appendNormalisedText" + ], + "found": [ + "org::jsoup::internal::StringUtil::normaliseWhitespace", + "org::jsoup::nodes::Element::appendNormalisedText" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "truth": [ + "org::jsoup::select::Evaluator::AttributeKeyPair::matchesValue" + ], + "found": [ + "org::jsoup::select::Evaluator::AttributeKeyPair::matchesValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Element::getElementsByAttributeValueStarting", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "truth": [ + "org::jsoup::select::EvaluatorInternals::stream" + ], + "found": [ + "org::jsoup::select::EvaluatorInternals::stream" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Document::documentType", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::nodes::Node::parentElementIs", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::nodes::Element::appendText", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "truth": [ + "org::jsoup::parser::TokenQueue::matchesCssIdentifier", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "found": [ + "org::jsoup::parser::TokenQueue::matchesCssIdentifier", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "truth": [ + "org::jsoup::parser::CharacterReader::consumeLetterSequence", + "org::jsoup::parser::CharacterReader::consumeLetterThenDigitSequence", + "org::jsoup::parser::CharacterReader::matchesAsciiAlpha", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::isIdentStart" + ], + "found": [ + "org::jsoup::parser::CharacterReader::consumeLetterSequence", + "org::jsoup::parser::CharacterReader::consumeLetterThenDigitSequence", + "org::jsoup::parser::CharacterReader::matchesAsciiAlpha", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::isIdentStart" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "truth": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeWhitespace", + "org::jsoup::select::QueryParser::consumeAttributeValue" + ], + "found": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeWhitespace", + "org::jsoup::select::QueryParser::consumeAttributeValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendDocumentType", + "org::jsoup::parser::HtmlTreeBuilderState::process" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendDocumentType", + "org::jsoup::parser::HtmlTreeBuilderState::process" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Element::children", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::ParseErrorList::tracking", + "truth": [ + "org::jsoup::parser::Parser::setTrackErrors", + "org::jsoup::safety::Cleaner::isValidBodyHtml" + ], + "found": [ + "org::jsoup::parser::Parser::setTrackErrors", + "org::jsoup::safety::Cleaner::isValidBodyHtml" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Node::ownerDocument", + "truth": [ + "org::jsoup::helper::W3CDom::convert", + "org::jsoup::helper::W3CDom::fromJsoup", + "org::jsoup::internal::CssMatching::document", + "org::jsoup::internal::CssMatching::withDocument", + "org::jsoup::nodes::Element::cssSelector", + "org::jsoup::nodes::FormElement::elements", + "org::jsoup::nodes::FormElement::submit", + "org::jsoup::nodes::Node::attr", + "org::jsoup::nodes::Node::doClone", + "org::jsoup::nodes::NodeUtils::outputSettings", + "org::jsoup::nodes::NodeUtils::parser", + "org::jsoup::nodes::ProcessingInstruction::data", + "org::jsoup::nodes::ProcessingInstruction::parseAttributes", + "org::jsoup::parser::HtmlTreeBuilder::initialiseParseFragment" + ], + "found": [ + "org::jsoup::helper::W3CDom::convert", + "org::jsoup::helper::W3CDom::fromJsoup", + "org::jsoup::internal::CssMatching::document", + "org::jsoup::internal::CssMatching::withDocument", + "org::jsoup::nodes::Element::cssSelector", + "org::jsoup::nodes::FormElement::elements", + "org::jsoup::nodes::FormElement::submit", + "org::jsoup::nodes::Node::attr", + "org::jsoup::nodes::Node::doClone", + "org::jsoup::nodes::NodeUtils::outputSettings", + "org::jsoup::nodes::NodeUtils::parser", + "org::jsoup::nodes::ProcessingInstruction::data", + "org::jsoup::nodes::ProcessingInstruction::parseAttributes", + "org::jsoup::parser::HtmlTreeBuilder::initialiseParseFragment" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::safety::Safelist::addTags", + "truth": [ + "org::jsoup::safety::Safelist::addAttributes", + "org::jsoup::safety::Safelist::basic", + "org::jsoup::safety::Safelist::basicWithImages", + "org::jsoup::safety::Safelist::relaxed", + "org::jsoup::safety::Safelist::simpleText" + ], + "found": [ + "org::jsoup::safety::Safelist::addAttributes", + "org::jsoup::safety::Safelist::basic", + "org::jsoup::safety::Safelist::basicWithImages", + "org::jsoup::safety::Safelist::relaxed", + "org::jsoup::safety::Safelist::simpleText" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::helper::HttpClientExecutor::ProxyWrap::connectFailed", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::HttpStatusException::getStatusCode", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::internal::StringUtil::isActuallyWhitespace", + "truth": [ + "org::jsoup::internal::StringUtil::appendNormalisedWhitespace" + ], + "found": [ + "org::jsoup::internal::StringUtil::appendNormalisedWhitespace" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attributes::getIgnoreCase", + "truth": [ + "org::jsoup::internal::CssMatching::hasClass", + "org::jsoup::internal::LegacyMatching::hasClass", + "org::jsoup::nodes::Element::classList", + "org::jsoup::nodes::Element::classNames", + "org::jsoup::nodes::Element::id", + "org::jsoup::nodes::Node::absUrl", + "org::jsoup::nodes::Node::attr" + ], + "found": [ + "org::jsoup::internal::CssMatching::hasClass", + "org::jsoup::internal::LegacyMatching::hasClass", + "org::jsoup::nodes::Element::classList", + "org::jsoup::nodes::Element::classNames", + "org::jsoup::nodes::Element::id", + "org::jsoup::nodes::Node::absUrl", + "org::jsoup::nodes::Node::attr" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::Parser::getMaxDepth", + "truth": [ + "org::jsoup::parser::TreeBuilder::enforceStackDepthLimit" + ], + "found": [ + "org::jsoup::parser::TreeBuilder::enforceStackDepthLimit" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::DataNode::setWholeData", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::Tag::isFormSubmittable", + "truth": [ + "org::jsoup::nodes::FormElement::formData" + ], + "found": [ + "org::jsoup::nodes::FormElement::formData" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attributes::removeIgnoreCase", + "truth": [ + "org::jsoup::nodes::Node::removeAttr", + "org::jsoup::safety::Cleaner::createSafeElement" + ], + "found": [ + "org::jsoup::nodes::Node::removeAttr", + "org::jsoup::safety::Cleaner::createSafeElement" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::Token::Doctype::getSystemIdentifier", + "truth": [ + "org::jsoup::parser::HtmlTreeBuilderState::process", + "org::jsoup::parser::XmlTreeBuilder::insertDoctypeFor" + ], + "found": [ + "org::jsoup::parser::HtmlTreeBuilderState::process", + "org::jsoup::parser::XmlTreeBuilder::insertDoctypeFor" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::Normalizer::lowerCase", + "truth": [ + "org::jsoup::helper::DataUtil::openStream", + "org::jsoup::helper::HttpConnection::Base::scanHeaders", + "org::jsoup::internal::LegacyMatching::attributeMatches", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::safety::Safelist::isSafeProtocol", + "org::jsoup::select::Evaluator::AttributeKeyPair::AttributeKeyPair", + "org::jsoup::select::Evaluator::ContainsData::ContainsData", + "org::jsoup::select::Evaluator::ContainsData::matches", + "org::jsoup::select::Evaluator::ContainsOwnText::ContainsOwnText", + "org::jsoup::select::Evaluator::ContainsOwnText::matches", + "org::jsoup::select::Evaluator::ContainsText::ContainsText", + "org::jsoup::select::Evaluator::ContainsText::matches", + "org::jsoup::select::NodeEvaluator::ContainsValue::ContainsValue", + "org::jsoup::select::NodeEvaluator::ContainsValue::evaluateMatch" + ], + "found": [ + "org::jsoup::helper::DataUtil::openStream", + "org::jsoup::helper::HttpConnection::Base::scanHeaders", + "org::jsoup::internal::LegacyMatching::attributeMatches", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::safety::Safelist::isSafeProtocol", + "org::jsoup::select::Evaluator::AttributeKeyPair::AttributeKeyPair", + "org::jsoup::select::Evaluator::ContainsData::ContainsData", + "org::jsoup::select::Evaluator::ContainsData::matches", + "org::jsoup::select::Evaluator::ContainsOwnText::ContainsOwnText", + "org::jsoup::select::Evaluator::ContainsOwnText::matches", + "org::jsoup::select::Evaluator::ContainsText::ContainsText", + "org::jsoup::select::Evaluator::ContainsText::matches", + "org::jsoup::select::NodeEvaluator::ContainsValue::ContainsValue", + "org::jsoup::select::NodeEvaluator::ContainsValue::evaluateMatch" + ], + "maybe": [], + "import_files": [ + "src/main/java/org/jsoup/helper/HttpConnection.java", + "src/main/java/org/jsoup/internal/LegacyMatching.java", + "src/main/java/org/jsoup/safety/Safelist.java", + "src/main/java/org/jsoup/select/Evaluator.java", + "src/main/java/org/jsoup/select/NodeEvaluator.java" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::safety::Safelist::none", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::remainder", + "truth": [ + "org::jsoup::select::LegacyQueryParser::rawAttribute", + "org::jsoup::select::QueryParser::parse", + "org::jsoup::select::QueryParser::parsePseudoSelector", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "found": [ + "org::jsoup::select::LegacyQueryParser::rawAttribute", + "org::jsoup::select::QueryParser::parse", + "org::jsoup::select::QueryParser::parsePseudoSelector", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::select::Selector::evaluatorOf", + "truth": [ + "org::jsoup::helper::DataUtil", + "org::jsoup::nodes::Element::selectFirstNode", + "org::jsoup::nodes::Element::selectNodes", + "org::jsoup::nodes::FormElement", + "org::jsoup::parser::StreamParser::selectFirst", + "org::jsoup::parser::StreamParser::selectNext", + "org::jsoup::select::Elements::is", + "org::jsoup::select::Elements::not", + "org::jsoup::select::Elements::siblings", + "org::jsoup::select::Selector::selectStream" + ], + "found": [ + "org::jsoup::helper", + "org::jsoup::nodes", + "org::jsoup::nodes::Element::selectFirstNode", + "org::jsoup::nodes::Element::selectNodes", + "org::jsoup::parser::StreamParser::selectFirst", + "org::jsoup::parser::StreamParser::selectNext", + "org::jsoup::select::Elements::is", + "org::jsoup::select::Elements::not", + "org::jsoup::select::Elements::siblings", + "org::jsoup::select::Selector::selectStream" + ], + "maybe": [], + "import_files": [ + "src/main/java/org/jsoup/nodes/Element.java" + ], + "recall": 0.8, + "precision": 0.8, + "recall_with_maybe": 0.8 + }, + { + "symbol": "org::jsoup::safety::Safelist::isSafeTag", + "truth": [ + "org::jsoup::safety::Cleaner::CleaningVisitor::head", + "org::jsoup::safety::Cleaner::CleaningVisitor::tail" + ], + "found": [], + "maybe": [ + "org::jsoup::safety::Cleaner::CleaningVisitor::head", + "org::jsoup::safety::Cleaner::CleaningVisitor::tail" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Range::AttributeRange::valueRange", + "truth": [ + "org::jsoup::nodes::Range::AttributeRange::toString" + ], + "found": [ + "org::jsoup::nodes::Range::AttributeRange::toString" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::TextNode::getWholeText", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendCdata", + "org::jsoup::helper::W3CDom::W3CBuilder::head", + "org::jsoup::nodes::CDataNode::outerHtmlHead", + "org::jsoup::nodes::CDataNode::text", + "org::jsoup::nodes::Element::appendNormalisedText", + "org::jsoup::nodes::Element::data", + "org::jsoup::nodes::Element::wholeTextOf", + "org::jsoup::nodes::Printer::addHead", + "org::jsoup::nodes::TextNode::text", + "org::jsoup::safety::Cleaner::CleaningVisitor::head" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendCdata", + "org::jsoup::helper::W3CDom::W3CBuilder::head", + "org::jsoup::nodes::CDataNode::outerHtmlHead", + "org::jsoup::nodes::CDataNode::text", + "org::jsoup::nodes::Element::appendNormalisedText", + "org::jsoup::nodes::Element::data", + "org::jsoup::nodes::Element::wholeTextOf", + "org::jsoup::nodes::Printer::addHead", + "org::jsoup::nodes::TextNode::text", + "org::jsoup::safety::Cleaner::CleaningVisitor::head" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::LineMap::addLineStart", + "truth": [ + "org::jsoup::parser::CharacterReader::scanBufferForNewlines" + ], + "found": [ + "org::jsoup::parser::CharacterReader::scanBufferForNewlines" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::Tag::isInline", + "truth": [ + "org::jsoup::nodes::Element::TextAccumulator::needsTrailingTextSeparator", + "org::jsoup::nodes::Element::TextAccumulator::tail" + ], + "found": [ + "org::jsoup::nodes::Element::TextAccumulator::needsTrailingTextSeparator", + "org::jsoup::nodes::Element::TextAccumulator::tail" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "truth": [ + "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "org::jsoup::nodes::Attribute::Attribute", + "org::jsoup::nodes::Attribute::setKey", + "org::jsoup::nodes::Element::getElementsByTag", + "org::jsoup::parser::ParseSettings::normalizeAttribute", + "org::jsoup::parser::ParseSettings::normalizeTag", + "org::jsoup::parser::TagSet::valueOf", + "org::jsoup::select::Evaluator::AttributeKeyPair::AttributeKeyPair", + "org::jsoup::select::Evaluator::AttributeWithValueMatching::AttributeWithValueMatching", + "org::jsoup::select::LegacyQueryParser::rawAttribute", + "org::jsoup::select::QueryParser::QueryParser", + "org::jsoup::select::QueryParser::cssNthChild", + "org::jsoup::select::QueryParser::piSelector" + ], + "found": [ + "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "org::jsoup::nodes::Attribute::Attribute", + "org::jsoup::nodes::Attribute::setKey", + "org::jsoup::nodes::Element::getElementsByTag", + "org::jsoup::parser::ParseSettings::normalizeAttribute", + "org::jsoup::parser::ParseSettings::normalizeTag", + "org::jsoup::parser::TagSet::valueOf", + "org::jsoup::select::Evaluator::AttributeKeyPair::AttributeKeyPair", + "org::jsoup::select::Evaluator::AttributeWithValueMatching::AttributeWithValueMatching", + "org::jsoup::select::LegacyQueryParser::rawAttribute", + "org::jsoup::select::QueryParser::QueryParser", + "org::jsoup::select::QueryParser::cssNthChild", + "org::jsoup::select::QueryParser::piSelector" + ], + "maybe": [], + "import_files": [ + "src/main/java/org/jsoup/internal/LegacyMatching.java", + "src/main/java/org/jsoup/select/Evaluator.java", + "src/main/java/org/jsoup/select/LegacyQueryParser.java", + "src/main/java/org/jsoup/select/QueryParser.java" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::safety::Safelist::addEnforcedAttribute", + "truth": [ + "org::jsoup::safety::Safelist::basic" + ], + "found": [ + "org::jsoup::safety::Safelist::basic" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::ControllableInputStream::skip", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::nodes::Element::getElementsByAttribute", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::consumeCssIdentifier", + "truth": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::select::QueryParser::byClass", + "org::jsoup::select::QueryParser::byId", + "org::jsoup::select::QueryParser::consumeAttributeName", + "org::jsoup::select::QueryParser::consumeAttributeValue", + "org::jsoup::select::QueryParser::cssAttribute", + "org::jsoup::select::QueryParser::matchesAttr", + "org::jsoup::select::QueryParser::parseNodeSelector", + "org::jsoup::select::QueryParser::parsePseudoSelector", + "org::jsoup::select::QueryParser::piSelector", + "org::jsoup::select::Selector::unescapeCssIdentifier" + ], + "found": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::select::QueryParser::byClass", + "org::jsoup::select::QueryParser::byId", + "org::jsoup::select::QueryParser::consumeAttributeName", + "org::jsoup::select::QueryParser::consumeAttributeValue", + "org::jsoup::select::QueryParser::cssAttribute", + "org::jsoup::select::QueryParser::matchesAttr", + "org::jsoup::select::QueryParser::parseNodeSelector", + "org::jsoup::select::QueryParser::parsePseudoSelector", + "org::jsoup::select::QueryParser::piSelector", + "org::jsoup::select::Selector::unescapeCssIdentifier" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attributes::deduplicate", + "truth": [ + "org::jsoup::parser::HtmlTreeBuilder::createElementFor", + "org::jsoup::parser::TreeBuilder::parseAttributes", + "org::jsoup::parser::XmlTreeBuilder::insertElementFor" + ], + "found": [ + "org::jsoup::parser::HtmlTreeBuilder::createElementFor", + "org::jsoup::parser::TreeBuilder::parseAttributes", + "org::jsoup::parser::XmlTreeBuilder::insertElementFor" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Element::getElementsByTag", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::nodes::Entities::isNamedEntity", + "truth": [ + "org::jsoup::parser::Tokeniser::consumeCharacterReference" + ], + "found": [ + "org::jsoup::parser::Tokeniser::consumeCharacterReference" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attribute::getValidKey", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::w3cSafeName", + "org::jsoup::helper::W3CDom::W3CBuilder::w3cSafeNcName", + "org::jsoup::nodes::Attribute::html", + "org::jsoup::nodes::Attributes::html", + "org::jsoup::nodes::Element::safeTagName" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::w3cSafeName", + "org::jsoup::helper::W3CDom::W3CBuilder::w3cSafeNcName", + "org::jsoup::nodes::Attribute::html", + "org::jsoup::nodes::Attributes::html", + "org::jsoup::nodes::Element::safeTagName" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Element::classList", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::nodes::Element::wholeOwnText", + "truth": [ + "org::jsoup::nodes::Element::nodeValue", + "org::jsoup::select::Evaluator::ContainsWholeOwnText::matches", + "org::jsoup::select::Evaluator::MatchesWholeOwnText::matches" + ], + "found": [ + "org::jsoup::nodes::Element::nodeValue", + "org::jsoup::select::Evaluator::ContainsWholeOwnText::matches", + "org::jsoup::select::Evaluator::MatchesWholeOwnText::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "truth": [ + "org::jsoup::internal::LegacyMatching::attributeString", + "org::jsoup::select::LegacyQueryParser::tryCssAttribute" + ], + "found": [ + "org::jsoup::internal::LegacyMatching::attributeString", + "org::jsoup::select::LegacyQueryParser::tryCssAttribute" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::systemId", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendDocumentType" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendDocumentType" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::select::Collector::findFirst", + "truth": [ + "org::jsoup::nodes::Element::getElementById", + "org::jsoup::nodes::Element::selectFirst", + "org::jsoup::select::Selector::selectFirst" + ], + "found": [ + "org::jsoup::nodes::Element::getElementById", + "org::jsoup::nodes::Element::selectFirst", + "org::jsoup::select::Selector::selectFirst" + ], + "maybe": [ + "org::jsoup::parser::StreamParser::selectNext", + "org::jsoup::select::Collector::findFirstNode" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "rename": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": ".github/dependabot.yml:11: # Et tu, junit? Keep us on 5, as 6 has min JDK17 - https://docs.junit.org/6.0.0-RC3/release-notes/#release-notes-6.0.0-M1\nchange-archive.txt:585: jsoup 1.15.1 release.\nchange-archive.txt:1547: * Improved parse time, now 2.3x faster than previous release, with lower", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/test/java/org/jsoup/internal/StringUtilTest.java:207: @Test void isAsciiLetter() {", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/main/java/org/jsoup/nodes/DocumentType.java:29: public DocumentType(String name, String publicId, String systemId) {\nsrc/main/java/org/jsoup/nodes/DocumentType.java:31: Validate.notNull(publicId);\nsrc/main/java/org/jsoup/nodes/DocumentType.java:35: .add(PublicId, publicId)\ns", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::ParseErrorList::tracking", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "change-archive.txt:29: * Improvement: better fidelity of source positions when tracking is enabled. And implicitly created or closed elements\nchange-archive.txt:33: * Improvement: when source tracking is enabled, the source position for attribute names and values is now available.\nchange-archive.t", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::Node::ownerDocument", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "change-archive.txt:1854: * Implemented Node.ownerDocument DOM method\nsrc/test/java/org/jsoup/nodes/NodeTest.java:268: @Test public void ownerDocument() {", + "detail": "" + }, + { + "symbol": "org::jsoup::select::Collector::findFirst", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/main/java/org/jsoup/parser/StreamParser.java:317: .findFirst()\nsrc/main/java/org/jsoup/select/Collector.java:73: Element el = stream(eval, root).findFirst().orElse(null);\nsrc/main/java/org/jsoup/select/Collector.java:89: T node = streamNodes(eval, root, type).findFir", + "detail": " symbol: method findFirstGnx()\n[ERROR] location: interface java.util.stream.Stream\n[ERROR] -> [Help 1]\n[ERROR] \n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\n[ERROR] \n[ERROR] For more information about the errors and possible solutions, please read the following articles:\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException\n" + }, + { + "symbol": "org::jsoup::internal::CssMatching::isQuirksMode", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::Attributes::hasKey", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::NamespaceBindings::isDeclaration", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/main/java/org/jsoup/parser/Token.java:566: boolean isDeclaration = true; // , or if false\nsrc/main/java/org/jsoup/parser/Token.java:575: isDeclaration = true;\nsrc/main/java/org/jsoup/parser/Token.java:581: String open = isDeclaration ? \" cookies = entry.getValue(); // these will be name=val\nsrc/main/java/org/jsoup/helper/CookieUtil.java:74: set.add(cookie.getKey() + \"=\" + cookie.getValue());\ns", + "detail": "c/main/java/org/jsoup/nodes/Attribute.java:[88,5] method does not override or implement a method from a supertype\n[ERROR] -> [Help 1]\n[ERROR] \n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\n[ERROR] \n[ERROR] For more information about the errors and possible solutions, please read the following articles:\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException\n" + }, + { + "symbol": "org::jsoup::nodes::Element::wholeOwnText", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "change-archive.txt:342: * Improvement: added Element#wholeOwnText() to retrieve the original (non-normalized) ownText of an Element. Also", + "detail": "" + }, + { + "symbol": "org::jsoup::safety::Safelist::addTags", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::StringUtil::isActuallyWhitespace", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::Attributes::getIgnoreCase", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::Parser::getMaxDepth", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::Tag::isFormSubmittable", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::Attributes::removeIgnoreCase", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::Token::Doctype::getSystemIdentifier", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::Normalizer::lowerCase", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::remainder", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/main/java/org/jsoup/nodes/Node.java:479: // remainder (unbalanced wrap, like

-- The

is remainder\nsrc/main/java/org/jsoup/nodes/Node.java:483: Node remainder = wrapChildren.get(i);\nsrc/main/java/org/jsoup/nodes/Node.java:485: if (wrap ==", + "detail": "" + }, + { + "symbol": "org::jsoup::select::Selector::evaluatorOf", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/test/java/org/jsoup/select/SelectorTest.java:1632: @Test void evaluatorOf() {", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::Range::AttributeRange::valueRange", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::TextNode::getWholeText", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::LineMap::addLineStart", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::Tag::isInline", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::Element::lastElementChild", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "change-archive.txt:104: lastElementSibling, firstElementChild, and lastElementChild. They now inplace filter/skip in the child-node list, vs\nchange-archive.txt:298: * Improvement: added Element.firstElementChild(), Element.lastElementChild(), Node.firstChild(), Node.lastChild(),", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::Parser::isTrackErrors", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::attributeMatches", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::Range::AttributeRange::nameRange", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::DocumentType::systemId", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "change-archive.txt:779: * Improvement: To DocumentType, added #name(), #publicID(), and #systemId() methods to fetch those fields.\nsrc/main/java/org/jsoup/nodes/DocumentType.java:29: public DocumentType(String name, String publicId, String systemId) {\nsrc/main/java/org/jsoup/nodes/DocumentType.j", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::safety::Safelist::addEnforcedAttribute", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::consumeCssIdentifier", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::Attributes::deduplicate", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::Entities::isNamedEntity", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::Attribute::getValidKey", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::Node::siblingIndex", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/main/java/org/jsoup/nodes/Node.java:30: int siblingIndex;\nsrc/main/java/org/jsoup/nodes/Node.java:595: ensureChildNodes().remove(out.siblingIndex);\nsrc/main/java/org/jsoup/nodes/Node.java:696: assert (node.siblingIndex == index); // sanity test that invalidations haven't", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::Attributes::normalize", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "change-archive.txt:227: * Improvement: when pretty-printing, normalize newlines that follow self-closing tags in custom tags.\nchange-archive.txt:821: * Bugfix: TextNode.outerHtml() wouldn't normalize correctly without a parent.\nchange-archive.txt:939: * Bugfix: when using the XML Parser set to lo", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::StringUtil::joining", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "change-archive.txt:137: This precluded callers from spawning a thread, running a number of requests for a length of time, then joining that\nsrc/main/java/org/jsoup/internal/StringUtil.java:68: A StringJoiner allows incremental / filtered joining of a set of stringable objects.\nsrc/test/java/o", + "detail": "" + } + ], + "mutants": { + "7": [ + "org::jsoup::internal::SoftPool::release", + "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::select::Evaluator::asPredicate", + "org::jsoup::parser::TokenQueue::matchesWord", + "org::jsoup::internal::StringUtil::isAsciiLetter", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::nodes::DocumentType::publicId" + ], + "8": [ + "org::jsoup::safety::Safelist::addTags", + "org::jsoup::internal::StringUtil::isActuallyWhitespace", + "org::jsoup::nodes::Attributes::getIgnoreCase", + "org::jsoup::parser::Parser::getMaxDepth", + "org::jsoup::parser::Tag::isFormSubmittable", + "org::jsoup::nodes::Attributes::removeIgnoreCase", + "org::jsoup::parser::Token::Doctype::getSystemIdentifier", + "org::jsoup::internal::Normalizer::lowerCase" + ], + "9": [ + "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "org::jsoup::safety::Safelist::addEnforcedAttribute", + "org::jsoup::parser::TokenQueue::consumeCssIdentifier", + "org::jsoup::nodes::Attributes::deduplicate", + "org::jsoup::nodes::DocumentType::publicId", + "org::jsoup::nodes::Entities::isNamedEntity", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::safety::Safelist::addTags" + ] + }, + "tests": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "level": "name", + "truth": 1755, + "predicted": 834, + "recall": 0.46495726495726497, + "precision": 0.9784172661870504, + "top_hits": 6, + "top_n": 10, + "top_precision": 0.6, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "DocumentsWithSameContentAreEqual", + "DocumentsWithSameContentAreVerifiable", + "NoErrorOnEofIfBodyOpen", + "aLoneOperandIsNotAnExplicitFlag", + "absAttr", + "absHandlesDotFromIndex", + "absHandlesRelativeQuery", + "absoluteAttributeLookupIgnoresKeyCase" + ], + "recall_graph_only": 0.46438746438746437 + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "level": "name", + "truth": 446, + "predicted": 141, + "recall": 0.289237668161435, + "precision": 0.9148936170212766, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "adjacentSiblings", + "adjacentSiblingsWithId", + "adoption", + "adoptionFallbackAtCapacityRetainsRecentEntries", + "adoptionReportsFormattingElementMissingFromStack", + "adoptionReportsFormattingElementOutsideScope", + "adoptionReportsNonCurrentFormattingElementAndContinues", + "after" + ], + "recall_graph_only": 0.289237668161435 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "level": "name", + "truth": 7, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "aLoneOperandIsNotAnExplicitFlag", + "absoluteAttributeLookupIgnoresKeyCase", + "explicitCompilationCapturesTheWholeQuery", + "explicitFlagsOverrideDefaultsInBothModes", + "hyphenatedAttributeValueAtBufferBoundary", + "parsedAttributeValuesRoundTrip", + "qualifiedAttributeNamesUseTheSameLiteralAndRegexParsing" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "level": "name", + "truth": 957, + "predicted": 23, + "recall": 0.022988505747126436, + "precision": 0.9565217391304348, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "aLoneOperandIsNotAnExplicitFlag", + "absAttr", + "absHandlesDotFromIndex", + "absHandlesRelativeQuery", + "absoluteAttributeLookupIgnoresKeyCase", + "absoluteAttributesRespectAttributeNameCase", + "accessorsAreCaseInsensitive", + "accessorsDoNotVivifyAttributes" + ], + "recall_graph_only": 0.022988505747126436 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "level": "name", + "truth": 1717, + "predicted": 22, + "recall": 0.0029120559114735, + "precision": 0.22727272727272727, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "top_best": 0.5, + "caught": 1.0, + "missed": [ + "DocumentsWithSameContentAreEqual", + "DocumentsWithSameContentAreVerifiable", + "NoErrorOnEofIfBodyOpen", + "aLoneOperandIsNotAnExplicitFlag", + "absAttr", + "absHandlesDotFromIndex", + "absHandlesRelativeQuery", + "absoluteAttributeLookupIgnoresKeyCase" + ], + "recall_graph_only": 0.0011648223645894002 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "level": "name", + "truth": 1699, + "predicted": 39, + "recall": 0.020011771630370805, + "precision": 0.8717948717948718, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "DocumentsWithSameContentAreEqual", + "DocumentsWithSameContentAreVerifiable", + "NoErrorOnEofIfBodyOpen", + "aLoneOperandIsNotAnExplicitFlag", + "absAttr", + "absHandlesDotFromIndex", + "absHandlesRelativeQuery", + "absoluteAttributeLookupIgnoresKeyCase" + ], + "recall_graph_only": 0.020011771630370805 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "level": "name", + "truth": 1721, + "predicted": 119, + "recall": 0.06624055781522371, + "precision": 0.957983193277311, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "DocumentsWithSameContentAreEqual", + "DocumentsWithSameContentAreVerifiable", + "NoErrorOnEofIfBodyOpen", + "aLoneOperandIsNotAnExplicitFlag", + "absAttr", + "absHandlesDotFromIndex", + "absHandlesRelativeQuery", + "absoluteAttributesRespectAttributeNameCase" + ], + "recall_graph_only": 0.06624055781522371 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "level": "name", + "truth": 115, + "predicted": 7, + "recall": 0.02608695652173913, + "precision": 0.42857142857142855, + "top_hits": 3, + "top_n": 7, + "top_precision": 0.42857142857142855, + "top_best": 0.42857142857142855, + "caught": 1.0, + "missed": [ + "aLoneOperandIsNotAnExplicitFlag", + "absoluteAttributesRespectAttributeNameCase", + "accessorsAreCaseInsensitive", + "attributeTokenOperatorUsesRegex", + "attributesUseHostDefaultsAndLiteralOperands", + "baseHrefCorrectAfterHttpEquiv", + "bogusDoctypeReportsNull", + "bufferedParseWorksWhenCharsetDetectionFullyReadsResponse" + ], + "recall_graph_only": 0.017391304347826087 + }, + { + "symbol": "org::jsoup::safety::Safelist::addTags", + "level": "name", + "truth": 72, + "predicted": 71, + "recall": 0.9861111111111112, + "precision": 1.0, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "safeListedProtocolShouldBeRetained" + ], + "recall_graph_only": 0.9861111111111112 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isActuallyWhitespace", + "level": "name", + "truth": 446, + "predicted": 132, + "recall": 0.27802690582959644, + "precision": 0.9393939393939394, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "adjacentSiblings", + "adjacentSiblingsWithId", + "adoption", + "adoptionFallbackAtCapacityRetainsRecentEntries", + "adoptionReportsFormattingElementMissingFromStack", + "adoptionReportsFormattingElementOutsideScope", + "adoptionReportsNonCurrentFormattingElementAndContinues", + "after" + ], + "recall_graph_only": 0.27802690582959644 + }, + { + "symbol": "org::jsoup::nodes::Attributes::getIgnoreCase", + "level": "name", + "truth": 610, + "predicted": 251, + "recall": 0.3540983606557377, + "precision": 0.8605577689243028, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "aLoneOperandIsNotAnExplicitFlag", + "absoluteAttributeLookupIgnoresKeyCase", + "absoluteAttributesRespectAttributeNameCase", + "accessorsAreCaseInsensitive", + "adjacentSiblingsWithId", + "adjustedForeignAttributesDedupe", + "adjustsForeignNameCase", + "afterSelfIsNoOp" + ], + "recall_graph_only": 0.3540983606557377 + }, + { + "symbol": "org::jsoup::parser::Parser::getMaxDepth", + "level": "name", + "truth": 1467, + "predicted": 10, + "recall": 0.0027266530334014998, + "precision": 0.4, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "top_best": 0.4, + "caught": 1.0, + "missed": [ + "DocumentsWithSameContentAreEqual", + "DocumentsWithSameContentAreVerifiable", + "NoErrorOnEofIfBodyOpen", + "aLoneOperandIsNotAnExplicitFlag", + "absAttr", + "absHandlesDotFromIndex", + "absHandlesRelativeQuery", + "absoluteAttributeLookupIgnoresKeyCase" + ], + "recall_graph_only": 0.0013633265167007499 + }, + { + "symbol": "org::jsoup::parser::Tag::isFormSubmittable", + "level": "name", + "truth": 16, + "predicted": 17, + "recall": 1.0, + "precision": 0.9411764705882353, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Attributes::removeIgnoreCase", + "level": "name", + "truth": 28, + "predicted": 31, + "recall": 0.07142857142857142, + "precision": 0.06451612903225806, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "top_best": 0.2, + "caught": 1.0, + "missed": [ + "absoluteAttributesRespectAttributeNameCase", + "attributeSizeDoesNotAutoVivify", + "attributes", + "attributesKeepIdentityAndSourceRanges", + "basicBehaviourTest", + "canDitchNamespaces", + "canonicalizesEnforcedAttributes", + "canonicalizesNofollowEnforcedAttribute" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "org::jsoup::parser::Token::Doctype::getSystemIdentifier", + "level": "name", + "truth": 130, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "aLoneOperandIsNotAnExplicitFlag", + "absoluteAttributesRespectAttributeNameCase", + "accessorsAreCaseInsensitive", + "attributeTokenOperatorUsesRegex", + "attributes", + "attributesUseHostDefaultsAndLiteralOperands", + "baseHrefCorrectAfterHttpEquiv", + "bogusDoctypeReportsNull" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "org::jsoup::internal::Normalizer::lowerCase", + "level": "name", + "truth": 1689, + "predicted": 1183, + "recall": 0.6956779159265838, + "precision": 0.9932375316990701, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "accessorsAreCaseInsensitive", + "accessorsWillNormalizeStructure", + "accumulatesWhitespaceReferencesBeforeText", + "addsTagOnAttributesIfNotSet", + "adoptedMixedChildrenRetainSourceRanges", + "adoptionDoesNotAddSecondDocumentElement", + "adoptionDropsNodeThatWouldCreateCycle", + "adoptionDropsNodeWhenItsReferenceIsRemoved" + ], + "recall_graph_only": 0.6956779159265838 + }, + { + "symbol": "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "level": "name", + "truth": 1811, + "predicted": 141, + "recall": 0.07675317504141359, + "precision": 0.9858156028368794, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "DocumentsWithSameContentAreEqual", + "DocumentsWithSameContentAreVerifiable", + "NoErrorOnEofIfBodyOpen", + "aLoneOperandIsNotAnExplicitFlag", + "absAttr", + "absHandlesDotFromIndex", + "absHandlesRelativeQuery", + "absoluteAttributeLookupIgnoresKeyCase" + ], + "recall_graph_only": 0.07675317504141359 + }, + { + "symbol": "org::jsoup::safety::Safelist::addEnforcedAttribute", + "level": "name", + "truth": 38, + "predicted": 38, + "recall": 1.0, + "precision": 1.0, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::consumeCssIdentifier", + "level": "name", + "truth": 383, + "predicted": 10, + "recall": 0.02349869451697128, + "precision": 0.9, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "top_best": 0.9, + "caught": 1.0, + "missed": [ + "aLoneOperandIsNotAnExplicitFlag", + "absAttr", + "absoluteAttributeLookupIgnoresKeyCase", + "absoluteAttributesRespectAttributeNameCase", + "adjacentSiblingsWithId", + "after", + "afterSelfIsNoOp", + "allowCustomDataInForeignElements" + ], + "recall_graph_only": 0.02349869451697128 + }, + { + "symbol": "org::jsoup::nodes::Attributes::deduplicate", + "level": "name", + "truth": 780, + "predicted": 8, + "recall": 0.010256410256410256, + "precision": 1.0, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "aLoneOperandIsNotAnExplicitFlag", + "absAttr", + "absHandlesDotFromIndex", + "absHandlesRelativeQuery", + "absoluteAttributeLookupIgnoresKeyCase", + "absoluteAttributesRespectAttributeNameCase", + "accessorsDoNotVivifyAttributes", + "actionWithNoBaseUri" + ], + "recall_graph_only": 0.010256410256410256 + }, + { + "symbol": "org::jsoup::nodes::Entities::isNamedEntity", + "level": "name", + "truth": 51, + "predicted": 24, + "recall": 0.1568627450980392, + "precision": 0.3333333333333333, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "top_best": 0.8, + "caught": 1.0, + "missed": [ + "accumulatesWhitespaceReferencesBeforeText", + "characterReaderBuffer", + "cssSelectorEscapedClass", + "doesNotExpandEntities", + "doesNotFindExtendedPrefixMatchingEntity", + "doesntDeleteZWJWhenNormalizingText", + "dropsConcealedJavascriptProtocolWhenRelativesLinksDisabled", + "dropsConcealedJavascriptProtocolWhenRelativesLinksEnabled" + ], + "recall_graph_only": 0.0196078431372549 + } + ], + "look": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "look_tokens": 386, + "file_tokens": 600 + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "look_tokens": 493, + "file_tokens": 4377 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "look_tokens": 248, + "file_tokens": 1068 + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "look_tokens": 333, + "file_tokens": 9555 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "look_tokens": 222, + "file_tokens": 5312 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "look_tokens": 364, + "file_tokens": 4377 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "look_tokens": 331, + "file_tokens": 5312 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "look_tokens": 214, + "file_tokens": 964 + }, + { + "symbol": "org::jsoup::parser::ParseErrorList::tracking", + "look_tokens": 322, + "file_tokens": 311 + }, + { + "symbol": "org::jsoup::nodes::Node::ownerDocument", + "look_tokens": 422, + "file_tokens": 9713 + }, + { + "symbol": "org::jsoup::select::Collector::findFirst", + "look_tokens": 378, + "file_tokens": 1055 + }, + { + "symbol": "org::jsoup::internal::CssMatching::isQuirksMode", + "look_tokens": 338, + "file_tokens": 2573 + }, + { + "symbol": "org::jsoup::nodes::Attributes::hasKey", + "look_tokens": 334, + "file_tokens": 6790 + }, + { + "symbol": "org::jsoup::internal::NamespaceBindings::isDeclaration", + "look_tokens": 212, + "file_tokens": 896 + }, + { + "symbol": "org::jsoup::select::Collector::streamNodes", + "look_tokens": 393, + "file_tokens": 1055 + }, + { + "symbol": "org::jsoup::Jsoup::newSession", + "look_tokens": 305, + "file_tokens": 4937 + }, + { + "symbol": "org::jsoup::nodes::Document::location", + "look_tokens": 265, + "file_tokens": 5175 + }, + { + "symbol": "org::jsoup::nodes::Entities::isBaseNamedEntity", + "look_tokens": 262, + "file_tokens": 4404 + }, + { + "symbol": "org::jsoup::nodes::Attribute::getValue", + "look_tokens": 352, + "file_tokens": 3027 + }, + { + "symbol": "org::jsoup::nodes::Element::wholeOwnText", + "look_tokens": 307, + "file_tokens": 21092 + }, + { + "symbol": "org::jsoup::safety::Safelist::addTags", + "look_tokens": 381, + "file_tokens": 6936 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isActuallyWhitespace", + "look_tokens": 308, + "file_tokens": 4377 + }, + { + "symbol": "org::jsoup::nodes::Attributes::getIgnoreCase", + "look_tokens": 332, + "file_tokens": 6790 + }, + { + "symbol": "org::jsoup::parser::Parser::getMaxDepth", + "look_tokens": 220, + "file_tokens": 3857 + }, + { + "symbol": "org::jsoup::parser::Tag::isFormSubmittable", + "look_tokens": 260, + "file_tokens": 3649 + }, + { + "symbol": "org::jsoup::nodes::Attributes::removeIgnoreCase", + "look_tokens": 233, + "file_tokens": 6790 + }, + { + "symbol": "org::jsoup::parser::Token::Doctype::getSystemIdentifier", + "look_tokens": 139, + "file_tokens": 5315 + }, + { + "symbol": "org::jsoup::internal::Normalizer::lowerCase", + "look_tokens": 439, + "file_tokens": 448 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::remainder", + "look_tokens": 318, + "file_tokens": 5312 + }, + { + "symbol": "org::jsoup::select::Selector::evaluatorOf", + "look_tokens": 315, + "file_tokens": 9240 + }, + { + "symbol": "org::jsoup::nodes::Range::AttributeRange::valueRange", + "look_tokens": 277, + "file_tokens": 4717 + }, + { + "symbol": "org::jsoup::nodes::TextNode::getWholeText", + "look_tokens": 340, + "file_tokens": 896 + }, + { + "symbol": "org::jsoup::internal::LineMap::addLineStart", + "look_tokens": 250, + "file_tokens": 595 + }, + { + "symbol": "org::jsoup::parser::Tag::isInline", + "look_tokens": 177, + "file_tokens": 3649 + }, + { + "symbol": "org::jsoup::nodes::Element::lastElementChild", + "look_tokens": 288, + "file_tokens": 21092 + }, + { + "symbol": "org::jsoup::parser::Parser::isTrackErrors", + "look_tokens": 236, + "file_tokens": 3857 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::attributeMatches", + "look_tokens": 344, + "file_tokens": 1068 + }, + { + "symbol": "org::jsoup::nodes::Range::AttributeRange::nameRange", + "look_tokens": 293, + "file_tokens": 4717 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::systemId", + "look_tokens": 195, + "file_tokens": 964 + }, + { + "symbol": "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "look_tokens": 489, + "file_tokens": 4377 + }, + { + "symbol": "org::jsoup::safety::Safelist::addEnforcedAttribute", + "look_tokens": 539, + "file_tokens": 6936 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::consumeCssIdentifier", + "look_tokens": 856, + "file_tokens": 5312 + }, + { + "symbol": "org::jsoup::nodes::Attributes::deduplicate", + "look_tokens": 399, + "file_tokens": 6790 + }, + { + "symbol": "org::jsoup::nodes::Entities::isNamedEntity", + "look_tokens": 239, + "file_tokens": 4404 + }, + { + "symbol": "org::jsoup::nodes::Attribute::getValidKey", + "look_tokens": 480, + "file_tokens": 3027 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "look_tokens": 353, + "file_tokens": 1068 + }, + { + "symbol": "org::jsoup::nodes::Node::siblingIndex", + "look_tokens": 521, + "file_tokens": 9713 + }, + { + "symbol": "org::jsoup::nodes::Attributes::normalize", + "look_tokens": 316, + "file_tokens": 6790 + }, + { + "symbol": "org::jsoup::internal::StringUtil::joining", + "look_tokens": 458, + "file_tokens": 4377 + } + ], + "seconds": 151, + "summary": { + "callers_recall": 0.996, + "callers_precision": 0.996, + "callers_checked": 49, + "blind_recall": 0.966, + "blind_checked": 35, + "common_recall": 0.866, + "common_precision": 0.992, + "common_recall_with_maybe": 0.961, + "common_checked": 40, + "rename_ok": 0.959, + "rename_checked": 49, + "tests_recall": 0.264, + "tests_precision": 0.703, + "tests_top10_precision": 0.692, + "tests_top10_best": 0.773, + "tests_caught": 0.905, + "tests_checked": 21, + "look_vs_file": 0.166 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 10, + "common_recall": 0.885, + "common_precision": 1.0, + "common_recall_with_maybe": 0.984, + "common_checked": 16, + "rename_ok": 0.9, + "rename_checked": 20, + "tests_recall": 0.112, + "tests_precision": 0.667, + "tests_top10_precision": 0.629, + "tests_top10_best": 0.741, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.198 + }, + "8": { + "callers_recall": 0.99, + "callers_precision": 0.99, + "callers_checked": 20, + "blind_recall": 0.92, + "blind_checked": 15, + "common_recall": 0.794, + "common_precision": 1.0, + "common_recall_with_maybe": 0.932, + "common_checked": 16, + "rename_ok": 1.0, + "rename_checked": 20, + "tests_recall": 0.424, + "tests_precision": 0.65, + "tests_top10_precision": 0.662, + "tests_top10_best": 0.7, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.152 + }, + "9": { + "callers_recall": 0.99, + "callers_precision": 0.99, + "callers_checked": 20, + "blind_recall": 0.987, + "blind_checked": 15, + "common_recall": 0.865, + "common_precision": 0.978, + "common_recall_with_maybe": 0.96, + "common_checked": 14, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.293, + "tests_precision": 0.826, + "tests_top10_precision": 0.816, + "tests_top10_best": 0.891, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.126 + } + }, + "noise": { + "callers_recall": { + "mean": 0.996, + "functions": 49, + "boot_lo": 0.988, + "boot_hi": 1.0, + "boot_half": 0.006, + "seeds": [ + 1.0, + 0.99, + 0.99 + ], + "seed_sd": 0.006, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 0.996, + "functions": 49, + "boot_lo": 0.988, + "boot_hi": 1.0, + "boot_half": 0.006, + "seeds": [ + 1.0, + 0.99, + 0.99 + ], + "seed_sd": 0.006, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 0.966, + "functions": 35, + "boot_lo": 0.909, + "boot_hi": 1.0, + "boot_half": 0.046, + "seeds": [ + 1.0, + 0.92, + 0.987 + ], + "seed_sd": 0.043, + "threshold": 0.05 + }, + "common_recall": { + "mean": 0.866, + "functions": 40, + "boot_lo": 0.785, + "boot_hi": 0.942, + "boot_half": 0.078, + "seeds": [ + 0.885, + 0.794, + 0.865 + ], + "seed_sd": 0.048, + "threshold": 0.08 + }, + "common_recall_with_maybe": { + "mean": 0.961, + "functions": 40, + "boot_lo": 0.912, + "boot_hi": 0.994, + "boot_half": 0.041, + "seeds": [ + 0.984, + 0.932, + 0.96 + ], + "seed_sd": 0.026, + "threshold": 0.05 + }, + "common_precision": { + "mean": 0.992, + "functions": 36, + "boot_lo": 0.976, + "boot_hi": 1.0, + "boot_half": 0.012, + "seeds": [ + 1.0, + 1.0, + 0.978 + ], + "seed_sd": 0.013, + "threshold": 0.03 + }, + "rename_ok": { + "mean": 0.959, + "functions": 49, + "boot_lo": 0.898, + "boot_hi": 1.0, + "boot_half": 0.051, + "seeds": [ + 0.9, + 1.0, + 0.95 + ], + "seed_sd": 0.05, + "threshold": 0.06 + }, + "tests_recall": { + "mean": 0.264, + "functions": 21, + "boot_lo": 0.142, + "boot_hi": 0.396, + "boot_half": 0.127, + "seeds": [ + 0.112, + 0.424, + 0.293 + ], + "seed_sd": 0.157, + "threshold": 0.13 + }, + "tests_precision": { + "mean": 0.703, + "functions": 21, + "boot_lo": 0.565, + "boot_hi": 0.828, + "boot_half": 0.132, + "seeds": [ + 0.667, + 0.65, + 0.826 + ], + "seed_sd": 0.097, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.692, + "functions": 21, + "boot_lo": 0.554, + "boot_hi": 0.82, + "boot_half": 0.133, + "seeds": [ + 0.629, + 0.662, + 0.816 + ], + "seed_sd": 0.1, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.773, + "functions": 21, + "boot_lo": 0.641, + "boot_hi": 0.89, + "boot_half": 0.125, + "seeds": [ + 0.741, + 0.7, + 0.891 + ], + "seed_sd": 0.101, + "threshold": 0.13 + }, + "tests_caught": { + "mean": 0.905, + "functions": 21, + "boot_lo": 0.762, + "boot_hi": 1.0, + "boot_half": 0.119, + "seeds": [ + 0.875, + 0.875, + 1.0 + ], + "seed_sd": 0.072, + "threshold": 0.12 + }, + "look_vs_file": { + "mean": 0.166, + "functions": 49, + "boot_lo": 0.119, + "boot_hi": 0.22, + "boot_half": 0.05, + "seeds": [ + 0.198, + 0.152, + 0.126 + ], + "seed_sd": 0.036, + "threshold": 0.06 + } + } + }, + { + "repo": "json-java", + "lang": "java", + "commit": "2cd0a8c2112a", + "index_seconds": 0.2, + "symbols": 542, + "files": 26, + "seeds": [ + 7, + 8, + 9 + ], + "edges": 12542, + "sample": [ + "org::json::JSONObject::putOnce", + "org::json::JSONObject::toMap", + "org::json::XMLParserConfiguration::getXsiTypeMap", + "org::json::JSONTokener::more", + "org::json::JSONPointer::queryFrom", + "org::json::XMLParserConfiguration::withKeepBooleanAsString", + "org::json::JSONTokener::nextClean", + "org::json::JSONTokener::getJsonParserConfiguration", + "org::json::JSONArray::toList", + "org::json::JSONParserConfiguration::isOverwriteDuplicateKey", + "org::json::JSONTokener::nextValue", + "org::json::JSONObject::putOpt", + "org::json::XMLTokener::nextMeta", + "org::json::XML::noSpace", + "org::json::XMLParserConfiguration::isKeepNumberAsString", + "org::json::XMLParserConfiguration::withKeepNumberAsString", + "org::json::XML::Iterable$anon79::Iterator$anon82::hasNext", + "org::json::JSONTokener::nextString", + "org::json::JSONParserConfiguration::getMaxSharedKeys", + "org::json::JSONParserConfiguration::isUseNativeNulls", + "org::json::ParserConfiguration::isKeepStrings", + "org::json::ParserConfiguration::getMaxNumberLength", + "org::json::XMLParserConfiguration::getForceList", + "org::json::JSONObject::numberToString", + "org::json::JSONObject::keys", + "org::json::ParserConfiguration::getMaxNestingDepth", + "org::json::JSONTokener::dehexchar", + "org::json::JSONParserConfiguration::isStrictMode", + "org::json::XMLParserConfiguration::isCloseEmptyTag", + "org::json::JSONObject::accumulate", + "org::json::XMLTokener::nextCDATA", + "org::json::XMLParserConfiguration::isConvertNilAttributeToNull", + "org::json::XMLTokener::skipPast", + "org::json::XMLParserConfiguration::shouldTrimWhiteSpace", + "org::json::JSONTokener::back", + "org::json::XMLParserConfiguration::isKeepBooleanAsString", + "org::json::XMLTokener::nextEntity" + ], + "sample_common": [ + "org::json::XML::Iterable$anon79::iterator", + "org::json::Cookie::escape", + "org::json::JSONArray::getJSONObject", + "org::json::JSONArray::similar", + "org::json::JSONObject::valueToString", + "org::json::JSONObject::isEmpty", + "org::json::JSONMLParserConfiguration::withKeepStrings", + "org::json::JSONObject::getBoolean", + "org::json::Cookie::unescape", + "org::json::JSONArray::remove", + "org::json::XMLTokener::nextToken", + "org::json::JSONArray::length", + "org::json::JSONArray::getString", + "org::json::JSONArray::getBoolean", + "org::json::JSONArray::isEmpty", + "org::json::JSONObject::length", + "org::json::XMLParserConfiguration::withKeepStrings", + "org::json::XML::escape", + "org::json::HTTPTokener::nextToken" + ], + "samples": { + "7": [ + "org::json::JSONObject::putOnce", + "org::json::JSONObject::toMap", + "org::json::XMLParserConfiguration::getXsiTypeMap", + "org::json::JSONTokener::more", + "org::json::JSONPointer::queryFrom", + "org::json::XMLParserConfiguration::withKeepBooleanAsString", + "org::json::JSONTokener::nextClean", + "org::json::JSONTokener::getJsonParserConfiguration", + "org::json::JSONArray::toList", + "org::json::JSONParserConfiguration::isOverwriteDuplicateKey", + "org::json::JSONTokener::nextValue", + "org::json::JSONObject::putOpt", + "org::json::XMLTokener::nextMeta", + "org::json::XML::noSpace", + "org::json::XMLParserConfiguration::isKeepNumberAsString", + "org::json::XMLParserConfiguration::withKeepNumberAsString", + "org::json::XML::Iterable$anon79::Iterator$anon82::hasNext", + "org::json::JSONTokener::nextString", + "org::json::JSONParserConfiguration::getMaxSharedKeys", + "org::json::JSONParserConfiguration::isUseNativeNulls" + ], + "8": [ + "org::json::JSONObject::putOpt", + "org::json::XMLParserConfiguration::getXsiTypeMap", + "org::json::ParserConfiguration::isKeepStrings", + "org::json::ParserConfiguration::getMaxNumberLength", + "org::json::JSONParserConfiguration::getMaxSharedKeys", + "org::json::XMLParserConfiguration::getForceList", + "org::json::XMLTokener::nextMeta", + "org::json::XML::noSpace", + "org::json::JSONPointer::queryFrom", + "org::json::JSONObject::numberToString", + "org::json::JSONObject::keys", + "org::json::JSONTokener::more", + "org::json::JSONObject::putOnce", + "org::json::ParserConfiguration::getMaxNestingDepth", + "org::json::JSONTokener::dehexchar", + "org::json::JSONParserConfiguration::isStrictMode", + "org::json::XML::Iterable$anon79::Iterator$anon82::hasNext", + "org::json::XMLParserConfiguration::isCloseEmptyTag", + "org::json::JSONObject::accumulate", + "org::json::JSONParserConfiguration::isOverwriteDuplicateKey" + ], + "9": [ + "org::json::XMLTokener::nextCDATA", + "org::json::JSONObject::numberToString", + "org::json::JSONTokener::nextString", + "org::json::XMLParserConfiguration::getXsiTypeMap", + "org::json::JSONParserConfiguration::isStrictMode", + "org::json::XMLParserConfiguration::isConvertNilAttributeToNull", + "org::json::XMLTokener::skipPast", + "org::json::XMLParserConfiguration::shouldTrimWhiteSpace", + "org::json::JSONParserConfiguration::isUseNativeNulls", + "org::json::JSONParserConfiguration::isOverwriteDuplicateKey", + "org::json::JSONTokener::back", + "org::json::JSONPointer::queryFrom", + "org::json::JSONArray::toList", + "org::json::XMLParserConfiguration::isKeepBooleanAsString", + "org::json::JSONObject::toMap", + "org::json::ParserConfiguration::isKeepStrings", + "org::json::XMLTokener::nextEntity", + "org::json::XMLParserConfiguration::isKeepNumberAsString", + "org::json::JSONTokener::nextValue", + "org::json::JSONParserConfiguration::getMaxSharedKeys" + ] + }, + "samples_common": { + "7": [ + "org::json::XML::Iterable$anon79::iterator", + "org::json::Cookie::escape", + "org::json::JSONArray::getJSONObject", + "org::json::JSONArray::similar", + "org::json::JSONObject::valueToString", + "org::json::JSONObject::isEmpty", + "org::json::JSONMLParserConfiguration::withKeepStrings", + "org::json::JSONObject::getBoolean", + "org::json::Cookie::unescape", + "org::json::JSONArray::remove", + "org::json::XMLTokener::nextToken", + "org::json::JSONArray::length", + "org::json::JSONArray::getString" + ], + "8": [ + "org::json::JSONArray::remove", + "org::json::XMLTokener::nextToken", + "org::json::JSONArray::getBoolean", + "org::json::JSONArray::getJSONObject", + "org::json::JSONArray::isEmpty", + "org::json::JSONObject::valueToString", + "org::json::JSONArray::similar", + "org::json::XML::Iterable$anon79::iterator", + "org::json::JSONMLParserConfiguration::withKeepStrings", + "org::json::JSONObject::length", + "org::json::Cookie::escape", + "org::json::Cookie::unescape", + "org::json::JSONArray::getString" + ], + "9": [ + "org::json::JSONObject::length", + "org::json::XMLParserConfiguration::withKeepStrings", + "org::json::JSONArray::isEmpty", + "org::json::JSONArray::similar", + "org::json::JSONObject::valueToString", + "org::json::XML::escape", + "org::json::JSONArray::getString", + "org::json::XML::Iterable$anon79::iterator", + "org::json::JSONArray::remove", + "org::json::JSONArray::getBoolean", + "org::json::Cookie::unescape", + "org::json::HTTPTokener::nextToken", + "org::json::JSONArray::getJSONObject" + ] + }, + "samples_blind": { + "7": [ + "org::json::JSONObject::putOnce", + "org::json::XMLParserConfiguration::withForceList", + "org::json::JSONObject::toMap", + "org::json::XMLParserConfiguration::getXsiTypeMap", + "org::json::JSONWriter::array", + "org::json::JSONTokener::more", + "org::json::JSONPointer::queryFrom", + "org::json::ParserConfiguration::withMaxNumberLength", + "org::json::XMLParserConfiguration::withKeepBooleanAsString", + "org::json::JSONTokener::nextClean", + "org::json::JSONArray::join", + "org::json::JSONTokener::getJsonParserConfiguration", + "org::json::JSONArray::toList", + "org::json::JSONParserConfiguration::isOverwriteDuplicateKey", + "org::json::JSONTokener::nextValue", + "org::json::JSONPointer::Builder::build", + "org::json::JSONObject::putOpt", + "org::json::XMLParserConfiguration::withCloseEmptyTag", + "org::json::XMLTokener::nextMeta", + "org::json::XML::noSpace" + ], + "8": [ + "org::json::JSONObject::putOpt", + "org::json::XMLParserConfiguration::getXsiTypeMap", + "org::json::ParserConfiguration::isKeepStrings", + "org::json::StringBuilderWriter::flush", + "org::json::ParserConfiguration::getMaxNumberLength", + "org::json::JSONParserConfiguration::getMaxSharedKeys", + "org::json::XMLParserConfiguration::getForceList", + "org::json::JSONPointer::toURIFragment", + "org::json::XMLTokener::nextMeta", + "org::json::XML::noSpace", + "org::json::JSONPointer::Builder::build", + "org::json::JSONArray::join", + "org::json::XMLParserConfiguration::withCloseEmptyTag", + "org::json::JSONPointer::queryFrom", + "org::json::JSONObject::numberToString", + "org::json::JSONObject::doubleToString", + "org::json::JSONObject::keys", + "org::json::ParserConfiguration::withMaxNumberLength", + "org::json::XMLParserConfiguration::withForceList", + "org::json::JSONTokener::more" + ], + "9": [ + "org::json::XMLTokener::nextCDATA", + "org::json::JSONObject::numberToString", + "org::json::JSONPointer::Builder::build", + "org::json::JSONTokener::nextString", + "org::json::XMLParserConfiguration::getXsiTypeMap", + "org::json::JSONParserConfiguration::isStrictMode", + "org::json::XMLParserConfiguration::isConvertNilAttributeToNull", + "org::json::JSONWriter::object", + "org::json::ParserConfiguration::withMaxNumberLength", + "org::json::XMLParserConfiguration::withcDataTagName", + "org::json::JSONParserConfiguration::withUseNativeNulls", + "org::json::XMLTokener::skipPast", + "org::json::XMLParserConfiguration::shouldTrimWhiteSpace", + "org::json::JSONParserConfiguration::isUseNativeNulls", + "org::json::JSONParserConfiguration::isOverwriteDuplicateKey", + "org::json::JSONTokener::back", + "org::json::XMLParserConfiguration::withShouldTrimWhitespace", + "org::json::JSONPointer::queryFrom", + "org::json::JSONArray::toList", + "org::json::Property::toProperties" + ] + }, + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "org::json::JSONObject::putOnce", + "truth": [ + "org::json::JSONObject::JSONObject" + ], + "found": [ + "org::json::JSONObject::JSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONObject::toMap", + "truth": [ + "org::json::JSONArray::toList" + ], + "found": [ + "org::json::JSONArray::toList" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::getXsiTypeMap", + "truth": [ + "org::json::XML::parse" + ], + "found": [ + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONTokener::more", + "truth": [ + "org::json::Cookie::toJSONObject", + "org::json::CookieList::toJSONObject", + "org::json::HTTP::toJSONObject", + "org::json::JSONML::parse", + "org::json::XML::toJSONObject", + "org::json::XMLTokener::nextCDATA" + ], + "found": [ + "org::json::Cookie::toJSONObject", + "org::json::CookieList::toJSONObject", + "org::json::HTTP::toJSONObject", + "org::json::JSONML::parse", + "org::json::XML::toJSONObject", + "org::json::XMLTokener::nextCDATA" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONPointer::queryFrom", + "truth": [ + "org::json::JSONArray::optQuery", + "org::json::JSONArray::query", + "org::json::JSONObject::optQuery", + "org::json::JSONObject::query" + ], + "found": [ + "org::json::JSONArray::optQuery", + "org::json::JSONArray::query", + "org::json::JSONObject::optQuery", + "org::json::JSONObject::query" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::withKeepBooleanAsString", + "truth": [ + "org::json::XML::toJSONObject" + ], + "found": [ + "org::json::XML::toJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONTokener::nextClean", + "truth": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONArray::checkForSyntaxError", + "org::json::JSONObject::JSONObject", + "org::json::JSONObject::parseEndOfKeyValuePair", + "org::json::JSONObject::parseJSONObject", + "org::json::JSONTokener::nextValue" + ], + "found": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONArray::checkForSyntaxError", + "org::json::JSONObject::JSONObject", + "org::json::JSONObject::parseEndOfKeyValuePair", + "org::json::JSONObject::parseJSONObject", + "org::json::JSONTokener::nextValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONTokener::getJsonParserConfiguration", + "truth": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONObject::JSONObject" + ], + "found": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONObject::JSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONArray::toList", + "truth": [ + "org::json::JSONObject::toMap" + ], + "found": [ + "org::json::JSONObject::toMap" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONParserConfiguration::isOverwriteDuplicateKey", + "truth": [ + "org::json::JSONObject::parseJSONObject" + ], + "found": [ + "org::json::JSONObject::parseJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONTokener::nextValue", + "truth": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONObject::parseJSONObject" + ], + "found": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONObject::parseJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONObject::putOpt", + "truth": [ + "org::json::JSONObject::JSONObject" + ], + "found": [ + "org::json::JSONObject::JSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLTokener::nextMeta", + "truth": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "found": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XML::noSpace", + "truth": [ + "org::json::JSONML::toString" + ], + "found": [ + "org::json::JSONML::toString" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::isKeepNumberAsString", + "truth": [ + "org::json::XML::parse" + ], + "found": [ + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::withKeepNumberAsString", + "truth": [ + "org::json::XML::toJSONObject" + ], + "found": [ + "org::json::XML::toJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XML::Iterable$anon79::Iterator$anon82::hasNext", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::JSONTokener::nextString", + "truth": [ + "org::json::JSONTokener::nextSimpleValue" + ], + "found": [ + "org::json::JSONTokener::nextSimpleValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONParserConfiguration::getMaxSharedKeys", + "truth": [ + "org::json::JSONObject::parseJSONObject" + ], + "found": [ + "org::json::JSONObject::parseJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONParserConfiguration::isUseNativeNulls", + "truth": [ + "org::json::JSONObject::JSONObject", + "org::json::JSONObject::processMethod" + ], + "found": [ + "org::json::JSONObject::JSONObject", + "org::json::JSONObject::processMethod" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::ParserConfiguration::isKeepStrings", + "truth": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "found": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::ParserConfiguration::getMaxNumberLength", + "truth": [ + "org::json::JSONObject::objectToBigInteger", + "org::json::JSONObject::stringToValue", + "org::json::XML::stringToValue" + ], + "found": [ + "org::json::JSONObject::objectToBigInteger", + "org::json::JSONObject::stringToValue", + "org::json::XML::stringToValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::getForceList", + "truth": [ + "org::json::XML::parse" + ], + "found": [ + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONObject::numberToString", + "truth": [ + "org::json::JSONObject::processNumberToWriteValue", + "org::json::JSONWriter::valueToString" + ], + "found": [ + "org::json::JSONObject::processNumberToWriteValue", + "org::json::JSONWriter::valueToString" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONObject::keys", + "truth": [ + "org::json::CDL::toJSONArray" + ], + "found": [ + "org::json::CDL::toJSONArray" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::ParserConfiguration::getMaxNestingDepth", + "truth": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONML::parse", + "org::json::JSONObject::JSONObject", + "org::json::XML::parse" + ], + "found": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONML::parse", + "org::json::JSONObject::JSONObject", + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONTokener::dehexchar", + "truth": [ + "org::json::Cookie::unescape" + ], + "found": [ + "org::json::Cookie::unescape" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONParserConfiguration::isStrictMode", + "truth": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONArray::checkForSyntaxError", + "org::json::JSONObject::checkKeyForStrictMode", + "org::json::JSONObject::parseEndOfKeyValuePair", + "org::json::JSONObject::parseJSONObject", + "org::json::JSONTokener::nextSimpleValue" + ], + "found": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONArray::checkForSyntaxError", + "org::json::JSONObject::checkKeyForStrictMode", + "org::json::JSONObject::parseEndOfKeyValuePair", + "org::json::JSONObject::parseJSONObject", + "org::json::JSONTokener::nextSimpleValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::isCloseEmptyTag", + "truth": [ + "org::json::XML::toString" + ], + "found": [ + "org::json::XML::toString" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONObject::accumulate", + "truth": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "found": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLTokener::nextCDATA", + "truth": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "found": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::isConvertNilAttributeToNull", + "truth": [ + "org::json::XML::parse" + ], + "found": [ + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLTokener::skipPast", + "truth": [ + "org::json::JSONML::parse", + "org::json::XML::parse", + "org::json::XML::toJSONObject" + ], + "found": [ + "org::json::JSONML::parse", + "org::json::XML::parse", + "org::json::XML::toJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::shouldTrimWhiteSpace", + "truth": [ + "org::json::XML::parse", + "org::json::XMLTokener::nextContent" + ], + "found": [ + "org::json::XML::parse", + "org::json::XMLTokener::nextContent" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONTokener::back", + "truth": [ + "org::json::CDL::getValue", + "org::json::JSONArray::JSONArray", + "org::json::JSONArray::checkForSyntaxError", + "org::json::JSONML::parse", + "org::json::JSONObject::parseEndOfKeyValuePair", + "org::json::JSONTokener::nextSimpleValue", + "org::json::JSONTokener::nextTo", + "org::json::JSONTokener::nextValue", + "org::json::JSONTokener::skipTo", + "org::json::XML::parse", + "org::json::XMLTokener::nextContent", + "org::json::XMLTokener::nextMeta", + "org::json::XMLTokener::nextToken" + ], + "found": [ + "org::json::CDL::getValue", + "org::json::JSONArray::JSONArray", + "org::json::JSONArray::checkForSyntaxError", + "org::json::JSONML::parse", + "org::json::JSONObject::parseEndOfKeyValuePair", + "org::json::JSONTokener::nextSimpleValue", + "org::json::JSONTokener::nextTo", + "org::json::JSONTokener::nextValue", + "org::json::JSONTokener::skipTo", + "org::json::XML::parse", + "org::json::XMLTokener::nextContent", + "org::json::XMLTokener::nextMeta", + "org::json::XMLTokener::nextToken" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::isKeepBooleanAsString", + "truth": [ + "org::json::XML::parse" + ], + "found": [ + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLTokener::nextEntity", + "truth": [ + "org::json::XMLTokener::nextContent", + "org::json::XMLTokener::nextToken" + ], + "found": [ + "org::json::XMLTokener::nextContent", + "org::json::XMLTokener::nextToken" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "callers_common": [ + { + "symbol": "org::json::XML::Iterable$anon79::iterator", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::Cookie::escape", + "truth": [ + "org::json::Cookie::toString", + "org::json::CookieList::toString" + ], + "found": [ + "org::json::Cookie::toString", + "org::json::CookieList::toString" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONArray::getJSONObject", + "truth": [ + "org::json::CDL::toJSONArray" + ], + "found": [ + "org::json::CDL::toJSONArray" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONArray::similar", + "truth": [ + "org::json::JSONArray::isSimilar", + "org::json::JSONObject::checkObjectType" + ], + "found": [ + "org::json::JSONArray::isSimilar", + "org::json::JSONObject::checkObjectType" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONObject::valueToString", + "truth": [ + "org::json::JSONArray::join" + ], + "found": [ + "org::json::JSONArray::join" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONObject::isEmpty", + "truth": [ + "org::json::JSONObject::getNames", + "org::json::XML::parse" + ], + "found": [ + "org::json::JSONObject::getNames", + "org::json::XML::parse" + ], + "maybe": [ + "org::json::CDL::shouldQuoteValue", + "org::json::JSONObject::annotationValueNotEmpty", + "org::json::JSONObject::getKeyNameFromMethod", + "org::json::JSONObject::isRecordStyleAccessor", + "org::json::JSONObject::names", + "org::json::JSONObject::populateMap", + "org::json::JSONObject::quote", + "org::json::JSONPointer::JSONPointer", + "org::json::JSONPointer::queryFrom", + "org::json::XMLTokener::isValidDecimal", + "org::json::XMLTokener::isValidHex", + "org::json::XMLTokener::unescapeEntity" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONMLParserConfiguration::withKeepStrings", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::JSONObject::getBoolean", + "truth": [ + "org::json::JSONObject::optBoolean", + "org::json::JSONObject::optBooleanObject" + ], + "found": [ + "org::json::JSONObject::optBoolean", + "org::json::JSONObject::optBooleanObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::Cookie::unescape", + "truth": [ + "org::json::Cookie::toJSONObject", + "org::json::CookieList::toJSONObject" + ], + "found": [ + "org::json::Cookie::toJSONObject", + "org::json::CookieList::toJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONArray::remove", + "truth": [ + "org::json::XML::removeEmpty" + ], + "found": [ + "org::json::XML::removeEmpty" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLTokener::nextToken", + "truth": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "found": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONArray::length", + "truth": [ + "org::json::CDL::rowToJSONArray", + "org::json::CDL::rowToString", + "org::json::CDL::toJSONArray", + "org::json::CDL::toString", + "org::json::JSONArray::join", + "org::json::JSONArray::opt", + "org::json::JSONArray::put", + "org::json::JSONArray::remove", + "org::json::JSONArray::similar", + "org::json::JSONArray::toJSONObject", + "org::json::JSONArray::write", + "org::json::JSONML::parse", + "org::json::JSONML::toString", + "org::json::JSONObject::fromJsonArray", + "org::json::JSONObject::toJSONArray", + "org::json::JSONPointer::readByIndexToken", + "org::json::XML::removeEmpty", + "org::json::XML::toString" + ], + "found": [ + "org::json::CDL::rowToJSONArray", + "org::json::CDL::rowToString", + "org::json::CDL::toJSONArray", + "org::json::CDL::toString", + "org::json::JSONArray::join", + "org::json::JSONArray::opt", + "org::json::JSONArray::put", + "org::json::JSONArray::remove", + "org::json::JSONArray::similar", + "org::json::JSONArray::toJSONObject", + "org::json::JSONArray::write", + "org::json::JSONML::parse", + "org::json::JSONML::toString", + "org::json::JSONObject::fromJsonArray", + "org::json::JSONObject::toJSONArray", + "org::json::JSONPointer::readByIndexToken", + "org::json::XML::removeEmpty", + "org::json::XML::toString" + ], + "maybe": [ + "org::json", + "org::json::CDL::appendQuotedValue", + "org::json::Cookie::escape", + "org::json::Cookie::unescape", + "org::json::JSONObject::checkForInvalidNumberFormat", + "org::json::JSONObject::doubleToString", + "org::json::JSONObject::getKeyNameFromMethod", + "org::json::JSONObject::numberToString", + "org::json::JSONObject::quote", + "org::json::JSONObject::stringToValue", + "org::json::JSONObject::writeAsHex", + "org::json::JSONPointer::JSONPointer", + "org::json::XML::escape", + "org::json::XML::isStringAllWhiteSpace", + "org::json::XML::noSpace", + "org::json::XML::noXmlMetachars", + "org::json::XML::parse", + "org::json::XML::stringToNumber", + "org::json::XML::stringToValue", + "org::json::XML::unescape", + "org::json::XMLTokener::isValidDecimal", + "org::json::XMLTokener::isValidHex", + "org::json::XMLTokener::parseHexEntity", + "org::json::XMLTokener::skipPast", + "org::json::XMLTokener::unescapeEntity" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONArray::getString", + "truth": [ + "org::json::JSONArray::toJSONObject", + "org::json::JSONML::toString", + "org::json::JSONObject::toJSONArray" + ], + "found": [ + "org::json::JSONArray::toJSONObject", + "org::json::JSONML::toString", + "org::json::JSONObject::toJSONArray" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONArray::getBoolean", + "truth": [ + "org::json::JSONArray::optBoolean", + "org::json::JSONArray::optBooleanObject" + ], + "found": [ + "org::json::JSONArray::optBoolean", + "org::json::JSONArray::optBooleanObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONArray::isEmpty", + "truth": [ + "org::json::JSONArray::toJSONObject", + "org::json::JSONObject::toJSONArray", + "org::json::XML::removeEmpty" + ], + "found": [ + "org::json::JSONArray::toJSONObject", + "org::json::JSONObject::toJSONArray", + "org::json::XML::removeEmpty" + ], + "maybe": [ + "org::json::CDL::shouldQuoteValue", + "org::json::JSONObject::annotationValueNotEmpty", + "org::json::JSONObject::getKeyNameFromMethod", + "org::json::JSONObject::isEmpty", + "org::json::JSONObject::isRecordStyleAccessor", + "org::json::JSONObject::names", + "org::json::JSONObject::populateMap", + "org::json::JSONObject::quote", + "org::json::JSONPointer::JSONPointer", + "org::json::JSONPointer::queryFrom", + "org::json::XML::parse", + "org::json::XMLTokener::isValidDecimal", + "org::json::XMLTokener::isValidHex", + "org::json::XMLTokener::unescapeEntity" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONObject::length", + "truth": [ + "org::json::CDL::toJSONArray", + "org::json::JSONML::parse", + "org::json::JSONObject::getNames", + "org::json::JSONObject::write", + "org::json::XML::parse" + ], + "found": [ + "org::json::CDL::toJSONArray", + "org::json::JSONML::parse", + "org::json::JSONObject::getNames", + "org::json::JSONObject::write", + "org::json::XML::parse" + ], + "maybe": [ + "org::json", + "org::json::CDL::appendQuotedValue", + "org::json::Cookie::escape", + "org::json::Cookie::unescape", + "org::json::JSONObject::checkForInvalidNumberFormat", + "org::json::JSONObject::doubleToString", + "org::json::JSONObject::getKeyNameFromMethod", + "org::json::JSONObject::numberToString", + "org::json::JSONObject::quote", + "org::json::JSONObject::stringToValue", + "org::json::JSONObject::writeAsHex", + "org::json::JSONPointer::JSONPointer", + "org::json::XML::escape", + "org::json::XML::isStringAllWhiteSpace", + "org::json::XML::noSpace", + "org::json::XML::noXmlMetachars", + "org::json::XML::stringToNumber", + "org::json::XML::stringToValue", + "org::json::XML::toString", + "org::json::XML::unescape", + "org::json::XMLTokener::isValidDecimal", + "org::json::XMLTokener::isValidHex", + "org::json::XMLTokener::parseHexEntity", + "org::json::XMLTokener::skipPast", + "org::json::XMLTokener::unescapeEntity" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::withKeepStrings", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::XML::escape", + "truth": [ + "org::json::JSONML::toString", + "org::json::XML::toString" + ], + "found": [ + "org::json::JSONML::toString", + "org::json::XML::toString" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::HTTPTokener::nextToken", + "truth": [ + "org::json::HTTP::toJSONObject" + ], + "found": [ + "org::json::HTTP::toJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "callers_blind": [ + { + "symbol": "org::json::JSONObject::putOnce", + "truth": [ + "org::json::JSONObject::JSONObject" + ], + "found": [ + "org::json::JSONObject::JSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::withForceList", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::JSONObject::toMap", + "truth": [ + "org::json::JSONArray::toList" + ], + "found": [ + "org::json::JSONArray::toList" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::getXsiTypeMap", + "truth": [ + "org::json::XML::parse" + ], + "found": [ + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONWriter::array", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::JSONTokener::more", + "truth": [ + "org::json::Cookie::toJSONObject", + "org::json::CookieList::toJSONObject", + "org::json::HTTP::toJSONObject", + "org::json::JSONML::parse", + "org::json::XML::toJSONObject", + "org::json::XMLTokener::nextCDATA" + ], + "found": [ + "org::json::Cookie::toJSONObject", + "org::json::CookieList::toJSONObject", + "org::json::HTTP::toJSONObject", + "org::json::JSONML::parse", + "org::json::XML::toJSONObject", + "org::json::XMLTokener::nextCDATA" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONPointer::queryFrom", + "truth": [ + "org::json::JSONArray::optQuery", + "org::json::JSONArray::query", + "org::json::JSONObject::optQuery", + "org::json::JSONObject::query" + ], + "found": [ + "org::json::JSONArray::optQuery", + "org::json::JSONArray::query", + "org::json::JSONObject::optQuery", + "org::json::JSONObject::query" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::ParserConfiguration::withMaxNumberLength", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::XMLParserConfiguration::withKeepBooleanAsString", + "truth": [ + "org::json::XML::toJSONObject" + ], + "found": [ + "org::json::XML::toJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONTokener::nextClean", + "truth": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONArray::checkForSyntaxError", + "org::json::JSONObject::JSONObject", + "org::json::JSONObject::parseEndOfKeyValuePair", + "org::json::JSONObject::parseJSONObject", + "org::json::JSONTokener::nextValue" + ], + "found": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONArray::checkForSyntaxError", + "org::json::JSONObject::JSONObject", + "org::json::JSONObject::parseEndOfKeyValuePair", + "org::json::JSONObject::parseJSONObject", + "org::json::JSONTokener::nextValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONArray::join", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::JSONTokener::getJsonParserConfiguration", + "truth": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONObject::JSONObject" + ], + "found": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONObject::JSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONArray::toList", + "truth": [ + "org::json::JSONObject::toMap" + ], + "found": [ + "org::json::JSONObject::toMap" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONParserConfiguration::isOverwriteDuplicateKey", + "truth": [ + "org::json::JSONObject::parseJSONObject" + ], + "found": [ + "org::json::JSONObject::parseJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONTokener::nextValue", + "truth": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONObject::parseJSONObject" + ], + "found": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONObject::parseJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONPointer::Builder::build", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::JSONObject::putOpt", + "truth": [ + "org::json::JSONObject::JSONObject" + ], + "found": [ + "org::json::JSONObject::JSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::withCloseEmptyTag", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::XMLTokener::nextMeta", + "truth": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "found": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XML::noSpace", + "truth": [ + "org::json::JSONML::toString" + ], + "found": [ + "org::json::JSONML::toString" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::ParserConfiguration::isKeepStrings", + "truth": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "found": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::StringBuilderWriter::flush", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::ParserConfiguration::getMaxNumberLength", + "truth": [ + "org::json::JSONObject::objectToBigInteger", + "org::json::JSONObject::stringToValue", + "org::json::XML::stringToValue" + ], + "found": [ + "org::json::JSONObject::objectToBigInteger", + "org::json::JSONObject::stringToValue", + "org::json::XML::stringToValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONParserConfiguration::getMaxSharedKeys", + "truth": [ + "org::json::JSONObject::parseJSONObject" + ], + "found": [ + "org::json::JSONObject::parseJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::getForceList", + "truth": [ + "org::json::XML::parse" + ], + "found": [ + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONPointer::toURIFragment", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::JSONObject::numberToString", + "truth": [ + "org::json::JSONObject::processNumberToWriteValue", + "org::json::JSONWriter::valueToString" + ], + "found": [ + "org::json::JSONObject::processNumberToWriteValue", + "org::json::JSONWriter::valueToString" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONObject::doubleToString", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::JSONObject::keys", + "truth": [ + "org::json::CDL::toJSONArray" + ], + "found": [ + "org::json::CDL::toJSONArray" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLTokener::nextCDATA", + "truth": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "found": [ + "org::json::JSONML::parse", + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONTokener::nextString", + "truth": [ + "org::json::JSONTokener::nextSimpleValue" + ], + "found": [ + "org::json::JSONTokener::nextSimpleValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONParserConfiguration::isStrictMode", + "truth": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONArray::checkForSyntaxError", + "org::json::JSONObject::checkKeyForStrictMode", + "org::json::JSONObject::parseEndOfKeyValuePair", + "org::json::JSONObject::parseJSONObject", + "org::json::JSONTokener::nextSimpleValue" + ], + "found": [ + "org::json::JSONArray::JSONArray", + "org::json::JSONArray::checkForSyntaxError", + "org::json::JSONObject::checkKeyForStrictMode", + "org::json::JSONObject::parseEndOfKeyValuePair", + "org::json::JSONObject::parseJSONObject", + "org::json::JSONTokener::nextSimpleValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::isConvertNilAttributeToNull", + "truth": [ + "org::json::XML::parse" + ], + "found": [ + "org::json::XML::parse" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONWriter::object", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::XMLParserConfiguration::withcDataTagName", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::JSONParserConfiguration::withUseNativeNulls", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::XMLTokener::skipPast", + "truth": [ + "org::json::JSONML::parse", + "org::json::XML::parse", + "org::json::XML::toJSONObject" + ], + "found": [ + "org::json::JSONML::parse", + "org::json::XML::parse", + "org::json::XML::toJSONObject" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::shouldTrimWhiteSpace", + "truth": [ + "org::json::XML::parse", + "org::json::XMLTokener::nextContent" + ], + "found": [ + "org::json::XML::parse", + "org::json::XMLTokener::nextContent" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONParserConfiguration::isUseNativeNulls", + "truth": [ + "org::json::JSONObject::JSONObject", + "org::json::JSONObject::processMethod" + ], + "found": [ + "org::json::JSONObject::JSONObject", + "org::json::JSONObject::processMethod" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::JSONTokener::back", + "truth": [ + "org::json::CDL::getValue", + "org::json::JSONArray::JSONArray", + "org::json::JSONArray::checkForSyntaxError", + "org::json::JSONML::parse", + "org::json::JSONObject::parseEndOfKeyValuePair", + "org::json::JSONTokener::nextSimpleValue", + "org::json::JSONTokener::nextTo", + "org::json::JSONTokener::nextValue", + "org::json::JSONTokener::skipTo", + "org::json::XML::parse", + "org::json::XMLTokener::nextContent", + "org::json::XMLTokener::nextMeta", + "org::json::XMLTokener::nextToken" + ], + "found": [ + "org::json::CDL::getValue", + "org::json::JSONArray::JSONArray", + "org::json::JSONArray::checkForSyntaxError", + "org::json::JSONML::parse", + "org::json::JSONObject::parseEndOfKeyValuePair", + "org::json::JSONTokener::nextSimpleValue", + "org::json::JSONTokener::nextTo", + "org::json::JSONTokener::nextValue", + "org::json::JSONTokener::skipTo", + "org::json::XML::parse", + "org::json::XMLTokener::nextContent", + "org::json::XMLTokener::nextMeta", + "org::json::XMLTokener::nextToken" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::withShouldTrimWhitespace", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::json::Property::toProperties", + "skipped": "compiler reported no uses" + } + ], + "rename": [ + { + "symbol": "org::json::JSONObject::putOnce", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONObject::toMap", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/test/java/org/json/junit/JSONObjectTest.java:3023:\tpublic void toMap() {", + "detail": "" + }, + { + "symbol": "org::json::XMLParserConfiguration::getXsiTypeMap", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONTokener::more", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": ".github/workflows/pipeline.yml:2:# For more information see: https://docs.github.com/en/actions/learn-github-actions or https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions\nsrc/main/java/org/json/CDL.java:14: * ends with a NEWLINE character. Each row contains one or ", + "detail": "" + }, + { + "symbol": "org::json::JSONPointer::queryFrom", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XMLParserConfiguration::withKeepBooleanAsString", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONTokener::nextClean", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONTokener::getJsonParserConfiguration", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONArray::toList", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/test/java/org/json/junit/JSONArrayTest.java:1231: public void toList() {", + "detail": "" + }, + { + "symbol": "org::json::JSONParserConfiguration::isOverwriteDuplicateKey", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONTokener::nextValue", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/test/java/org/json/junit/JSONTokenerTest.java:121: Object result = nextValue(testStr);\nsrc/test/java/org/json/junit/JSONTokenerTest.java:143: nextValue(testStr);\nsrc/test/java/org/json/junit/JSONTokenerTest.java:159: private Object nextValue(String testStr) throws JSONExcept", + "detail": "" + }, + { + "symbol": "org::json::JSONObject::putOpt", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XMLTokener::nextMeta", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XML::noSpace", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XMLParserConfiguration::isKeepNumberAsString", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XMLParserConfiguration::withKeepNumberAsString", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XML::Iterable$anon79::Iterator$anon82::hasNext", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/test/java/org/json/junit/JSONArrayTest.java:1081: assertTrue(\"should be at end of array\", !it.hasNext());\nsrc/test/java/org/json/junit/Util.java:48: while (keys.hasNext()) {\nsrc/test/java/org/json/junit/Util.java:179: while (it.hasNext()) {", + "detail": "json-java/src/main/java/org/json/XML.java:[86,21] method does not override or implement a method from a supertype\n[ERROR] -> [Help 1]\n[ERROR] \n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\n[ERROR] \n[ERROR] For more information about the errors and possible solutions, please read the following articles:\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException\n" + }, + { + "symbol": "org::json::JSONTokener::nextString", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONParserConfiguration::getMaxSharedKeys", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONParserConfiguration::isUseNativeNulls", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::ParserConfiguration::isKeepStrings", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::ParserConfiguration::getMaxNumberLength", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XMLParserConfiguration::getForceList", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONObject::numberToString", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONObject::keys", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/main/java/org/json/CDL.java:359: // The following block accounts for empty datasets (no keys or vals)\nsrc/main/java/org/json/Cookie.java:67: * a JSONObject. All attribute names are converted to lower case keys in the\nsrc/main/java/org/json/JSONObject.java:174: * strings is used to", + "detail": "" + }, + { + "symbol": "org::json::ParserConfiguration::getMaxNestingDepth", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONTokener::dehexchar", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONParserConfiguration::isStrictMode", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XMLParserConfiguration::isCloseEmptyTag", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::JSONObject::accumulate", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XMLTokener::nextCDATA", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XMLParserConfiguration::isConvertNilAttributeToNull", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XMLTokener::skipPast", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XMLParserConfiguration::shouldTrimWhiteSpace", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/main/java/org/json/XMLParserConfiguration.java:81: private boolean shouldTrimWhiteSpace;\nsrc/main/java/org/json/XMLParserConfiguration.java:93: this.shouldTrimWhiteSpace = true;\nsrc/main/java/org/json/XMLParserConfiguration.java:210: config.shouldTrimWhiteSpace = this.shouldTrim", + "detail": "" + }, + { + "symbol": "org::json::JSONTokener::back", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "build.gradle:103: // Write the modified content back to the file\nsrc/main/java/org/json/Cookie.java:10: * Convert a web browser cookie specification to a JSONObject and back.\nsrc/main/java/org/json/CookieList.java:8: * Convert a web browser cookie list string to a JSONObject and back.\nsrc/mai", + "detail": "" + }, + { + "symbol": "org::json::XMLParserConfiguration::isKeepBooleanAsString", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::json::XMLTokener::nextEntity", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + } + ], + "mutants": { + "7": [ + "org::json::JSONObject::putOnce", + "org::json::JSONObject::toMap", + "org::json::XMLParserConfiguration::getXsiTypeMap", + "org::json::JSONTokener::more", + "org::json::JSONPointer::queryFrom", + "org::json::XMLParserConfiguration::withKeepBooleanAsString", + "org::json::JSONTokener::nextClean", + "org::json::JSONTokener::getJsonParserConfiguration" + ], + "8": [ + "org::json::JSONObject::putOpt", + "org::json::XMLParserConfiguration::getXsiTypeMap", + "org::json::ParserConfiguration::isKeepStrings", + "org::json::ParserConfiguration::getMaxNumberLength", + "org::json::JSONParserConfiguration::getMaxSharedKeys", + "org::json::XMLParserConfiguration::getForceList", + "org::json::XMLTokener::nextMeta", + "org::json::XML::noSpace" + ], + "9": [ + "org::json::XMLTokener::nextCDATA", + "org::json::JSONObject::numberToString", + "org::json::JSONTokener::nextString", + "org::json::XMLParserConfiguration::getXsiTypeMap", + "org::json::JSONParserConfiguration::isStrictMode", + "org::json::XMLParserConfiguration::isConvertNilAttributeToNull", + "org::json::XMLTokener::skipPast", + "org::json::XMLParserConfiguration::shouldTrimWhiteSpace" + ] + }, + "tests": [ + { + "symbol": "org::json::JSONObject::putOnce", + "level": "name", + "truth": 5, + "predicted": 173, + "recall": 1.0, + "precision": 0.028901734104046242, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "top_best": 0.5, + "caught": 1.0, + "missed": [], + "recall_graph_only": 0.8 + }, + { + "symbol": "org::json::JSONObject::toMap", + "level": "name", + "truth": 2, + "predicted": 172, + "recall": 1.0, + "precision": 0.011627906976744186, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "top_best": 0.2, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::getXsiTypeMap", + "level": "name", + "truth": 22, + "predicted": 79, + "recall": 1.0, + "precision": 0.27848101265822783, + "top_hits": 6, + "top_n": 10, + "top_precision": 0.6, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::json::JSONTokener::more", + "level": "name", + "truth": 136, + "predicted": 144, + "recall": 1.0, + "precision": 0.9444444444444444, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::json::JSONPointer::queryFrom", + "level": "name", + "truth": 70, + "predicted": 71, + "recall": 1.0, + "precision": 0.9859154929577465, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::withKeepBooleanAsString", + "level": "name", + "truth": 2, + "predicted": 79, + "recall": 1.0, + "precision": 0.02531645569620253, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "top_best": 0.2, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::json::JSONTokener::nextClean", + "level": "name", + "truth": 271, + "predicted": 6, + "recall": 0.02214022140221402, + "precision": 1.0, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestLenientCommas", + "allowNullArrayInStrictMode", + "allowNullObjectInStrictMode", + "arrayConstructorAppliesExplicitStrictModeToValues", + "arrayConstructorRestoresTokenerConfiguration", + "arrayIndexFailure", + "arrayIndexQuery", + "backslashHandling" + ], + "recall_graph_only": 0.02214022140221402 + }, + { + "symbol": "org::json::JSONTokener::getJsonParserConfiguration", + "level": "name", + "truth": 271, + "predicted": 5, + "recall": 0.01845018450184502, + "precision": 1.0, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestLenientCommas", + "allowNullArrayInStrictMode", + "allowNullObjectInStrictMode", + "arrayIndexFailure", + "arrayIndexQuery", + "backslashHandling", + "builderPreservesLiteralTokens", + "builderTest" + ], + "recall_graph_only": 0.01845018450184502 + }, + { + "symbol": "org::json::JSONObject::putOpt", + "level": "name", + "truth": 3, + "predicted": 172, + "recall": 0.6666666666666666, + "precision": 0.011627906976744186, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "top_best": 0.2, + "caught": 1.0, + "missed": [ + "jsonObjectFromEnumWithNames" + ], + "recall_graph_only": 0.3333333333333333 + }, + { + "symbol": "org::json::ParserConfiguration::isKeepStrings", + "level": "name", + "truth": 34, + "predicted": 119, + "recall": 1.0, + "precision": 0.2857142857142857, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::json::ParserConfiguration::getMaxNumberLength", + "level": "name", + "truth": 82, + "predicted": 138, + "recall": 0.32926829268292684, + "precision": 0.1956521739130435, + "top_hits": 7, + "top_n": 10, + "top_precision": 0.7, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestLenientCommas", + "backslashHandling", + "complexObjectString", + "failedGetArrayValues", + "givenCompliantJSONArrayFile_testStrictModeTrue_shouldNotThrowAnyException", + "givenCompliantJSONObjectFile_testStrictModeTrue_shouldNotThrowAnyException", + "givenInvalidInputArray_testStrictModeTrue_shouldThrowInvalidCharacterErrorMessage", + "givenInvalidInputObject_testStrictModeTrue_shouldThrowInvalidCharacterErrorMessage" + ], + "recall_graph_only": 0.32926829268292684 + }, + { + "symbol": "org::json::JSONParserConfiguration::getMaxSharedKeys", + "level": "name", + "truth": 224, + "predicted": 60, + "recall": 0.16517857142857142, + "precision": 0.6166666666666667, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "arrayIndexFailure", + "arrayIndexQuery", + "backslashHandling", + "builderPreservesLiteralTokens", + "builderTest", + "clarifyCurrentBehavior", + "complexObjectString", + "contentOperations" + ], + "recall_graph_only": 0.004464285714285714 + }, + { + "symbol": "org::json::XMLParserConfiguration::getForceList", + "level": "name", + "truth": 64, + "predicted": 78, + "recall": 1.0, + "precision": 0.8205128205128205, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::json::XMLTokener::nextMeta", + "level": "name", + "truth": 6, + "predicted": 117, + "recall": 1.0, + "precision": 0.05128205128205128, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "top_best": 0.6, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::json::XML::noSpace", + "level": "name", + "truth": 12, + "predicted": 14, + "recall": 1.0, + "precision": 0.8571428571428571, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::json::XMLTokener::nextCDATA", + "level": "name", + "truth": 5, + "predicted": 118, + "recall": 1.0, + "precision": 0.0423728813559322, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "top_best": 0.5, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::json::JSONObject::numberToString", + "level": "name", + "truth": 46, + "predicted": 16, + "recall": 0.1956521739130435, + "precision": 0.5625, + "top_hits": 5, + "top_n": 10, + "top_precision": 0.5, + "top_best": 0.9, + "caught": 1.0, + "missed": [ + "TestLenientCommas", + "enumToString", + "jsonArrayToStringIndent", + "jsonObjectAccumulate", + "jsonObjectAppend", + "jsonObjectByBean1", + "jsonObjectByMap", + "jsonObjectByMapWithNullValue" + ], + "recall_graph_only": 0.1956521739130435 + }, + { + "symbol": "org::json::JSONTokener::nextString", + "level": "name", + "truth": 235, + "predicted": 5, + "recall": 0.02127659574468085, + "precision": 1.0, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "allowNullObjectInStrictMode", + "arrayConstructorAppliesExplicitStrictModeToValues", + "arrayConstructorRestoresTokenerConfiguration", + "arrayIndexFailure", + "arrayIndexQuery", + "backslashHandling", + "builderPreservesLiteralTokens", + "builderTest" + ], + "recall_graph_only": 0.02127659574468085 + }, + { + "symbol": "org::json::JSONParserConfiguration::isStrictMode", + "level": "name", + "truth": 268, + "predicted": 14, + "recall": 0.05223880597014925, + "precision": 1.0, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "allowNullArrayInStrictMode", + "allowNullObjectInStrictMode", + "arrayConstructorAppliesExplicitStrictModeToValues", + "arrayConstructorRestoresTokenerConfiguration", + "arrayIndexFailure", + "arrayIndexQuery", + "backslashHandling", + "builderPreservesLiteralTokens" + ], + "recall_graph_only": 0.05223880597014925 + }, + { + "symbol": "org::json::XMLParserConfiguration::isConvertNilAttributeToNull", + "level": "name", + "truth": 22, + "predicted": 78, + "recall": 1.0, + "precision": 0.28205128205128205, + "top_hits": 5, + "top_n": 10, + "top_precision": 0.5, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::json::XMLTokener::skipPast", + "level": "name", + "truth": 88, + "predicted": 119, + "recall": 1.0, + "precision": 0.7394957983193278, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "org::json::XMLParserConfiguration::shouldTrimWhiteSpace", + "level": "name", + "truth": 93, + "predicted": 119, + "recall": 1.0, + "precision": 0.7815126050420168, + "top_hits": 6, + "top_n": 10, + "top_precision": 0.6, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + } + ], + "look": [ + { + "symbol": "org::json::JSONObject::putOnce", + "look_tokens": 366, + "file_tokens": 34912 + }, + { + "symbol": "org::json::JSONObject::toMap", + "look_tokens": 491, + "file_tokens": 34912 + }, + { + "symbol": "org::json::XMLParserConfiguration::getXsiTypeMap", + "look_tokens": 477, + "file_tokens": 4976 + }, + { + "symbol": "org::json::JSONTokener::more", + "look_tokens": 472, + "file_tokens": 5435 + }, + { + "symbol": "org::json::JSONPointer::queryFrom", + "look_tokens": 576, + "file_tokens": 2761 + }, + { + "symbol": "org::json::XMLParserConfiguration::withKeepBooleanAsString", + "look_tokens": 424, + "file_tokens": 4976 + }, + { + "symbol": "org::json::JSONTokener::nextClean", + "look_tokens": 464, + "file_tokens": 5435 + }, + { + "symbol": "org::json::JSONTokener::getJsonParserConfiguration", + "look_tokens": 330, + "file_tokens": 5435 + }, + { + "symbol": "org::json::JSONArray::toList", + "look_tokens": 449, + "file_tokens": 18545 + }, + { + "symbol": "org::json::JSONParserConfiguration::isOverwriteDuplicateKey", + "look_tokens": 302, + "file_tokens": 2024 + }, + { + "symbol": "org::json::JSONTokener::nextValue", + "look_tokens": 517, + "file_tokens": 5435 + }, + { + "symbol": "org::json::JSONObject::putOpt", + "look_tokens": 348, + "file_tokens": 34912 + }, + { + "symbol": "org::json::XMLTokener::nextMeta", + "look_tokens": 671, + "file_tokens": 3760 + }, + { + "symbol": "org::json::XML::noSpace", + "look_tokens": 360, + "file_tokens": 12830 + }, + { + "symbol": "org::json::XMLParserConfiguration::isKeepNumberAsString", + "look_tokens": 356, + "file_tokens": 4976 + }, + { + "symbol": "org::json::XMLParserConfiguration::withKeepNumberAsString", + "look_tokens": 428, + "file_tokens": 4976 + }, + { + "symbol": "org::json::XML::Iterable$anon79::Iterator$anon82::hasNext", + "look_tokens": 213, + "file_tokens": 12830 + }, + { + "symbol": "org::json::JSONTokener::nextString", + "look_tokens": 838, + "file_tokens": 5435 + }, + { + "symbol": "org::json::JSONParserConfiguration::getMaxSharedKeys", + "look_tokens": 262, + "file_tokens": 2024 + }, + { + "symbol": "org::json::JSONParserConfiguration::isUseNativeNulls", + "look_tokens": 321, + "file_tokens": 2024 + }, + { + "symbol": "org::json::ParserConfiguration::isKeepStrings", + "look_tokens": 490, + "file_tokens": 1691 + }, + { + "symbol": "org::json::ParserConfiguration::getMaxNumberLength", + "look_tokens": 347, + "file_tokens": 1691 + }, + { + "symbol": "org::json::XMLParserConfiguration::getForceList", + "look_tokens": 269, + "file_tokens": 4976 + }, + { + "symbol": "org::json::JSONObject::numberToString", + "look_tokens": 568, + "file_tokens": 34912 + }, + { + "symbol": "org::json::JSONObject::keys", + "look_tokens": 222, + "file_tokens": 34912 + }, + { + "symbol": "org::json::ParserConfiguration::getMaxNestingDepth", + "look_tokens": 395, + "file_tokens": 1691 + }, + { + "symbol": "org::json::JSONTokener::dehexchar", + "look_tokens": 316, + "file_tokens": 5435 + }, + { + "symbol": "org::json::JSONParserConfiguration::isStrictMode", + "look_tokens": 477, + "file_tokens": 2024 + }, + { + "symbol": "org::json::XMLParserConfiguration::isCloseEmptyTag", + "look_tokens": 361, + "file_tokens": 4976 + }, + { + "symbol": "org::json::JSONObject::accumulate", + "look_tokens": 597, + "file_tokens": 34912 + }, + { + "symbol": "org::json::XMLTokener::nextCDATA", + "look_tokens": 421, + "file_tokens": 3760 + }, + { + "symbol": "org::json::XMLParserConfiguration::isConvertNilAttributeToNull", + "look_tokens": 471, + "file_tokens": 4976 + }, + { + "symbol": "org::json::XMLTokener::skipPast", + "look_tokens": 773, + "file_tokens": 3760 + }, + { + "symbol": "org::json::XMLParserConfiguration::shouldTrimWhiteSpace", + "look_tokens": 383, + "file_tokens": 4976 + }, + { + "symbol": "org::json::JSONTokener::back", + "look_tokens": 657, + "file_tokens": 5435 + }, + { + "symbol": "org::json::XMLParserConfiguration::isKeepBooleanAsString", + "look_tokens": 362, + "file_tokens": 4976 + }, + { + "symbol": "org::json::XMLTokener::nextEntity", + "look_tokens": 495, + "file_tokens": 3760 + } + ], + "seconds": 21, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 36, + "blind_recall": 1.0, + "blind_checked": 28, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 16, + "rename_ok": 0.973, + "rename_checked": 37, + "tests_recall": 0.703, + "tests_precision": 0.524, + "tests_top10_precision": 0.655, + "tests_top10_best": 0.823, + "tests_caught": 1.0, + "tests_checked": 22, + "look_vs_file": 0.101 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 14, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 11, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.755, + "tests_precision": 0.534, + "tests_top10_precision": 0.65, + "tests_top10_best": 0.738, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.087 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 12, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 11, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.77, + "tests_precision": 0.39, + "tests_top10_precision": 0.65, + "tests_top10_best": 0.85, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.105 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 13, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 11, + "rename_ok": 1.0, + "rename_checked": 20, + "tests_recall": 0.659, + "tests_precision": 0.586, + "tests_top10_precision": 0.65, + "tests_top10_best": 0.925, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.123 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 36, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 1.0, + "functions": 36, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 1.0, + "functions": 28, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_recall": { + "mean": 1.0, + "functions": 16, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.07 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 16, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.07 + }, + "common_precision": { + "mean": 1.0, + "functions": 16, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.07 + }, + "rename_ok": { + "mean": 0.973, + "functions": 37, + "boot_lo": 0.919, + "boot_hi": 1.0, + "boot_half": 0.041, + "seeds": [ + 0.95, + 0.95, + 1.0 + ], + "seed_sd": 0.029, + "threshold": 0.05 + }, + "tests_recall": { + "mean": 0.703, + "functions": 22, + "boot_lo": 0.554, + "boot_hi": 0.843, + "boot_half": 0.145, + "seeds": [ + 0.755, + 0.77, + 0.659 + ], + "seed_sd": 0.06, + "threshold": 0.15 + }, + "tests_precision": { + "mean": 0.524, + "functions": 22, + "boot_lo": 0.381, + "boot_hi": 0.659, + "boot_half": 0.139, + "seeds": [ + 0.534, + 0.39, + 0.586 + ], + "seed_sd": 0.102, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.655, + "functions": 22, + "boot_lo": 0.541, + "boot_hi": 0.759, + "boot_half": 0.109, + "seeds": [ + 0.65, + 0.65, + 0.65 + ], + "seed_sd": 0.0, + "threshold": 0.11 + }, + "tests_top10_best": { + "mean": 0.823, + "functions": 22, + "boot_lo": 0.709, + "boot_hi": 0.918, + "boot_half": 0.105, + "seeds": [ + 0.738, + 0.85, + 0.925 + ], + "seed_sd": 0.094, + "threshold": 0.11 + }, + "tests_caught": { + "mean": 1.0, + "functions": 22, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.05 + }, + "look_vs_file": { + "mean": 0.101, + "functions": 37, + "boot_lo": 0.081, + "boot_hi": 0.121, + "boot_half": 0.02, + "seeds": [ + 0.087, + 0.105, + 0.123 + ], + "seed_sd": 0.018, + "threshold": 0.03 + } + } + }, + { + "repo": "semver", + "lang": "rust", + "commit": "280ebcb6edac", + "index_seconds": 0.0, + "symbols": 113, + "files": 13, + "seeds": [ + 7, + 8, + 9 + ], + "edges": 1192, + "sample": [ + "semver::identifier::Identifier::ptr_eq", + "semver::eval::matches_req", + "semver::identifier::Identifier::new_unchecked", + "semver::eval::matches_comparator", + "semver::identifier::Identifier::empty" + ], + "sample_common": [ + "semver::BuildMetadata::as_str", + "semver::identifier::Identifier::is_empty", + "semver::Prerelease::is_empty" + ], + "samples": { + "7": [ + "semver::identifier::Identifier::ptr_eq", + "semver::eval::matches_req", + "semver::identifier::Identifier::new_unchecked", + "semver::eval::matches_comparator", + "semver::identifier::Identifier::empty" + ], + "8": [ + "semver::identifier::Identifier::ptr_eq", + "semver::eval::matches_req", + "semver::identifier::Identifier::new_unchecked", + "semver::identifier::Identifier::empty", + "semver::eval::matches_comparator" + ], + "9": [ + "semver::eval::matches_req", + "semver::eval::matches_comparator", + "semver::identifier::Identifier::empty", + "semver::identifier::Identifier::ptr_eq", + "semver::identifier::Identifier::new_unchecked" + ] + }, + "samples_common": { + "7": [ + "semver::BuildMetadata::as_str", + "semver::identifier::Identifier::is_empty" + ], + "8": [ + "semver::Prerelease::is_empty", + "semver::BuildMetadata::as_str" + ], + "9": [ + "semver::BuildMetadata::as_str", + "semver::identifier::Identifier::is_empty" + ] + }, + "samples_blind": { + "7": [ + "semver::identifier::Identifier::ptr_eq", + "semver::eval::matches_req", + "semver::Version::cmp_precedence", + "semver::identifier::Identifier::new_unchecked", + "semver::eval::matches_comparator", + "semver::identifier::Identifier::empty" + ], + "8": [ + "semver::Version::cmp_precedence", + "semver::identifier::Identifier::ptr_eq", + "semver::eval::matches_req", + "semver::identifier::Identifier::new_unchecked", + "semver::identifier::Identifier::empty", + "semver::eval::matches_comparator" + ], + "9": [ + "semver::Version::cmp_precedence", + "semver::eval::matches_req", + "semver::eval::matches_comparator", + "semver::identifier::Identifier::empty", + "semver::identifier::Identifier::ptr_eq", + "semver::identifier::Identifier::new_unchecked" + ] + }, + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "truth": [ + "semver::identifier::Identifier::eq", + "semver::impls::BuildMetadata::cmp", + "semver::impls::Prerelease::cmp" + ], + "found": [ + "semver::identifier::Identifier::eq", + "semver::impls::BuildMetadata::cmp", + "semver::impls::Prerelease::cmp" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::eval::matches_req", + "truth": [ + "semver::VersionReq::matches" + ], + "found": [ + "semver::VersionReq::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "truth": [ + "semver::parse::build_identifier", + "semver::parse::prerelease_identifier" + ], + "found": [ + "semver::parse::build_identifier", + "semver::parse::prerelease_identifier" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::eval::matches_comparator", + "truth": [ + "semver::Comparator::matches" + ], + "found": [ + "semver::Comparator::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::empty", + "truth": [ + "semver::BuildMetadata::EMPTY", + "semver::Prerelease::EMPTY", + "semver::identifier::Identifier::is_empty", + "semver::identifier::Identifier::new_unchecked", + "semver::impls::Identifier::default" + ], + "found": [ + "semver::BuildMetadata::EMPTY", + "semver::Prerelease::EMPTY", + "semver::identifier::Identifier::is_empty", + "semver::identifier::Identifier::new_unchecked", + "semver::impls::Identifier::default" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "callers_common": [ + { + "symbol": "semver::BuildMetadata::as_str", + "truth": [ + "semver::display::BuildMetadata::fmt", + "semver::impls::BuildMetadata::cmp" + ], + "found": [ + "semver::display::BuildMetadata::fmt", + "semver::impls::BuildMetadata::cmp" + ], + "maybe": [ + "semver::impls::BuildMetadata::deref", + "semver::impls::Prerelease::deref" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::is_empty", + "truth": [ + "semver::BuildMetadata::is_empty", + "semver::Prerelease::is_empty", + "semver::identifier::Identifier::as_str", + "semver::identifier::Identifier::is_empty_or_inline" + ], + "found": [ + "semver::BuildMetadata::is_empty", + "semver::Prerelease::is_empty", + "semver::identifier::Identifier::as_str", + "semver::identifier::Identifier::is_empty_or_inline" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::Prerelease::is_empty", + "skipped": "compiler reported no uses" + } + ], + "callers_blind": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "truth": [ + "semver::identifier::Identifier::eq", + "semver::impls::BuildMetadata::cmp", + "semver::impls::Prerelease::cmp" + ], + "found": [ + "semver::identifier::Identifier::eq", + "semver::impls::BuildMetadata::cmp", + "semver::impls::Prerelease::cmp" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::eval::matches_req", + "truth": [ + "semver::VersionReq::matches" + ], + "found": [ + "semver::VersionReq::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::Version::cmp_precedence", + "skipped": "compiler reported no uses" + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "truth": [ + "semver::parse::build_identifier", + "semver::parse::prerelease_identifier" + ], + "found": [ + "semver::parse::build_identifier", + "semver::parse::prerelease_identifier" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::eval::matches_comparator", + "truth": [ + "semver::Comparator::matches" + ], + "found": [ + "semver::Comparator::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::empty", + "truth": [ + "semver::BuildMetadata::EMPTY", + "semver::Prerelease::EMPTY", + "semver::identifier::Identifier::is_empty", + "semver::identifier::Identifier::new_unchecked", + "semver::impls::Identifier::default" + ], + "found": [ + "semver::BuildMetadata::EMPTY", + "semver::Prerelease::EMPTY", + "semver::identifier::Identifier::is_empty", + "semver::identifier::Identifier::new_unchecked", + "semver::impls::Identifier::default" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "rename": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::eval::matches_req", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/identifier.rs:94: const HEAD: NonNull = unsafe { NonNull::new_unchecked(!0 as *mut u8) };\nsrc/identifier.rs:120: let size = bytes_for_varint(unsafe { NonZeroUsize::new_unchecked(len) }) + len;\nsrc/identifier.rs:292: unsafe { NonNull::new_unchecked(modified) }\nsrc/ide", + "detail": "" + }, + { + "symbol": "semver::eval::matches_comparator", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::identifier::Identifier::empty", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/error.rs:35: ErrorKind::Empty => formatter.write_str(\"empty string, expected a semver version\"),\nsrc/error.rs:70: write!(formatter, \"empty identifier segment in {}\", pos)\nsrc/identifier.rs:169: let empty = Self::empty_gnx();\nsrc/identifier.rs:170: let is_e", + "detail": "" + } + ], + "mutants": { + "7": [ + "semver::identifier::Identifier::ptr_eq", + "semver::eval::matches_req", + "semver::identifier::Identifier::new_unchecked", + "semver::eval::matches_comparator", + "semver::identifier::Identifier::empty" + ], + "8": [ + "semver::identifier::Identifier::ptr_eq", + "semver::eval::matches_req", + "semver::identifier::Identifier::new_unchecked", + "semver::identifier::Identifier::empty", + "semver::eval::matches_comparator" + ], + "9": [ + "semver::eval::matches_req", + "semver::eval::matches_comparator", + "semver::identifier::Identifier::empty", + "semver::identifier::Identifier::ptr_eq", + "semver::identifier::Identifier::new_unchecked" + ] + }, + "tests": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "level": "name", + "truth": 20, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "test_basic", + "test_caret", + "test_cargo3202", + "test_eq", + "test_eq_hash", + "test_exact", + "test_ge", + "test_greater_than" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "semver::eval::matches_req", + "level": "name", + "truth": 11, + "predicted": 11, + "recall": 1.0, + "precision": 1.0, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "level": "name", + "truth": 24, + "predicted": 22, + "recall": 0.8333333333333334, + "precision": 0.9090909090909091, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "test_align", + "test_comparator_parse", + "test_leading_digit_in_pre_and_build", + "test_wildcard_and_another" + ], + "recall_graph_only": 0.8333333333333334 + }, + { + "symbol": "semver::eval::matches_comparator", + "skipped": "no test fails when it throws", + "predicted": 0 + }, + { + "symbol": "semver::identifier::Identifier::empty", + "skipped": "mutant does not compile" + } + ], + "look": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "look_tokens": 110, + "file_tokens": 4536 + }, + { + "symbol": "semver::eval::matches_req", + "look_tokens": 319, + "file_tokens": 1035 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "look_tokens": 1109, + "file_tokens": 4536 + }, + { + "symbol": "semver::eval::matches_comparator", + "look_tokens": 128, + "file_tokens": 1035 + }, + { + "symbol": "semver::identifier::Identifier::empty", + "look_tokens": 225, + "file_tokens": 4536 + } + ], + "seconds": 1, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.15 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.15 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.15 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.15 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 5, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "callers_precision": { + "mean": 1.0, + "functions": 5, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "blind_recall": { + "mean": 1.0, + "functions": 5, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "common_recall": { + "mean": 1.0, + "functions": 2, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.5 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 2, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.5 + }, + "common_precision": { + "mean": 1.0, + "functions": 2, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.5 + }, + "rename_ok": { + "mean": 1.0, + "functions": 5, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "tests_recall": { + "mean": 0.611, + "functions": 3, + "boot_lo": 0.278, + "boot_hi": 0.944, + "boot_half": 0.333, + "seeds": [ + 0.611, + 0.611, + 0.611 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "tests_precision": { + "mean": 0.636, + "functions": 3, + "boot_lo": 0.303, + "boot_hi": 0.97, + "boot_half": 0.333, + "seeds": [ + 0.636, + 0.636, + 0.636 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "tests_top10_precision": { + "mean": 0.667, + "functions": 3, + "boot_lo": 0.333, + "boot_hi": 1.0, + "boot_half": 0.333, + "seeds": [ + 0.667, + 0.667, + 0.667 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "tests_top10_best": { + "mean": 0.667, + "functions": 3, + "boot_lo": 0.333, + "boot_hi": 1.0, + "boot_half": 0.333, + "seeds": [ + 0.667, + 0.667, + 0.667 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "tests_caught": { + "mean": 0.667, + "functions": 3, + "boot_lo": 0.333, + "boot_hi": 1.0, + "boot_half": 0.333, + "seeds": [ + 0.667, + 0.667, + 0.667 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "look_vs_file": { + "mean": 0.15, + "functions": 5, + "boot_lo": 0.073, + "boot_hi": 0.234, + "boot_half": 0.081, + "seeds": [ + 0.15, + 0.15, + 0.15 + ], + "seed_sd": 0.0, + "threshold": 0.09 + } + } + }, + { + "repo": "indexmap", + "lang": "rust", + "commit": "41a870887c4c", + "index_seconds": 0.1, + "symbols": 1026, + "files": 32, + "seeds": [ + 7, + 8, + 9 + ], + "edges": 6369, + "sample": [ + "indexmap::map::IndexMap::sort_unstable_keys", + "indexmap::set::IndexSet::is_subset", + "indexmap::serde::cautious_capacity", + "indexmap::set::IndexSet::difference", + "indexmap::benches::bench::simple_sort", + "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash", + "indexmap::inner::Core::split_splice", + "indexmap::inner::extract::ExtractCore::remaining", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "indexmap::map::IndexMap::sort_keys", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::insert_hashed_nocheck", + "indexmap::set::IndexSet::contains", + "indexmap::util::simplify_range", + "indexmap::rayon::set::IndexSet::par_is_subset", + "indexmap::map::disjoint::get_disjoint_opt_mut", + "indexmap::set::IndexSet::union", + "indexmap::util::assert_index_lt", + "indexmap::util::try_simplify_range", + "indexmap::inner::Core::shift_insert_unique", + "indexmap::set::IndexSet::swap_take", + "indexmap::inner::Core::replace_index_unique", + "indexmap::map::IndexMap::contains_key", + "indexmap::inner::Core::retain_in_order", + "indexmap::rayon::set::IndexSet::par_difference", + "indexmap::inner::Core::get_index_of_raw", + "indexmap::map::slice::Slice::from_mut_slice", + "indexmap::set::IndexSet::intersection", + "indexmap::util::third", + "indexmap::util::assert_index_le", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck", + "indexmap::map::IndexMap::get_index_entry", + "indexmap::set::IndexSet::symmetric_difference", + "indexmap::util::slice_eq" + ], + "sample_common": [ + "indexmap::map::slice::Slice::split_at", + "indexmap::set::IndexSet::with_capacity", + "indexmap::inner::Core::drain", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::swap_remove_entry", + "indexmap::inner::Core::with_entries", + "indexmap::map::IndexMap::append", + "indexmap::set::IndexSet::sort_unstable_by_key", + "indexmap::map::IndexMap::move_index", + "indexmap::map::slice::Slice::binary_search_by", + "indexmap::map::IndexMap::clear", + "indexmap::inner::Core::truncate", + "indexmap::inner::entry::OccupiedEntry::into_core", + "indexmap::map::IndexMap::swap_remove", + "indexmap::map::entry::IndexedEntry::get_mut", + "indexmap::set::IndexSet::splice", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert", + "indexmap::map::IndexMap::get_key_value", + "indexmap::map::IndexMap::hasher", + "indexmap::map::IndexMap::is_empty", + "indexmap::map::slice::Slice::partition_point", + "indexmap::set::IndexSet::split_off", + "indexmap::map::IndexMap::sort_by_key", + "indexmap::inner::Core::into_entries", + "indexmap::map::IndexMap::swap_remove_full", + "indexmap::map::raw_entry_v1::RawEntryMut::or_insert", + "indexmap::set::IndexSet::binary_search_by", + "indexmap::map::IndexMap::is_sorted_by", + "indexmap::set::IndexSet::shrink_to", + "indexmap::inner::entry::OccupiedEntry::from_hash", + "indexmap::map::slice::Slice::from_boxed", + "indexmap::rayon::set::IndexSet::par_sort_unstable_by_key", + "indexmap::inner::Core::par_drain", + "indexmap::set::IndexSet::try_reserve", + "indexmap::map::entry::IndexedEntry::move_index", + "indexmap::map::IndexMap::shift_insert", + "indexmap::set::IndexSet::try_reserve_exact", + "indexmap::set::slice::Slice::is_sorted", + "indexmap::set::IndexSet::reverse", + "indexmap::map::IndexMap::get_index_of", + "indexmap::map::entry::IndexedEntry::shift_remove", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::get_key_value_mut", + "indexmap::map::slice::Slice::split_at_checked", + "indexmap::map::slice::Slice::first", + "indexmap::set::slice::Slice::is_sorted_by_key", + "indexmap::map::IndexMap::shift_remove_full", + "indexmap::set::IndexSet::insert_full", + "indexmap::map::IndexMap::swap_remove_index", + "indexmap::rayon::map::IndexMap::par_sort_by", + "indexmap::rayon::map::IndexMap::par_sort_by_cached_key", + "indexmap::map::IndexMap::last_mut" + ], + "samples": { + "7": [ + "indexmap::map::IndexMap::sort_unstable_keys", + "indexmap::set::IndexSet::is_subset", + "indexmap::serde::cautious_capacity", + "indexmap::set::IndexSet::difference", + "indexmap::benches::bench::simple_sort", + "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash", + "indexmap::inner::Core::split_splice", + "indexmap::inner::extract::ExtractCore::remaining", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "indexmap::map::IndexMap::sort_keys", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::insert_hashed_nocheck", + "indexmap::set::IndexSet::contains", + "indexmap::util::simplify_range", + "indexmap::rayon::set::IndexSet::par_is_subset", + "indexmap::map::disjoint::get_disjoint_opt_mut", + "indexmap::set::IndexSet::union", + "indexmap::util::assert_index_lt", + "indexmap::util::try_simplify_range", + "indexmap::inner::Core::shift_insert_unique", + "indexmap::set::IndexSet::swap_take" + ], + "8": [ + "indexmap::set::IndexSet::union", + "indexmap::inner::Core::replace_index_unique", + "indexmap::map::IndexMap::contains_key", + "indexmap::benches::bench::simple_sort", + "indexmap::inner::Core::retain_in_order", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "indexmap::serde::cautious_capacity", + "indexmap::rayon::set::IndexSet::par_difference", + "indexmap::map::IndexMap::sort_keys", + "indexmap::inner::Core::shift_insert_unique", + "indexmap::set::IndexSet::is_subset", + "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash", + "indexmap::inner::Core::get_index_of_raw", + "indexmap::util::try_simplify_range", + "indexmap::rayon::set::IndexSet::par_is_subset", + "indexmap::map::slice::Slice::from_mut_slice", + "indexmap::map::disjoint::get_disjoint_opt_mut", + "indexmap::set::IndexSet::intersection", + "indexmap::set::IndexSet::contains", + "indexmap::util::third" + ], + "9": [ + "indexmap::util::assert_index_le", + "indexmap::util::third", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck", + "indexmap::map::slice::Slice::from_mut_slice", + "indexmap::rayon::set::IndexSet::par_difference", + "indexmap::set::IndexSet::swap_take", + "indexmap::inner::Core::split_splice", + "indexmap::set::IndexSet::intersection", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "indexmap::map::IndexMap::sort_unstable_keys", + "indexmap::set::IndexSet::union", + "indexmap::set::IndexSet::difference", + "indexmap::map::IndexMap::get_index_entry", + "indexmap::util::simplify_range", + "indexmap::set::IndexSet::contains", + "indexmap::map::IndexMap::contains_key", + "indexmap::inner::Core::replace_index_unique", + "indexmap::set::IndexSet::symmetric_difference", + "indexmap::inner::Core::retain_in_order", + "indexmap::util::slice_eq" + ] + }, + "samples_common": { + "7": [ + "indexmap::map::slice::Slice::split_at", + "indexmap::set::IndexSet::with_capacity", + "indexmap::inner::Core::drain", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::swap_remove_entry", + "indexmap::inner::Core::with_entries", + "indexmap::map::IndexMap::append", + "indexmap::set::IndexSet::sort_unstable_by_key", + "indexmap::map::IndexMap::move_index", + "indexmap::map::slice::Slice::binary_search_by", + "indexmap::map::IndexMap::clear", + "indexmap::inner::Core::truncate", + "indexmap::inner::entry::OccupiedEntry::into_core", + "indexmap::map::IndexMap::swap_remove", + "indexmap::map::entry::IndexedEntry::get_mut", + "indexmap::set::IndexSet::splice", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert", + "indexmap::map::IndexMap::get_key_value", + "indexmap::map::IndexMap::hasher", + "indexmap::map::IndexMap::is_empty", + "indexmap::map::slice::Slice::partition_point" + ], + "8": [ + "indexmap::set::IndexSet::split_off", + "indexmap::map::IndexMap::sort_by_key", + "indexmap::inner::Core::into_entries", + "indexmap::map::IndexMap::swap_remove_full", + "indexmap::map::raw_entry_v1::RawEntryMut::or_insert", + "indexmap::set::IndexSet::binary_search_by", + "indexmap::set::IndexSet::with_capacity", + "indexmap::map::IndexMap::append", + "indexmap::map::IndexMap::is_sorted_by", + "indexmap::set::IndexSet::shrink_to", + "indexmap::inner::Core::truncate", + "indexmap::inner::entry::OccupiedEntry::from_hash", + "indexmap::map::slice::Slice::from_boxed", + "indexmap::set::IndexSet::sort_unstable_by_key", + "indexmap::rayon::set::IndexSet::par_sort_unstable_by_key", + "indexmap::map::IndexMap::get_key_value", + "indexmap::inner::Core::par_drain", + "indexmap::set::IndexSet::try_reserve", + "indexmap::map::entry::IndexedEntry::move_index", + "indexmap::map::IndexMap::shift_insert" + ], + "9": [ + "indexmap::set::IndexSet::try_reserve_exact", + "indexmap::set::slice::Slice::is_sorted", + "indexmap::inner::Core::par_drain", + "indexmap::set::IndexSet::reverse", + "indexmap::map::IndexMap::get_index_of", + "indexmap::map::entry::IndexedEntry::shift_remove", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::get_key_value_mut", + "indexmap::map::slice::Slice::split_at_checked", + "indexmap::inner::entry::OccupiedEntry::into_core", + "indexmap::map::IndexMap::get_key_value", + "indexmap::map::slice::Slice::first", + "indexmap::map::IndexMap::is_sorted_by", + "indexmap::set::slice::Slice::is_sorted_by_key", + "indexmap::map::IndexMap::shift_insert", + "indexmap::map::IndexMap::shift_remove_full", + "indexmap::set::IndexSet::insert_full", + "indexmap::map::IndexMap::swap_remove_index", + "indexmap::rayon::map::IndexMap::par_sort_by", + "indexmap::rayon::map::IndexMap::par_sort_by_cached_key", + "indexmap::map::IndexMap::last_mut" + ] + }, + "samples_blind": { + "7": [ + "indexmap::map::IndexMap::get_full_mut", + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_hash_full", + "indexmap::map::IndexMap::sort_unstable_keys", + "indexmap::map::slice::Slice::split_last_mut", + "indexmap::set::IndexSet::take", + "indexmap::set::IndexSet::is_disjoint", + "indexmap::map::entry::Entry::or_default", + "indexmap::set::IndexSet::is_subset", + "indexmap::serde::cautious_capacity", + "indexmap::set::IndexSet::difference", + "indexmap::benches::bench::simple_sort", + "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash", + "indexmap::inner::Core::split_splice", + "indexmap::map::IndexMap::last_entry", + "indexmap::inner::extract::ExtractCore::remaining", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "indexmap::map::IndexMap::sort_keys", + "indexmap::set::IndexSet::sort_unstable", + "indexmap::set::IndexSet::sort", + "indexmap::rayon::set::IndexSet::par_sort_unstable" + ], + "8": [ + "indexmap::set::IndexSet::union", + "indexmap::inner::Core::replace_index_unique", + "indexmap::rayon::set::IndexSet::par_is_disjoint", + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_hash_full", + "indexmap::map::IndexMap::contains_key", + "indexmap::benches::bench::simple_sort", + "indexmap::inner::Core::retain_in_order", + "indexmap::set::IndexSet::take", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "indexmap::map::entry::Entry::or_insert_with_key", + "indexmap::serde::cautious_capacity", + "indexmap::map::IndexMap::last_entry", + "indexmap::set::IndexSet::sort", + "indexmap::rayon::set::IndexSet::par_difference", + "indexmap::map::IndexMap::sort_keys", + "indexmap::inner::Core::shift_insert_unique", + "indexmap::map::IndexMap::get_full_mut", + "indexmap::rayon::set::IndexSet::par_symmetric_difference", + "indexmap::map::slice::Slice::new_mut", + "indexmap::rayon::set::IndexSet::par_is_superset" + ], + "9": [ + "indexmap::util::assert_index_le", + "indexmap::map::slice::Slice::split_first_mut", + "indexmap::util::third", + "indexmap::rayon::map::IndexMap::par_sort_unstable_keys", + "indexmap::map::entry::Entry::or_default", + "indexmap::set::IndexSet::take", + "indexmap::map::entry::Entry::or_insert_with_key", + "indexmap::rayon::set::IndexSet::par_union", + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_hash_full", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck", + "indexmap::map::slice::Slice::from_mut_slice", + "indexmap::rayon::set::IndexSet::par_difference", + "indexmap::set::IndexSet::swap_take", + "indexmap::map::IndexMap::last_entry", + "indexmap::map::IndexMap::get_disjoint_indices_mut", + "indexmap::set::IndexSet::is_superset", + "indexmap::rayon::set::IndexSet::par_sort", + "indexmap::inner::Core::split_splice", + "indexmap::set::IndexSet::intersection", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut" + ] + }, + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "indexmap::map::IndexMap::sort_unstable_keys", + "truth": [ + "indexmap::set::IndexSet::sort_unstable" + ], + "found": [ + "indexmap::set::IndexSet::sort_unstable" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::is_subset", + "truth": [ + "indexmap::set::IndexSet::eq", + "indexmap::set::IndexSet::is_superset" + ], + "found": [ + "indexmap::set::IndexSet::eq", + "indexmap::set::IndexSet::is_superset" + ], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::serde::cautious_capacity", + "truth": [ + "indexmap::map::serde_seq::SeqVisitor::visit_seq", + "indexmap::serde::IndexMapVisitor::visit_map", + "indexmap::serde::IndexSetVisitor::visit_seq" + ], + "found": [ + "indexmap::map::serde_seq::SeqVisitor::visit_seq", + "indexmap::serde::IndexMapVisitor::visit_map", + "indexmap::serde::IndexSetVisitor::visit_seq" + ], + "maybe": [], + "import_files": [ + "src/map/serde_seq.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::difference", + "truth": [ + "indexmap::rayon::set::ParDifference::fmt", + "indexmap::set::IndexSet::sub", + "indexmap::set::iter::SymmetricDifference::new", + "indexmap::set::iter::Union::new" + ], + "found": [ + "indexmap::rayon::set::ParDifference::fmt", + "indexmap::set::IndexSet::sub", + "indexmap::set::iter::SymmetricDifference::new", + "indexmap::set::iter::Union::new" + ], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::benches::bench::simple_sort", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash", + "truth": [ + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_hash", + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_hash_full" + ], + "found": [ + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_hash", + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_hash_full" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::Core::split_splice", + "truth": [ + "indexmap::map::iter::Splice::new" + ], + "found": [ + "indexmap::map::iter::Splice::new" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::extract::ExtractCore::remaining", + "truth": [ + "indexmap::map::iter::ExtractIf::size_hint", + "indexmap::set::iter::ExtractIf::size_hint" + ], + "found": [ + "indexmap::map::iter::ExtractIf::size_hint", + "indexmap::set::iter::ExtractIf::size_hint" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "truth": [ + "indexmap::map::raw_entry_v1::RawEntryMut::or_insert", + "indexmap::map::raw_entry_v1::RawEntryMut::or_insert_with" + ], + "found": [ + "indexmap::map::raw_entry_v1::RawEntryMut::or_insert", + "indexmap::map::raw_entry_v1::RawEntryMut::or_insert_with" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::sort_keys", + "truth": [ + "indexmap::set::IndexSet::sort" + ], + "found": [ + "indexmap::set::IndexSet::sort" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawVacantEntryMut::insert_hashed_nocheck", + "truth": [ + "indexmap::map::raw_entry_v1::RawVacantEntryMut::insert" + ], + "found": [ + "indexmap::map::raw_entry_v1::RawVacantEntryMut::insert" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::contains", + "truth": [ + "indexmap::rayon::set::IndexSet::par_is_disjoint", + "indexmap::rayon::set::IndexSet::par_is_subset", + "indexmap::rayon::set::ParDifference::drive_unindexed", + "indexmap::rayon::set::ParIntersection::drive_unindexed", + "indexmap::set::IndexSet::is_disjoint", + "indexmap::set::IndexSet::is_subset", + "indexmap::set::iter::Difference::next", + "indexmap::set::iter::Difference::next_back", + "indexmap::set::iter::Intersection::next", + "indexmap::set::iter::Intersection::next_back" + ], + "found": [ + "indexmap::rayon::set::IndexSet::par_is_disjoint", + "indexmap::rayon::set::IndexSet::par_is_subset", + "indexmap::set::IndexSet::is_disjoint", + "indexmap::set::IndexSet::is_subset", + "indexmap::set::iter::Difference::next", + "indexmap::set::iter::Difference::next_back", + "indexmap::set::iter::Intersection::next", + "indexmap::set::iter::Intersection::next_back" + ], + "maybe": [], + "import_files": [], + "recall": 0.8, + "precision": 1.0, + "recall_with_maybe": 0.8 + }, + { + "symbol": "indexmap::util::simplify_range", + "truth": [ + "indexmap::inner::Core::drain", + "indexmap::inner::Core::par_drain", + "indexmap::inner::Core::split_splice", + "indexmap::inner::extract::Core::extract" + ], + "found": [ + "indexmap::inner::Core::drain", + "indexmap::inner::Core::par_drain", + "indexmap::inner::Core::split_splice", + "indexmap::inner::extract::Core::extract" + ], + "maybe": [], + "import_files": [ + "src/inner.rs", + "src/inner/extract.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_is_subset", + "truth": [ + "indexmap::rayon::set::IndexSet::par_eq", + "indexmap::rayon::set::IndexSet::par_is_superset" + ], + "found": [ + "indexmap::rayon::set::IndexSet::par_eq", + "indexmap::rayon::set::IndexSet::par_is_superset" + ], + "maybe": [], + "import_files": [ + "src/rayon/set.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::disjoint::get_disjoint_opt_mut", + "truth": [ + "indexmap::map::IndexMap::get_disjoint_mut" + ], + "found": [ + "indexmap::map::IndexMap::get_disjoint_mut" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::union", + "truth": [ + "indexmap::rayon::set::ParUnion::fmt", + "indexmap::set::IndexSet::bitor" + ], + "found": [ + "indexmap::rayon::set::ParUnion::fmt", + "indexmap::set::IndexSet::bitor" + ], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::util::assert_index_lt", + "truth": [ + "indexmap::inner::Core::move_index", + "indexmap::inner::Core::swap_indices", + "indexmap::inner::entry::OccupiedEntry::move_index", + "indexmap::inner::entry::OccupiedEntry::swap_indices", + "indexmap::inner::entry::VacantEntry::replace_index", + "indexmap::map::IndexMap::index", + "indexmap::map::IndexMap::index_mut", + "indexmap::map::IndexMap::replace_index", + "indexmap::map::IndexMap::shift_insert", + "indexmap::set::IndexSet::index" + ], + "found": [ + "indexmap::inner::Core::move_index", + "indexmap::inner::Core::swap_indices", + "indexmap::inner::entry::OccupiedEntry::move_index", + "indexmap::inner::entry::OccupiedEntry::swap_indices", + "indexmap::inner::entry::VacantEntry::replace_index", + "indexmap::map::IndexMap::index", + "indexmap::map::IndexMap::index_mut", + "indexmap::map::IndexMap::replace_index", + "indexmap::map::IndexMap::shift_insert", + "indexmap::set::IndexSet::index" + ], + "maybe": [], + "import_files": [ + "src/inner.rs", + "src/inner/entry.rs", + "src/map.rs", + "src/set.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::util::try_simplify_range", + "truth": [ + "indexmap::map::IndexMap::get_range", + "indexmap::map::IndexMap::get_range_mut", + "indexmap::map::slice::Slice::get_range", + "indexmap::map::slice::Slice::get_range_mut", + "indexmap::set::IndexSet::get_range", + "indexmap::set::slice::Slice::get_range" + ], + "found": [ + "indexmap::map::IndexMap::get_range", + "indexmap::map::IndexMap::get_range_mut", + "indexmap::map::slice::Slice::get_range", + "indexmap::map::slice::Slice::get_range_mut", + "indexmap::set::IndexSet::get_range", + "indexmap::set::slice::Slice::get_range" + ], + "maybe": [], + "import_files": [ + "src/map.rs", + "src/map/slice.rs", + "src/set.rs", + "src/set/slice.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::Core::shift_insert_unique", + "truth": [ + "indexmap::inner::entry::VacantEntry::shift_insert", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck" + ], + "found": [ + "indexmap::inner::entry::VacantEntry::shift_insert", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::swap_take", + "truth": [ + "indexmap::set::IndexSet::take" + ], + "found": [ + "indexmap::set::IndexSet::take" + ], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::Core::replace_index_unique", + "truth": [ + "indexmap::map::IndexMap::replace_index" + ], + "found": [ + "indexmap::map::IndexMap::replace_index" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::contains_key", + "truth": [ + "indexmap::set::IndexSet::contains" + ], + "found": [ + "indexmap::set::IndexSet::contains" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::Core::retain_in_order", + "truth": [ + "indexmap::map::IndexMap::retain", + "indexmap::map::mutable::IndexMap::retain2" + ], + "found": [ + "indexmap::map::IndexMap::retain", + "indexmap::map::mutable::IndexMap::retain2" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_difference", + "truth": [ + "indexmap::rayon::set::ParSymmetricDifference::drive_unindexed", + "indexmap::rayon::set::ParUnion::drive_unindexed" + ], + "found": [ + "indexmap::rayon::set::ParSymmetricDifference::drive_unindexed", + "indexmap::rayon::set::ParUnion::drive_unindexed" + ], + "maybe": [], + "import_files": [ + "src/rayon/set.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::Core::get_index_of_raw", + "truth": [ + "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash" + ], + "found": [ + "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::slice::Slice::from_mut_slice", + "truth": [ + "indexmap::map::IndexMap::as_mut_slice", + "indexmap::map::IndexMap::get_range_mut", + "indexmap::map::iter::IntoIter::as_mut_slice", + "indexmap::map::iter::IterMut2::into_slice", + "indexmap::map::iter::IterMut::into_slice", + "indexmap::map::slice::Slice::default", + "indexmap::map::slice::Slice::get_range_mut", + "indexmap::map::slice::Slice::new_mut", + "indexmap::map::slice::Slice::split_at_mut", + "indexmap::map::slice::Slice::split_at_mut_checked", + "indexmap::map::slice::Slice::split_first_mut", + "indexmap::map::slice::Slice::split_last_mut", + "indexmap::map::slice::impl_index" + ], + "found": [ + "indexmap::map::IndexMap::as_mut_slice", + "indexmap::map::IndexMap::get_range_mut", + "indexmap::map::iter::IntoIter::as_mut_slice", + "indexmap::map::iter::IterMut2::into_slice", + "indexmap::map::iter::IterMut::into_slice", + "indexmap::map::slice::Slice::default", + "indexmap::map::slice::Slice::get_range_mut", + "indexmap::map::slice::Slice::new_mut", + "indexmap::map::slice::Slice::split_at_mut", + "indexmap::map::slice::Slice::split_at_mut_checked", + "indexmap::map::slice::Slice::split_first_mut", + "indexmap::map::slice::Slice::split_last_mut" + ], + "maybe": [], + "import_files": [], + "recall": 0.9230769230769231, + "precision": 1.0, + "recall_with_maybe": 0.9230769230769231 + }, + { + "symbol": "indexmap::set::IndexSet::intersection", + "truth": [ + "indexmap::rayon::set::ParIntersection::fmt", + "indexmap::set::IndexSet::bitand" + ], + "found": [ + "indexmap::rayon::set::ParIntersection::fmt", + "indexmap::set::IndexSet::bitand" + ], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::util::third", + "truth": [ + "indexmap::map::IndexMap::shift_remove", + "indexmap::map::IndexMap::swap_remove" + ], + "found": [ + "indexmap::map::IndexMap::shift_remove", + "indexmap::map::IndexMap::swap_remove" + ], + "maybe": [], + "import_files": [ + "src/map.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::util::assert_index_le", + "truth": [ + "indexmap::inner::Core::split_off", + "indexmap::map::IndexMap::insert_before", + "indexmap::map::IndexMap::shift_insert" + ], + "found": [ + "indexmap::inner::Core::split_off", + "indexmap::map::IndexMap::insert_before", + "indexmap::map::IndexMap::shift_insert" + ], + "maybe": [], + "import_files": [ + "src/inner.rs", + "src/map.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck", + "truth": [ + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert" + ], + "found": [ + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::get_index_entry", + "truth": [ + "indexmap::map::IndexMap::first_entry", + "indexmap::map::IndexMap::last_entry" + ], + "found": [ + "indexmap::map::IndexMap::first_entry", + "indexmap::map::IndexMap::last_entry" + ], + "maybe": [], + "import_files": [ + "src/map/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::symmetric_difference", + "truth": [ + "indexmap::rayon::set::ParSymmetricDifference::fmt", + "indexmap::set::IndexSet::bitxor" + ], + "found": [ + "indexmap::rayon::set::ParSymmetricDifference::fmt", + "indexmap::set::IndexSet::bitxor" + ], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::util::slice_eq", + "truth": [ + "indexmap::map::slice::Slice::eq", + "indexmap::set::slice::Slice::eq" + ], + "found": [ + "indexmap::map::slice::Slice::eq", + "indexmap::set::slice::Slice::eq" + ], + "maybe": [], + "import_files": [ + "src/map/slice.rs", + "src/set/slice.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "callers_common": [ + { + "symbol": "indexmap::map::slice::Slice::split_at", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::set::IndexSet::with_capacity", + "truth": [ + "indexmap::macros::indexset" + ], + "found": [ + "indexmap::macros::indexset" + ], + "maybe": [ + "indexmap::inner::Core::split_off", + "indexmap::inner::Core::split_splice", + "indexmap::inner::Core::with_capacity" + ], + "import_files": [ + "src/set/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::Core::drain", + "truth": [ + "indexmap::map::IndexMap::drain", + "indexmap::set::IndexSet::drain" + ], + "found": [ + "indexmap::map::IndexMap::drain" + ], + "maybe": [ + "indexmap::set::IndexSet::drain" + ], + "import_files": [], + "recall": 0.5, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::swap_remove_entry", + "truth": [ + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::remove_entry" + ], + "found": [ + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::remove_entry" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::Core::with_entries", + "truth": [ + "indexmap::map::IndexMap::with_entries" + ], + "found": [ + "indexmap::map::IndexMap::with_entries" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::append", + "truth": [ + "indexmap::set::IndexSet::append" + ], + "found": [ + "indexmap::set::IndexSet::append" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::sort_unstable_by_key", + "truth": [], + "found": [], + "maybe": [ + "indexmap::map::IndexMap::sort_unstable_by_key" + ], + "import_files": [ + "src/set/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::map::IndexMap::move_index", + "truth": [ + "indexmap::map::tests::move_index_oob", + "indexmap::set::IndexSet::move_index" + ], + "found": [ + "indexmap::set::IndexSet::move_index" + ], + "maybe": [ + "indexmap::map::IndexMap::insert_before", + "indexmap::map::IndexMap::shift_insert", + "indexmap::map::tests::move_index_oob" + ], + "import_files": [ + "src/map/tests.rs" + ], + "recall": 0.5, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::slice::Slice::binary_search_by", + "truth": [ + "indexmap::inner::entry::VacantEntry::insert_sorted_by", + "indexmap::map::IndexMap::binary_search_by", + "indexmap::map::slice::Slice::binary_search_by_key", + "indexmap::map::slice::Slice::binary_search_keys" + ], + "found": [ + "indexmap::inner::entry::VacantEntry::insert_sorted_by", + "indexmap::map::slice::Slice::binary_search_by_key", + "indexmap::map::slice::Slice::binary_search_keys" + ], + "maybe": [ + "indexmap::map::IndexMap::binary_search_by", + "indexmap::set::IndexSet::binary_search_by", + "indexmap::set::slice::Slice::binary_search_by" + ], + "import_files": [], + "recall": 0.75, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::clear", + "truth": [ + "indexmap::set::IndexSet::clear" + ], + "found": [ + "indexmap::set::IndexSet::clear" + ], + "maybe": [], + "import_files": [ + "src/map/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::Core::truncate", + "truth": [ + "indexmap::map::IndexMap::truncate" + ], + "found": [ + "indexmap::map::IndexMap::truncate" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::entry::OccupiedEntry::into_core", + "truth": [ + "indexmap::map::entry::IndexedEntry::from" + ], + "found": [ + "indexmap::map::entry::IndexedEntry::from" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::swap_remove", + "truth": [ + "indexmap::map::IndexMap::remove", + "indexmap::set::IndexSet::swap_remove" + ], + "found": [ + "indexmap::map::IndexMap::remove", + "indexmap::set::IndexSet::swap_remove" + ], + "maybe": [ + "indexmap::inner::Core::swap_remove_finish" + ], + "import_files": [ + "src/map/tests.rs", + "src/rayon/map.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::entry::IndexedEntry::get_mut", + "truth": [ + "indexmap::map::entry::IndexedEntry::insert" + ], + "found": [ + "indexmap::map::entry::IndexedEntry::insert" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::splice", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::map::IndexMap::get_key_value", + "truth": [ + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_key", + "indexmap::set::IndexSet::get" + ], + "found": [ + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_key", + "indexmap::set::IndexSet::get" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::hasher", + "truth": [ + "indexmap::set::IndexSet::hasher" + ], + "found": [ + "indexmap::set::IndexSet::hasher" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::is_empty", + "truth": [ + "indexmap::map::IndexMap::extend", + "indexmap::set::IndexSet::is_empty" + ], + "found": [ + "indexmap::map::IndexMap::extend", + "indexmap::set::IndexSet::is_empty" + ], + "maybe": [], + "import_files": [ + "src/map/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::slice::Slice::partition_point", + "truth": [ + "indexmap::map::IndexMap::partition_point" + ], + "found": [], + "maybe": [ + "indexmap::map::IndexMap::partition_point", + "indexmap::set::IndexSet::partition_point", + "indexmap::set::slice::Slice::partition_point" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::split_off", + "truth": [], + "found": [], + "maybe": [ + "indexmap::inner::Core::split_off", + "indexmap::inner::Core::split_splice" + ], + "import_files": [ + "src/set/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::map::IndexMap::sort_by_key", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::inner::Core::into_entries", + "truth": [ + "indexmap::map::IndexMap::into_entries" + ], + "found": [ + "indexmap::map::IndexMap::into_entries" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::swap_remove_full", + "truth": [ + "indexmap::map::IndexMap::swap_remove", + "indexmap::map::IndexMap::swap_remove_entry", + "indexmap::set::IndexSet::swap_remove_full" + ], + "found": [ + "indexmap::map::IndexMap::swap_remove", + "indexmap::map::IndexMap::swap_remove_entry", + "indexmap::set::IndexSet::swap_remove_full" + ], + "maybe": [], + "import_files": [ + "src/map/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawEntryMut::or_insert", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::set::IndexSet::binary_search_by", + "truth": [], + "found": [], + "maybe": [ + "indexmap::map::IndexMap::binary_search_by", + "indexmap::map::slice::Slice::binary_search_by", + "indexmap::set::slice::Slice::binary_search_by" + ], + "import_files": [ + "src/set/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::map::IndexMap::is_sorted_by", + "truth": [], + "found": [], + "maybe": [ + "indexmap::map::slice::Slice::is_sorted", + "indexmap::map::slice::Slice::is_sorted_by", + "indexmap::set::IndexSet::is_sorted_by", + "indexmap::set::slice::Slice::is_sorted", + "indexmap::set::slice::Slice::is_sorted_by" + ], + "import_files": [ + "src/map/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::set::IndexSet::shrink_to", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::inner::entry::OccupiedEntry::from_hash", + "truth": [ + "indexmap::map::raw_entry_v1::RawEntryBuilderMut::from_hash" + ], + "found": [ + "indexmap::map::raw_entry_v1::RawEntryBuilderMut::from_hash" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::slice::Slice::from_boxed", + "truth": [ + "indexmap::map::IndexMap::into_boxed_slice", + "indexmap::map::slice::Box::clone", + "indexmap::map::slice::Box::default", + "indexmap::map::slice::Box::from" + ], + "found": [ + "indexmap::map::IndexMap::into_boxed_slice", + "indexmap::map::slice::Box::clone", + "indexmap::map::slice::Box::default", + "indexmap::map::slice::Box::from", + "indexmap::set::IndexSet::into_boxed_slice" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.8, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_sort_unstable_by_key", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::inner::Core::par_drain", + "truth": [ + "indexmap::rayon::map::IndexMap::par_drain", + "indexmap::rayon::set::IndexSet::par_drain" + ], + "found": [], + "maybe": [ + "indexmap::rayon::map::IndexMap::par_drain", + "indexmap::rayon::set::IndexSet::par_drain" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::try_reserve", + "truth": [], + "found": [], + "maybe": [ + "indexmap::inner::Core::try_reserve", + "indexmap::inner::Core::try_reserve_exact" + ], + "import_files": [ + "src/set/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::map::entry::IndexedEntry::move_index", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::map::IndexMap::shift_insert", + "truth": [ + "indexmap::set::IndexSet::shift_insert" + ], + "found": [ + "indexmap::set::IndexSet::shift_insert" + ], + "maybe": [ + "indexmap::map::IndexMap::insert_before" + ], + "import_files": [ + "src/map/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::try_reserve_exact", + "truth": [], + "found": [], + "maybe": [ + "indexmap::inner::Core::reserve_entries", + "indexmap::inner::Core::try_reserve_entries", + "indexmap::inner::Core::try_reserve_exact" + ], + "import_files": [ + "src/set/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::set::slice::Slice::is_sorted", + "truth": [ + "indexmap::set::IndexSet::is_sorted" + ], + "found": [], + "maybe": [ + "indexmap::map::IndexMap::is_sorted", + "indexmap::set::IndexSet::is_sorted" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::reverse", + "truth": [], + "found": [], + "maybe": [ + "indexmap::inner::Core::reverse" + ], + "import_files": [ + "src/set/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::map::IndexMap::get_index_of", + "truth": [ + "indexmap::map::IndexMap::contains_key", + "indexmap::map::IndexMap::get", + "indexmap::map::IndexMap::get_disjoint_mut", + "indexmap::map::IndexMap::get_full", + "indexmap::map::IndexMap::get_full_mut", + "indexmap::map::IndexMap::get_key_value", + "indexmap::map::IndexMap::get_key_value_mut", + "indexmap::map::IndexMap::get_mut", + "indexmap::map::mutable::IndexMap::get_full_mut2", + "indexmap::set::IndexSet::get_index_of" + ], + "found": [ + "indexmap::map::IndexMap::contains_key", + "indexmap::map::IndexMap::get", + "indexmap::map::IndexMap::get_disjoint_mut", + "indexmap::map::IndexMap::get_full", + "indexmap::map::IndexMap::get_full_mut", + "indexmap::map::IndexMap::get_key_value", + "indexmap::map::IndexMap::get_key_value_mut", + "indexmap::map::IndexMap::get_mut", + "indexmap::map::mutable::IndexMap::get_full_mut2", + "indexmap::set::IndexSet::get_index_of" + ], + "maybe": [ + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_key_hashed_nocheck" + ], + "import_files": [ + "src/map/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::entry::IndexedEntry::shift_remove", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::get_key_value_mut", + "truth": [ + "indexmap::map::raw_entry_v1::RawEntryMut::and_modify" + ], + "found": [], + "maybe": [ + "indexmap::map::raw_entry_v1::RawEntryMut::and_modify" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::slice::Slice::split_at_checked", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::map::slice::Slice::first", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::set::slice::Slice::is_sorted_by_key", + "truth": [ + "indexmap::set::IndexSet::is_sorted_by_key" + ], + "found": [], + "maybe": [ + "indexmap::map::IndexMap::is_sorted_by_key", + "indexmap::map::slice::Slice::is_sorted_by_key", + "indexmap::set::IndexSet::is_sorted_by_key" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::shift_remove_full", + "truth": [ + "indexmap::map::IndexMap::shift_remove", + "indexmap::map::IndexMap::shift_remove_entry", + "indexmap::set::IndexSet::shift_remove_full" + ], + "found": [ + "indexmap::map::IndexMap::shift_remove", + "indexmap::map::IndexMap::shift_remove_entry", + "indexmap::set::IndexSet::shift_remove_full" + ], + "maybe": [], + "import_files": [ + "src/map/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::insert_full", + "truth": [], + "found": [], + "maybe": [ + "indexmap::map::iter::Splice::drop" + ], + "import_files": [ + "src/set/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::map::IndexMap::swap_remove_index", + "truth": [ + "indexmap::set::IndexSet::swap_remove_index" + ], + "found": [ + "indexmap::set::IndexSet::swap_remove_index" + ], + "maybe": [], + "import_files": [ + "src/map/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::rayon::map::IndexMap::par_sort_by", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::rayon::map::IndexMap::par_sort_by_cached_key", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::map::IndexMap::last_mut", + "truth": [ + "indexmap::map::IndexMap::pop_if" + ], + "found": [ + "indexmap::map::IndexMap::pop_if" + ], + "maybe": [], + "import_files": [ + "src/map/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "callers_blind": [ + { + "symbol": "indexmap::map::IndexMap::get_full_mut", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawEntryBuilder::from_hash_full", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::map::IndexMap::sort_unstable_keys", + "truth": [ + "indexmap::set::IndexSet::sort_unstable" + ], + "found": [ + "indexmap::set::IndexSet::sort_unstable" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::slice::Slice::split_last_mut", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/map/slice.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::set::IndexSet::take", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::set::IndexSet::is_disjoint", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::map::entry::Entry::or_default", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/map/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::set::IndexSet::is_subset", + "truth": [ + "indexmap::set::IndexSet::eq", + "indexmap::set::IndexSet::is_superset" + ], + "found": [ + "indexmap::set::IndexSet::eq", + "indexmap::set::IndexSet::is_superset" + ], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::serde::cautious_capacity", + "truth": [ + "indexmap::map::serde_seq::SeqVisitor::visit_seq", + "indexmap::serde::IndexMapVisitor::visit_map", + "indexmap::serde::IndexSetVisitor::visit_seq" + ], + "found": [ + "indexmap::map::serde_seq::SeqVisitor::visit_seq", + "indexmap::serde::IndexMapVisitor::visit_map", + "indexmap::serde::IndexSetVisitor::visit_seq" + ], + "maybe": [], + "import_files": [ + "src/map/serde_seq.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::difference", + "truth": [ + "indexmap::rayon::set::ParDifference::fmt", + "indexmap::set::IndexSet::sub", + "indexmap::set::iter::SymmetricDifference::new", + "indexmap::set::iter::Union::new" + ], + "found": [ + "indexmap::rayon::set::ParDifference::fmt", + "indexmap::set::IndexSet::sub", + "indexmap::set::iter::SymmetricDifference::new", + "indexmap::set::iter::Union::new" + ], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::benches::bench::simple_sort", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash", + "truth": [ + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_hash", + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_hash_full" + ], + "found": [ + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_hash", + "indexmap::map::raw_entry_v1::RawEntryBuilder::from_hash_full" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::Core::split_splice", + "truth": [ + "indexmap::map::iter::Splice::new" + ], + "found": [ + "indexmap::map::iter::Splice::new" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::last_entry", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/map/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::inner::extract::ExtractCore::remaining", + "truth": [ + "indexmap::map::iter::ExtractIf::size_hint", + "indexmap::set::iter::ExtractIf::size_hint" + ], + "found": [ + "indexmap::map::iter::ExtractIf::size_hint", + "indexmap::set::iter::ExtractIf::size_hint" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "truth": [ + "indexmap::map::raw_entry_v1::RawEntryMut::or_insert", + "indexmap::map::raw_entry_v1::RawEntryMut::or_insert_with" + ], + "found": [ + "indexmap::map::raw_entry_v1::RawEntryMut::or_insert", + "indexmap::map::raw_entry_v1::RawEntryMut::or_insert_with" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::sort_keys", + "truth": [ + "indexmap::set::IndexSet::sort" + ], + "found": [ + "indexmap::set::IndexSet::sort" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::sort_unstable", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::set::IndexSet::sort", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_sort_unstable", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::set::IndexSet::union", + "truth": [ + "indexmap::rayon::set::ParUnion::fmt", + "indexmap::set::IndexSet::bitor" + ], + "found": [ + "indexmap::rayon::set::ParUnion::fmt", + "indexmap::set::IndexSet::bitor" + ], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::Core::replace_index_unique", + "truth": [ + "indexmap::map::IndexMap::replace_index" + ], + "found": [ + "indexmap::map::IndexMap::replace_index" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_is_disjoint", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/rayon/set.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::map::IndexMap::contains_key", + "truth": [ + "indexmap::set::IndexSet::contains" + ], + "found": [ + "indexmap::set::IndexSet::contains" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::Core::retain_in_order", + "truth": [ + "indexmap::map::IndexMap::retain", + "indexmap::map::mutable::IndexMap::retain2" + ], + "found": [ + "indexmap::map::IndexMap::retain", + "indexmap::map::mutable::IndexMap::retain2" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::entry::Entry::or_insert_with_key", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_difference", + "truth": [ + "indexmap::rayon::set::ParSymmetricDifference::drive_unindexed", + "indexmap::rayon::set::ParUnion::drive_unindexed" + ], + "found": [ + "indexmap::rayon::set::ParSymmetricDifference::drive_unindexed", + "indexmap::rayon::set::ParUnion::drive_unindexed" + ], + "maybe": [], + "import_files": [ + "src/rayon/set.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::inner::Core::shift_insert_unique", + "truth": [ + "indexmap::inner::entry::VacantEntry::shift_insert", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck" + ], + "found": [ + "indexmap::inner::entry::VacantEntry::shift_insert", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_symmetric_difference", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/rayon/set.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::map::slice::Slice::new_mut", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/map/slice.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_is_superset", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/rayon/set.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::util::assert_index_le", + "truth": [ + "indexmap::inner::Core::split_off", + "indexmap::map::IndexMap::insert_before", + "indexmap::map::IndexMap::shift_insert" + ], + "found": [ + "indexmap::inner::Core::split_off", + "indexmap::map::IndexMap::insert_before", + "indexmap::map::IndexMap::shift_insert" + ], + "maybe": [], + "import_files": [ + "src/inner.rs", + "src/map.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::slice::Slice::split_first_mut", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/map/slice.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::util::third", + "truth": [ + "indexmap::map::IndexMap::shift_remove", + "indexmap::map::IndexMap::swap_remove" + ], + "found": [ + "indexmap::map::IndexMap::shift_remove", + "indexmap::map::IndexMap::swap_remove" + ], + "maybe": [], + "import_files": [ + "src/map.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::rayon::map::IndexMap::par_sort_unstable_keys", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_union", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/rayon/set.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck", + "truth": [ + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert" + ], + "found": [ + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::slice::Slice::from_mut_slice", + "truth": [ + "indexmap::map::IndexMap::as_mut_slice", + "indexmap::map::IndexMap::get_range_mut", + "indexmap::map::iter::IntoIter::as_mut_slice", + "indexmap::map::iter::IterMut2::into_slice", + "indexmap::map::iter::IterMut::into_slice", + "indexmap::map::slice::Slice::default", + "indexmap::map::slice::Slice::get_range_mut", + "indexmap::map::slice::Slice::new_mut", + "indexmap::map::slice::Slice::split_at_mut", + "indexmap::map::slice::Slice::split_at_mut_checked", + "indexmap::map::slice::Slice::split_first_mut", + "indexmap::map::slice::Slice::split_last_mut", + "indexmap::map::slice::impl_index" + ], + "found": [ + "indexmap::map::IndexMap::as_mut_slice", + "indexmap::map::IndexMap::get_range_mut", + "indexmap::map::iter::IntoIter::as_mut_slice", + "indexmap::map::iter::IterMut2::into_slice", + "indexmap::map::iter::IterMut::into_slice", + "indexmap::map::slice::Slice::default", + "indexmap::map::slice::Slice::get_range_mut", + "indexmap::map::slice::Slice::new_mut", + "indexmap::map::slice::Slice::split_at_mut", + "indexmap::map::slice::Slice::split_at_mut_checked", + "indexmap::map::slice::Slice::split_first_mut", + "indexmap::map::slice::Slice::split_last_mut" + ], + "maybe": [], + "import_files": [], + "recall": 0.9230769230769231, + "precision": 1.0, + "recall_with_maybe": 0.9230769230769231 + }, + { + "symbol": "indexmap::set::IndexSet::swap_take", + "truth": [ + "indexmap::set::IndexSet::take" + ], + "found": [ + "indexmap::set::IndexSet::take" + ], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "indexmap::map::IndexMap::get_disjoint_indices_mut", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/map/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::set::IndexSet::is_superset", + "truth": [], + "found": [], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": null, + "precision": null, + "recall_with_maybe": null + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_sort", + "skipped": "compiler reported no uses" + }, + { + "symbol": "indexmap::set::IndexSet::intersection", + "truth": [ + "indexmap::rayon::set::ParIntersection::fmt", + "indexmap::set::IndexSet::bitand" + ], + "found": [ + "indexmap::rayon::set::ParIntersection::fmt", + "indexmap::set::IndexSet::bitand" + ], + "maybe": [], + "import_files": [ + "src/set/tests.rs" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "rename": [ + { + "symbol": "indexmap::map::IndexMap::sort_unstable_keys", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::set::IndexSet::is_subset", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::serde::cautious_capacity", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::set::IndexSet::difference", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/inner/entry.rs:82: /// difference if the key type has any distinguishing features outside of `Hash` and `Eq`, like\nsrc/map/raw_entry_v1.rs:387: /// difference if the key type has any distinguishing features outside of `Hash` and `Eq`, like\nsrc/map/raw_entry_v1.rs:396: /// difference if ", + "detail": "" + }, + { + "symbol": "indexmap::benches::bench::simple_sort", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::inner::Core::split_splice", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::inner::extract::ExtractCore::remaining", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/inner/extract.rs:52: // Nothing was extracted, so any remaining items can be left in place.\nsrc/inner/extract.rs:55: // Need to shift the remaining items down.\nsrc/map.rs:328: /// or the iteration short-circuits, then the remaining elements will be retained.\nsrc/", + "detail": "" + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::map::IndexMap::sort_keys", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawVacantEntryMut::insert_hashed_nocheck", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::set::IndexSet::contains", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/map.rs:233: /// Returns true if the map contains no elements.\nsrc/map/disjoint.rs:17: } else if indices[..i].contains(&idx) {\nsrc/map/disjoint.rs:43: } else if indices[..i].contains(&Some(idx)) {\nsrc/map/raw_entry_v1.rs:91: /// so that the map now contains keys which comp", + "detail": "be used if the trait is implemented and in scope\n = note: the following traits define an item `contains`, perhaps you need to implement one of them:\n candidate #1: `Itertools`\n candidate #2: `core::ops::RangeBounds`\nhelp: there is a method `contains_gnx` with a similar name\n |\n382 | .filter(move |&item| set2.contains_gnx(item))\n | ++++\n\nerror: could not compile `indexmap` (lib test) due to 2 previous errors\n" + }, + { + "symbol": "indexmap::util::simplify_range", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_is_subset", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::map::disjoint::get_disjoint_opt_mut", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::set::IndexSet::union", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "LICENSE-APACHE:15: \"Legal Entity\" shall mean the union of the acting entity and all\nsrc/rayon/set.rs:435:/// A parallel iterator producing elements in the union of [`IndexSet`]s.\nsrc/set.rs:1432: /// Returns the set union, cloned into a new set.\nsrc/set/iter.rs:439:/// A lazy iterator producing", + "detail": "" + }, + { + "symbol": "indexmap::util::assert_index_lt", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::util::try_simplify_range", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::inner::Core::shift_insert_unique", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::set::IndexSet::swap_take", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/set/tests.rs:600:fn swap_take() {", + "detail": "" + }, + { + "symbol": "indexmap::inner::Core::replace_index_unique", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::map::IndexMap::contains_key", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "tests/quick.rs:185: assert!(old_key == new_key || !map.contains_key(&old_key));\ntests/quick.rs:218: assert!(!map.contains_key(&old_key));\ntests/quick.rs:280: assert!(keys.iter().all(|key| map.contains_key(key)));\ntests/quick.rs:301: even.iter().all(|k|", + "detail": " ^^^^^^^^^^^^\n |\nhelp: there is a method `contains_key_gnx` with a similar name\n |\n739 | itertools::assert_equal(map.keys(), initial_map.keys().filter(|&k| !remove_map.contains_key_gnx(k)));\n | ++++\n\nFor more information about this error, try `rustc --explain E0599`.\nerror: could not compile `indexmap` (test \"quick\") due to 11 previous errors\n" + }, + { + "symbol": "indexmap::inner::Core::retain_in_order", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_difference", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::inner::Core::get_index_of_raw", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::map::slice::Slice::from_mut_slice", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/map/slice.rs:527: Slice::from_mut_slice(&mut self.as_entries_mut()[range])\nsrc/map/slice.rs:541: Self::from_mut_slice(&mut self.entries[range])", + "detail": "eFull,\n... |\n553 | | (Bound, Bound)\n554 | | );\n | |_- in this macro invocation\n |\n = note: this error originates in the macro `impl_index` (in Nightly builds, run with -Z macro-backtrace for more info)\n\nFor more information about this error, try `rustc --explain E0599`.\nerror: could not compile `indexmap` (lib) due to 14 previous errors\nwarning: build failed, waiting for other jobs to finish...\nerror: could not compile `indexmap` (lib test) due to 14 previous errors\n" + }, + { + "symbol": "indexmap::set::IndexSet::intersection", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "src/rayon/set.rs:339:/// A parallel iterator producing elements in the intersection of [`IndexSet`]s.\nsrc/set.rs:1416: /// Returns the set intersection, cloned into a new set.\nsrc/set/iter.rs:267:/// A lazy iterator producing elements in the intersection of [`IndexSet`]s.", + "detail": "" + }, + { + "symbol": "indexmap::util::third", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "LICENSE-APACHE:115: wherever such third-party notices normally appear. The contents\nLICENSE-APACHE:187: identification within third-party archives.", + "detail": "" + }, + { + "symbol": "indexmap::util::assert_index_le", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::map::IndexMap::get_index_entry", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/map/tests.rs:413:fn get_index_entry() {\ntests/quick.rs:411: map.get_index_entry(from).unwrap().swap_indices(to);\ntests/quick.rs:466: map.get_index_entry(from).unwrap().move_index(to);", + "detail": "| map.get_index_entry(from).unwrap().move_index(to);\n | ^^^^^^^^^^^^^^^\n |\nhelp: there is a method `get_index_entry_gnx` with a similar name\n |\n466 | map.get_index_entry_gnx(from).unwrap().move_index(to);\n | ++++\n\nFor more information about this error, try `rustc --explain E0599`.\nerror: could not compile `indexmap` (test \"quick\") due to 2 previous errors\nwarning: build failed, waiting for other jobs to finish...\n" + }, + { + "symbol": "indexmap::set::IndexSet::symmetric_difference", + "ok": true, + "compiled": true, + "tests_ok": true, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "indexmap::util::slice_eq", + "ok": false, + "compiled": false, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/map/slice.rs:450: slice_eq(self, &other.entries, |t, b| t.0 == b.key && t.1 == b.value)\nsrc/set/slice.rs:297: slice_eq(self, &other.entries, |o, b| *o == b.key)", + "detail": "q(self, &other.entries, |o, b| *o == b.key)\n | ^^^^^^^^------------------------------------------\n | |\n | help: try calling `slice_eq` as a method: `self.slice_eq(&other.entries, |o, b| *o == b.key)`\n\nFor more information about this error, try `rustc --explain E0425`.\nerror: could not compile `indexmap` (lib) due to 2 previous errors\nwarning: build failed, waiting for other jobs to finish...\nerror: could not compile `indexmap` (lib test) due to 2 previous errors\n" + } + ], + "mutants": { + "7": [ + "indexmap::map::IndexMap::sort_unstable_keys", + "indexmap::set::IndexSet::is_subset", + "indexmap::serde::cautious_capacity", + "indexmap::set::IndexSet::difference", + "indexmap::benches::bench::simple_sort", + "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash", + "indexmap::inner::Core::split_splice", + "indexmap::inner::extract::ExtractCore::remaining", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "indexmap::map::IndexMap::sort_keys", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::insert_hashed_nocheck", + "indexmap::set::IndexSet::contains", + "indexmap::util::simplify_range", + "indexmap::rayon::set::IndexSet::par_is_subset", + "indexmap::map::disjoint::get_disjoint_opt_mut", + "indexmap::set::IndexSet::union" + ], + "8": [ + "indexmap::set::IndexSet::union", + "indexmap::inner::Core::replace_index_unique", + "indexmap::map::IndexMap::contains_key", + "indexmap::benches::bench::simple_sort", + "indexmap::inner::Core::retain_in_order", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "indexmap::serde::cautious_capacity", + "indexmap::rayon::set::IndexSet::par_difference", + "indexmap::map::IndexMap::sort_keys", + "indexmap::inner::Core::shift_insert_unique", + "indexmap::set::IndexSet::is_subset", + "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash", + "indexmap::inner::Core::get_index_of_raw", + "indexmap::util::try_simplify_range", + "indexmap::rayon::set::IndexSet::par_is_subset", + "indexmap::map::slice::Slice::from_mut_slice" + ], + "9": [ + "indexmap::util::assert_index_le", + "indexmap::util::third", + "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck", + "indexmap::map::slice::Slice::from_mut_slice", + "indexmap::rayon::set::IndexSet::par_difference", + "indexmap::set::IndexSet::swap_take", + "indexmap::inner::Core::split_splice", + "indexmap::set::IndexSet::intersection", + "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "indexmap::map::IndexMap::sort_unstable_keys", + "indexmap::set::IndexSet::union" + ] + }, + "tests": [ + { + "symbol": "indexmap::map::IndexMap::sort_unstable_keys", + "level": "name", + "truth": 1, + "predicted": 7, + "recall": 1.0, + "precision": 0.14285714285714285, + "top_hits": 1, + "top_n": 7, + "top_precision": 0.14285714285714285, + "top_best": 0.14285714285714285, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::is_subset", + "level": "name", + "truth": 4, + "predicted": 5, + "recall": 0.5, + "precision": 0.4, + "top_hits": 2, + "top_n": 5, + "top_precision": 0.4, + "top_best": 0.4, + "caught": 1.0, + "missed": [ + "from_array", + "ops" + ], + "recall_graph_only": 0.25 + }, + { + "symbol": "indexmap::serde::cautious_capacity", + "skipped": "no test fails when it throws", + "predicted": 0 + }, + { + "symbol": "indexmap::set::IndexSet::difference", + "level": "name", + "truth": 2, + "predicted": 5, + "recall": 0.5, + "precision": 0.2, + "top_hits": 1, + "top_n": 5, + "top_precision": 0.2, + "top_best": 0.2, + "caught": 1.0, + "missed": [ + "ops" + ], + "recall_graph_only": 0.5 + }, + { + "symbol": "indexmap::benches::bench::simple_sort", + "skipped": "no test fails when it throws", + "predicted": 0 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash", + "skipped": "no test fails when it throws", + "predicted": 1 + }, + { + "symbol": "indexmap::inner::Core::split_splice", + "skipped": "no test fails when it throws", + "predicted": 1 + }, + { + "symbol": "indexmap::inner::extract::ExtractCore::remaining", + "level": "name", + "truth": 2, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "extract_if_odd", + "extract_if_odd_limit" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "skipped": "no test fails when it throws", + "predicted": 1 + }, + { + "symbol": "indexmap::map::IndexMap::sort_keys", + "skipped": "no test fails when it throws", + "predicted": 6 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawVacantEntryMut::insert_hashed_nocheck", + "skipped": "no test fails when it throws", + "predicted": 1 + }, + { + "symbol": "indexmap::set::IndexSet::contains", + "level": "name", + "truth": 5, + "predicted": 5, + "recall": 0.6, + "precision": 0.6, + "top_hits": 3, + "top_n": 5, + "top_precision": 0.6, + "top_best": 0.6, + "caught": 1.0, + "missed": [ + "from_array", + "ops" + ], + "recall_graph_only": 0.4 + }, + { + "symbol": "indexmap::util::simplify_range", + "level": "name", + "truth": 6, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "drain", + "drain_bounds", + "drain_full", + "drain_range", + "extract_if_odd", + "extract_if_odd_limit" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_is_subset", + "skipped": "no test fails when it throws", + "predicted": 5 + }, + { + "symbol": "indexmap::map::disjoint::get_disjoint_opt_mut", + "level": "name", + "truth": 8, + "predicted": 9, + "recall": 1.0, + "precision": 0.8888888888888888, + "top_hits": 8, + "top_n": 9, + "top_precision": 0.8888888888888888, + "top_best": 0.8888888888888888, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::union", + "level": "name", + "truth": 2, + "predicted": 5, + "recall": 0.5, + "precision": 0.2, + "top_hits": 1, + "top_n": 5, + "top_precision": 0.2, + "top_best": 0.2, + "caught": 1.0, + "missed": [ + "ops" + ], + "recall_graph_only": 0.5 + }, + { + "symbol": "indexmap::inner::Core::replace_index_unique", + "level": "name", + "truth": 2, + "predicted": 2, + "recall": 0.5, + "precision": 0.5, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "top_best": 0.5, + "caught": 1.0, + "missed": [ + "replace_index" + ], + "recall_graph_only": 0.5 + }, + { + "symbol": "indexmap::map::IndexMap::contains_key", + "level": "name", + "truth": 15, + "predicted": 4, + "recall": 0.26666666666666666, + "precision": 1.0, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "drain_bounds", + "extract_if_odd", + "extract_if_odd_limit", + "from_array", + "iter_comparisons", + "keys_values", + "keys_values_mut", + "ops" + ], + "recall_graph_only": 0.26666666666666666 + }, + { + "symbol": "indexmap::inner::Core::retain_in_order", + "level": "name", + "truth": 2, + "predicted": 2, + "recall": 0.5, + "precision": 0.5, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "top_best": 0.5, + "caught": 1.0, + "missed": [ + "retain_ordered" + ], + "recall_graph_only": 0.5 + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_difference", + "skipped": "no test fails when it throws", + "predicted": 5 + }, + { + "symbol": "indexmap::inner::Core::shift_insert_unique", + "level": "name", + "truth": 6, + "predicted": 1, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 1, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "insert_sorted", + "insert_sorted_by", + "insert_sorted_by_key", + "occupied_entry_shift_insert", + "raw_occupied_entry_shift_insert", + "shift_insert" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "indexmap::inner::Core::get_index_of_raw", + "skipped": "no test fails when it throws", + "predicted": 1 + }, + { + "symbol": "indexmap::util::try_simplify_range", + "level": "name", + "truth": 3, + "predicted": 3, + "recall": 1.0, + "precision": 1.0, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "indexmap::map::slice::Slice::from_mut_slice", + "level": "name", + "truth": 13, + "predicted": 12, + "recall": 0.9230769230769231, + "precision": 1.0, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "slice_index_mut" + ], + "recall_graph_only": 0.9230769230769231 + }, + { + "symbol": "indexmap::util::assert_index_le", + "level": "name", + "truth": 6, + "predicted": 8, + "recall": 1.0, + "precision": 0.75, + "top_hits": 6, + "top_n": 8, + "top_precision": 0.75, + "top_best": 0.75, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "indexmap::util::third", + "level": "name", + "truth": 11, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "drain_full", + "equality", + "insert_remove", + "keys_values", + "keys_values_mut", + "operations_i8", + "operations_string", + "partial_eq_and_eq" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck", + "level": "name", + "truth": 1, + "predicted": 1, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 1, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "raw_occupied_entry_shift_insert" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "indexmap::set::IndexSet::swap_take", + "level": "name", + "truth": 2, + "predicted": 8, + "recall": 1.0, + "precision": 0.25, + "top_hits": 2, + "top_n": 8, + "top_precision": 0.25, + "top_best": 0.25, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "indexmap::set::IndexSet::intersection", + "level": "name", + "truth": 2, + "predicted": 5, + "recall": 0.5, + "precision": 0.2, + "top_hits": 1, + "top_n": 5, + "top_precision": 0.2, + "top_best": 0.2, + "caught": 1.0, + "missed": [ + "ops" + ], + "recall_graph_only": 0.5 + } + ], + "look": [ + { + "symbol": "indexmap::map::IndexMap::sort_unstable_keys", + "look_tokens": 305, + "file_tokens": 16052 + }, + { + "symbol": "indexmap::set::IndexSet::is_subset", + "look_tokens": 263, + "file_tokens": 12371 + }, + { + "symbol": "indexmap::serde::cautious_capacity", + "look_tokens": 263, + "file_tokens": 1111 + }, + { + "symbol": "indexmap::set::IndexSet::difference", + "look_tokens": 295, + "file_tokens": 12371 + }, + { + "symbol": "indexmap::benches::bench::simple_sort", + "look_tokens": 148, + "file_tokens": 4289 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash", + "look_tokens": 197, + "file_tokens": 5897 + }, + { + "symbol": "indexmap::inner::Core::split_splice", + "look_tokens": 262, + "file_tokens": 6263 + }, + { + "symbol": "indexmap::inner::extract::ExtractCore::remaining", + "look_tokens": 111, + "file_tokens": 918 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "look_tokens": 199, + "file_tokens": 5897 + }, + { + "symbol": "indexmap::map::IndexMap::sort_keys", + "look_tokens": 335, + "file_tokens": 16052 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawVacantEntryMut::insert_hashed_nocheck", + "look_tokens": 208, + "file_tokens": 5897 + }, + { + "symbol": "indexmap::set::IndexSet::contains", + "look_tokens": 304, + "file_tokens": 12371 + }, + { + "symbol": "indexmap::util::simplify_range", + "look_tokens": 340, + "file_tokens": 684 + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_is_subset", + "look_tokens": 263, + "file_tokens": 5574 + }, + { + "symbol": "indexmap::map::disjoint::get_disjoint_opt_mut", + "look_tokens": 542, + "file_tokens": 551 + }, + { + "symbol": "indexmap::set::IndexSet::union", + "look_tokens": 280, + "file_tokens": 12371 + }, + { + "symbol": "indexmap::util::assert_index_lt", + "look_tokens": 280, + "file_tokens": 684 + }, + { + "symbol": "indexmap::util::try_simplify_range", + "look_tokens": 325, + "file_tokens": 684 + }, + { + "symbol": "indexmap::inner::Core::shift_insert_unique", + "look_tokens": 420, + "file_tokens": 6263 + }, + { + "symbol": "indexmap::set::IndexSet::swap_take", + "look_tokens": 359, + "file_tokens": 12371 + }, + { + "symbol": "indexmap::inner::Core::replace_index_unique", + "look_tokens": 308, + "file_tokens": 6263 + }, + { + "symbol": "indexmap::map::IndexMap::contains_key", + "look_tokens": 239, + "file_tokens": 16052 + }, + { + "symbol": "indexmap::inner::Core::retain_in_order", + "look_tokens": 206, + "file_tokens": 6263 + }, + { + "symbol": "indexmap::rayon::set::IndexSet::par_difference", + "look_tokens": 321, + "file_tokens": 5574 + }, + { + "symbol": "indexmap::inner::Core::get_index_of_raw", + "look_tokens": 192, + "file_tokens": 6263 + }, + { + "symbol": "indexmap::map::slice::Slice::from_mut_slice", + "look_tokens": 369, + "file_tokens": 6099 + }, + { + "symbol": "indexmap::set::IndexSet::intersection", + "look_tokens": 281, + "file_tokens": 12371 + }, + { + "symbol": "indexmap::util::third", + "look_tokens": 93, + "file_tokens": 684 + }, + { + "symbol": "indexmap::util::assert_index_le", + "look_tokens": 271, + "file_tokens": 684 + }, + { + "symbol": "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck", + "look_tokens": 278, + "file_tokens": 5897 + }, + { + "symbol": "indexmap::map::IndexMap::get_index_entry", + "look_tokens": 298, + "file_tokens": 16052 + }, + { + "symbol": "indexmap::set::IndexSet::symmetric_difference", + "look_tokens": 323, + "file_tokens": 12371 + }, + { + "symbol": "indexmap::util::slice_eq", + "look_tokens": 238, + "file_tokens": 684 + } + ], + "seconds": 10, + "summary": { + "callers_recall": 0.991, + "callers_precision": 1.0, + "callers_checked": 32, + "blind_recall": 0.996, + "blind_checked": 21, + "common_recall": 0.784, + "common_precision": 0.992, + "common_recall_with_maybe": 1.0, + "common_checked": 29, + "rename_ok": 0.848, + "rename_checked": 33, + "tests_recall": 0.515, + "tests_precision": 0.402, + "tests_top10_precision": 0.402, + "tests_top10_best": 0.402, + "tests_caught": 0.737, + "tests_checked": 19, + "look_vs_file": 0.134 + }, + "summary_seeds": { + "7": { + "callers_recall": 0.989, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 9, + "common_recall": 0.859, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 16, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.512, + "tests_precision": 0.304, + "tests_top10_precision": 0.304, + "tests_top10_best": 0.304, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.159 + }, + "8": { + "callers_recall": 0.985, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 9, + "common_recall": 0.9, + "common_precision": 0.978, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.85, + "rename_checked": 20, + "tests_recall": 0.524, + "tests_precision": 0.575, + "tests_top10_precision": 0.575, + "tests_top10_best": 0.575, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.12 + }, + "9": { + "callers_recall": 0.986, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 0.991, + "blind_checked": 9, + "common_recall": 0.636, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 11, + "rename_ok": 0.75, + "rename_checked": 20, + "tests_recall": 0.615, + "tests_precision": 0.318, + "tests_top10_precision": 0.318, + "tests_top10_best": 0.318, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.095 + } + }, + "noise": { + "callers_recall": { + "mean": 0.991, + "functions": 32, + "boot_lo": 0.979, + "boot_hi": 1.0, + "boot_half": 0.011, + "seeds": [ + 0.989, + 0.985, + 0.986 + ], + "seed_sd": 0.002, + "threshold": 0.04 + }, + "callers_precision": { + "mean": 1.0, + "functions": 32, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "blind_recall": { + "mean": 0.996, + "functions": 21, + "boot_lo": 0.989, + "boot_hi": 1.0, + "boot_half": 0.005, + "seeds": [ + 1.0, + 1.0, + 0.991 + ], + "seed_sd": 0.005, + "threshold": 0.05 + }, + "common_recall": { + "mean": 0.784, + "functions": 29, + "boot_lo": 0.664, + "boot_hi": 0.897, + "boot_half": 0.116, + "seeds": [ + 0.859, + 0.9, + 0.636 + ], + "seed_sd": 0.142, + "threshold": 0.12 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 29, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_precision": { + "mean": 0.992, + "functions": 24, + "boot_lo": 0.975, + "boot_hi": 1.0, + "boot_half": 0.013, + "seeds": [ + 1.0, + 0.978, + 1.0 + ], + "seed_sd": 0.013, + "threshold": 0.05 + }, + "rename_ok": { + "mean": 0.848, + "functions": 33, + "boot_lo": 0.727, + "boot_hi": 0.939, + "boot_half": 0.106, + "seeds": [ + 0.95, + 0.85, + 0.75 + ], + "seed_sd": 0.1, + "threshold": 0.11 + }, + "tests_recall": { + "mean": 0.515, + "functions": 19, + "boot_lo": 0.378, + "boot_hi": 0.654, + "boot_half": 0.138, + "seeds": [ + 0.512, + 0.524, + 0.615 + ], + "seed_sd": 0.056, + "threshold": 0.14 + }, + "tests_precision": { + "mean": 0.402, + "functions": 19, + "boot_lo": 0.268, + "boot_hi": 0.534, + "boot_half": 0.133, + "seeds": [ + 0.304, + 0.575, + 0.318 + ], + "seed_sd": 0.153, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.402, + "functions": 19, + "boot_lo": 0.268, + "boot_hi": 0.534, + "boot_half": 0.133, + "seeds": [ + 0.304, + 0.575, + 0.318 + ], + "seed_sd": 0.153, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.402, + "functions": 19, + "boot_lo": 0.268, + "boot_hi": 0.534, + "boot_half": 0.133, + "seeds": [ + 0.304, + 0.575, + 0.318 + ], + "seed_sd": 0.153, + "threshold": 0.14 + }, + "tests_caught": { + "mean": 0.737, + "functions": 19, + "boot_lo": 0.579, + "boot_hi": 0.895, + "boot_half": 0.158, + "seeds": [ + 0.75, + 0.875, + 0.75 + ], + "seed_sd": 0.072, + "threshold": 0.16 + }, + "look_vs_file": { + "mean": 0.134, + "functions": 33, + "boot_lo": 0.079, + "boot_hi": 0.198, + "boot_half": 0.059, + "seeds": [ + 0.159, + 0.12, + 0.095 + ], + "seed_sd": 0.032, + "threshold": 0.06 + } + } + } +] \ No newline at end of file diff --git a/eval/results/latest.md b/eval/results/latest.md new file mode 100644 index 0000000..93257c3 --- /dev/null +++ b/eval/results/latest.md @@ -0,0 +1,49 @@ +| repo | lang | symbols | index s | callers recall | callers precision | callers recall, picked blind | shared names: recall (+maybe) | shared names: precision | rename ok | tests recall | tests precision | top-10 fail (best possible) | caught by top-10 | look / file | +|---|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:| +| cobra | go | 288 | 0.0 | 100% ±3 (45) | 99% ±3 | 100% ±4 (31) | 100% ±100 (100% ±100) (1) | 100% ±100 | 91% ±7 (46) | 89% ±10 (21) | 36% ±13 | 44% ±14 (78% ±12) | 81% ±15 | 7% ±3 | +| chi | go | 351 | 0.1 | 100% ±4 (26) | 97% ±5 | 100% ±12 (9) | 70% ±20 (100% ±10) (10) | 100% ±15 | 94% ±6 (35) | 66% ±15 (16) | 61% ±17 | 67% ±16 (71% ±16) | 88% ±13 | 22% ±7 | +| click | python | 761 | 0.2 | — | — | — | — | — | 90% ±7 (51) | 31% ±13 (23) | 48% ±15 | 53% ±15 (63% ±14) | 78% ±14 | 8% ±2 | +| sqlparse | python | 287 | 0.0 | — | — | — | — | — | 90% ±8 (42) | 42% ±14 (20) | 59% ±12 | 52% ±14 (80% ±14) | 85% ±13 | 22% ±5 | +| zustand | typescript | 175 | 0.1 | 100% ±100 (1) | 100% ±100 | 100% ±100 (1) | — | — | 100% ±100 (1) | 50% ±100 (1) | 100% ±100 | 100% ±100 (100% ±100) | 100% ±100 | 13% ±0 | +| yaml | typescript | 440 | 0.1 | 100% ±3 (38) | 100% ±3 | 100% ±4 (33) | 65% ±25 (90% ±10) (10) | 100% ±15 | 85% ±9 (39) | 18% ±10 (21) | 31% ±15 | 32% ±15 (35% ±17) | 38% ±20 | 58% ±12 | +| jsoup | java | 2663 | 3.0 | 100% ±3 (49) | 100% ±3 | 97% ±5 (35) | 87% ±8 (96% ±5) (40) | 99% ±3 | 96% ±6 (49) | 26% ±13 (21) | 70% ±14 | 69% ±14 (77% ±13) | 90% ±12 | 17% ±6 | +| json-java | java | 542 | 0.2 | 100% ±3 (36) | 100% ±3 | 100% ±4 (28) | 100% ±7 (100% ±7) (16) | 100% ±7 | 97% ±5 (37) | 70% ±15 (22) | 52% ±14 | 66% ±11 (82% ±11) | 100% ±5 | 10% ±3 | +| semver | rust | 113 | 0.0 | 100% ±20 (5) | 100% ±20 | 100% ±20 (5) | 100% ±50 (100% ±50) (2) | 100% ±50 | 100% ±20 (5) | 61% ±34 (3) | 64% ±34 | 67% ±34 (67% ±34) | 67% ±34 | 15% ±9 | +| indexmap | rust | 1026 | 0.1 | 99% ±4 (32) | 100% ±4 | 100% ±5 (21) | 78% ±12 (100% ±4) (29) | 99% ±5 | 85% ±11 (33) | 52% ±14 (19) | 40% ±14 | 40% ±14 (40% ±14) | 74% ±16 | 13% ±6 | + +`77% ±6 (20)`: the mean over 20 functions; a change smaller than ±6 points is noise. The ± is half the 90% interval +the number stays in when the functions are drawn again (bootstrap), and never less than what one function weighs. + +| per language | all | go | python | typescript | java | rust | +|---|---:|---:|---:|---:|---:|---:| +| callers recall | 100% ±1 (232) | 100% ±2 (71) | — | 100% ±3 (39) | 100% ±2 (85) | 99% ±3 (37) | +| callers precision | 99% ±1 (232) | 98% ±2 (71) | — | 100% ±3 (39) | 100% ±2 (85) | 100% ±3 (37) | +| callers recall, picked blind | 99% ±1 (163) | 100% ±3 (40) | — | 100% ±3 (34) | 98% ±3 (63) | 100% ±4 (26) | +| shared names: recall | 83% ±6 (108) | 73% ±23 (11) | — | 65% ±25 (10) | 90% ±6 (56) | 80% ±11 (31) | +| shared names: recall with maybe | 98% ±2 (108) | 100% ±10 (11) | — | 90% ±10 (10) | 97% ±3 (56) | 100% ±4 (31) | +| shared names: precision | 100% ±2 (93) | 100% ±13 (8) | — | 100% ±15 (7) | 100% ±2 (52) | 99% ±4 (26) | +| rename ok (tests pass) | 91% ±3 (338) | 93% ±5 (81) | 90% ±5 (93) | 85% ±10 (40) | 96% ±3 (86) | 87% ±10 (38) | +| tests recall | 49% ±6 (167) | 79% ±9 (37) | 36% ±10 (43) | 19% ±10 (22) | 49% ±12 (43) | 53% ±14 (22) | +| tests precision | 50% ±6 (167) | 47% ±11 (37) | 54% ±10 (43) | 34% ±15 (22) | 61% ±10 (43) | 43% ±14 (22) | +| top-10 that fail | 53% ±6 (167) | 54% ±11 (37) | 52% ±10 (43) | 35% ±16 (22) | 67% ±9 (43) | 44% ±14 (22) | +| … best possible order | 66% ±6 (167) | 75% ±10 (37) | 71% ±10 (43) | 38% ±17 (22) | 80% ±8 (43) | 44% ±14 (22) | +| caught by the top 10 | 79% ±6 (167) | 84% ±10 (37) | 81% ±10 (43) | 41% ±19 (22) | 95% ±6 (43) | 73% ±14 (22) | +| look / file | 19% ±3 (338) | 14% ±4 (81) | 14% ±3 (93) | 56% ±12 (40) | 14% ±4 (86) | 14% ±6 (38) | + +| all repos | mean | functions | 90% interval | on each seed | 2 × SD of the seeds | threshold | +|---|---:|---:|---:|---:|---:|---:| +| callers recall | 99.8% | 232 | 100–100% | 100 / 100 / 100 | 0.2 | ±1 | +| callers precision | 99.4% | 232 | 99–100% | 99 / 100 / 99 | 1.0 | ±1 | +| callers recall, picked blind | 99.2% | 163 | 98–100% | 100 / 98 / 100 | 1.6 | ±1 | +| shared names: recall | 83.2% | 108 | 78–89% | 85 / 83 / 80 | 5.0 | ±6 | +| shared names: recall with maybe | 97.6% | 108 | 96–99% | 99 / 97 / 97 | 1.8 | ±2 | +| shared names: precision | 99.5% | 93 | 99–100% | 100 / 100 / 99 | 0.6 | ±2 | +| rename ok (tests pass) | 91.4% | 338 | 89–94% | 92 / 93 / 90 | 3.6 | ±3 | +| tests recall | 48.9% | 167 | 44–55% | 45 / 53 / 54 | 10.0 | ±6 | +| tests precision | 50.1% | 167 | 45–55% | 48 / 51 / 56 | 7.2 | ±6 | +| top-10 that fail | 53.2% | 167 | 48–58% | 50 / 57 / 58 | 8.2 | ±6 | +| … best possible order | 66.3% | 167 | 61–71% | 63 / 68 / 69 | 6.4 | ±6 | +| caught by the top 10 | 79.0% | 167 | 74–84% | 76 / 79 / 84 | 7.4 | ±6 | +| look / file | 18.9% | 338 | 16–21% | 20 / 19 / 18 | 2.6 | ±3 | + +Sample `n20-m8-seeds7,8,9`: 20 functions and 8 mutants per repo and seed, seeds 7, 8, 9. Run time: 4 min 8 s; of the compilers' and test suites' answers 1240 came from the cache, 0 were asked now. diff --git a/eval/results/latest.noise.json b/eval/results/latest.noise.json new file mode 100644 index 0000000..1588d3c --- /dev/null +++ b/eval/results/latest.noise.json @@ -0,0 +1,1036 @@ +{ + "config": "n20-m8-seeds7,8,9", + "seconds": 248, + "truth": { + "cached": 1240, + "asked": 0 + }, + "scopes": { + "all": { + "callers_recall": { + "mean": 0.998, + "functions": 232, + "boot_lo": 0.996, + "boot_hi": 1.0, + "boot_half": 0.002, + "seeds": [ + 0.998, + 0.996, + 0.996 + ], + "seed_sd": 0.001, + "threshold": 0.01 + }, + "callers_precision": { + "mean": 0.994, + "functions": 232, + "boot_lo": 0.987, + "boot_hi": 0.999, + "boot_half": 0.006, + "seeds": [ + 0.989, + 0.998, + 0.992 + ], + "seed_sd": 0.005, + "threshold": 0.01 + }, + "blind_recall": { + "mean": 0.992, + "functions": 163, + "boot_lo": 0.98, + "boot_hi": 1.0, + "boot_half": 0.01, + "seeds": [ + 1.0, + 0.985, + 0.996 + ], + "seed_sd": 0.008, + "threshold": 0.01 + }, + "common_recall": { + "mean": 0.832, + "functions": 108, + "boot_lo": 0.778, + "boot_hi": 0.886, + "boot_half": 0.054, + "seeds": [ + 0.85, + 0.828, + 0.8 + ], + "seed_sd": 0.025, + "threshold": 0.06 + }, + "common_recall_with_maybe": { + "mean": 0.976, + "functions": 108, + "boot_lo": 0.956, + "boot_hi": 0.993, + "boot_half": 0.019, + "seeds": [ + 0.988, + 0.972, + 0.973 + ], + "seed_sd": 0.009, + "threshold": 0.02 + }, + "common_precision": { + "mean": 0.995, + "functions": 93, + "boot_lo": 0.988, + "boot_hi": 1.0, + "boot_half": 0.006, + "seeds": [ + 1.0, + 0.996, + 0.994 + ], + "seed_sd": 0.003, + "threshold": 0.02 + }, + "rename_ok": { + "mean": 0.914, + "functions": 338, + "boot_lo": 0.891, + "boot_hi": 0.938, + "boot_half": 0.024, + "seeds": [ + 0.922, + 0.934, + 0.898 + ], + "seed_sd": 0.018, + "threshold": 0.03 + }, + "tests_recall": { + "mean": 0.489, + "functions": 167, + "boot_lo": 0.436, + "boot_hi": 0.546, + "boot_half": 0.055, + "seeds": [ + 0.451, + 0.532, + 0.542 + ], + "seed_sd": 0.05, + "threshold": 0.06 + }, + "tests_precision": { + "mean": 0.501, + "functions": 167, + "boot_lo": 0.45, + "boot_hi": 0.552, + "boot_half": 0.051, + "seeds": [ + 0.485, + 0.512, + 0.557 + ], + "seed_sd": 0.036, + "threshold": 0.06 + }, + "tests_top10_precision": { + "mean": 0.532, + "functions": 167, + "boot_lo": 0.48, + "boot_hi": 0.582, + "boot_half": 0.051, + "seeds": [ + 0.504, + 0.566, + 0.581 + ], + "seed_sd": 0.041, + "threshold": 0.06 + }, + "tests_top10_best": { + "mean": 0.663, + "functions": 167, + "boot_lo": 0.608, + "boot_hi": 0.714, + "boot_half": 0.053, + "seeds": [ + 0.63, + 0.68, + 0.689 + ], + "seed_sd": 0.032, + "threshold": 0.06 + }, + "tests_caught": { + "mean": 0.79, + "functions": 167, + "boot_lo": 0.737, + "boot_hi": 0.838, + "boot_half": 0.051, + "seeds": [ + 0.765, + 0.794, + 0.838 + ], + "seed_sd": 0.037, + "threshold": 0.06 + }, + "look_vs_file": { + "mean": 0.189, + "functions": 338, + "boot_lo": 0.165, + "boot_hi": 0.213, + "boot_half": 0.024, + "seeds": [ + 0.205, + 0.191, + 0.179 + ], + "seed_sd": 0.013, + "threshold": 0.03 + } + }, + "go": { + "callers_recall": { + "mean": 1.0, + "functions": 71, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.02 + }, + "callers_precision": { + "mean": 0.982, + "functions": 71, + "boot_lo": 0.961, + "boot_hi": 0.996, + "boot_half": 0.018, + "seeds": [ + 0.964, + 1.0, + 0.978 + ], + "seed_sd": 0.018, + "threshold": 0.02 + }, + "blind_recall": { + "mean": 1.0, + "functions": 40, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "common_recall": { + "mean": 0.727, + "functions": 11, + "boot_lo": 0.455, + "boot_hi": 0.909, + "boot_half": 0.227, + "seeds": [ + 0.727, + 0.727, + 0.727 + ], + "seed_sd": 0.0, + "threshold": 0.23 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 11, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.1 + }, + "common_precision": { + "mean": 1.0, + "functions": 8, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.13 + }, + "rename_ok": { + "mean": 0.926, + "functions": 81, + "boot_lo": 0.877, + "boot_hi": 0.975, + "boot_half": 0.049, + "seeds": [ + 0.95, + 0.975, + 0.875 + ], + "seed_sd": 0.052, + "threshold": 0.05 + }, + "tests_recall": { + "mean": 0.793, + "functions": 37, + "boot_lo": 0.702, + "boot_hi": 0.879, + "boot_half": 0.089, + "seeds": [ + 0.713, + 0.823, + 0.771 + ], + "seed_sd": 0.055, + "threshold": 0.09 + }, + "tests_precision": { + "mean": 0.471, + "functions": 37, + "boot_lo": 0.364, + "boot_hi": 0.571, + "boot_half": 0.104, + "seeds": [ + 0.563, + 0.423, + 0.507 + ], + "seed_sd": 0.07, + "threshold": 0.11 + }, + "tests_top10_precision": { + "mean": 0.54, + "functions": 37, + "boot_lo": 0.434, + "boot_hi": 0.643, + "boot_half": 0.105, + "seeds": [ + 0.593, + 0.505, + 0.579 + ], + "seed_sd": 0.047, + "threshold": 0.11 + }, + "tests_top10_best": { + "mean": 0.753, + "functions": 37, + "boot_lo": 0.655, + "boot_hi": 0.845, + "boot_half": 0.095, + "seeds": [ + 0.787, + 0.711, + 0.716 + ], + "seed_sd": 0.042, + "threshold": 0.1 + }, + "tests_caught": { + "mean": 0.838, + "functions": 37, + "boot_lo": 0.73, + "boot_hi": 0.919, + "boot_half": 0.095, + "seeds": [ + 0.75, + 0.75, + 1.0 + ], + "seed_sd": 0.144, + "threshold": 0.1 + }, + "look_vs_file": { + "mean": 0.135, + "functions": 81, + "boot_lo": 0.1, + "boot_hi": 0.172, + "boot_half": 0.036, + "seeds": [ + 0.156, + 0.169, + 0.135 + ], + "seed_sd": 0.017, + "threshold": 0.04 + } + }, + "python": { + "callers_recall": null, + "callers_precision": null, + "blind_recall": null, + "common_recall": null, + "common_recall_with_maybe": null, + "common_precision": null, + "rename_ok": { + "mean": 0.903, + "functions": 93, + "boot_lo": 0.849, + "boot_hi": 0.946, + "boot_half": 0.048, + "seeds": [ + 0.9, + 0.9, + 0.925 + ], + "seed_sd": 0.014, + "threshold": 0.05 + }, + "tests_recall": { + "mean": 0.359, + "functions": 43, + "boot_lo": 0.264, + "boot_hi": 0.452, + "boot_half": 0.094, + "seeds": [ + 0.312, + 0.328, + 0.523 + ], + "seed_sd": 0.117, + "threshold": 0.1 + }, + "tests_precision": { + "mean": 0.535, + "functions": 43, + "boot_lo": 0.44, + "boot_hi": 0.624, + "boot_half": 0.092, + "seeds": [ + 0.417, + 0.592, + 0.662 + ], + "seed_sd": 0.126, + "threshold": 0.1 + }, + "tests_top10_precision": { + "mean": 0.525, + "functions": 43, + "boot_lo": 0.43, + "boot_hi": 0.616, + "boot_half": 0.093, + "seeds": [ + 0.419, + 0.593, + 0.656 + ], + "seed_sd": 0.123, + "threshold": 0.1 + }, + "tests_top10_best": { + "mean": 0.709, + "functions": 43, + "boot_lo": 0.607, + "boot_hi": 0.807, + "boot_half": 0.1, + "seeds": [ + 0.656, + 0.743, + 0.774 + ], + "seed_sd": 0.061, + "threshold": 0.1 + }, + "tests_caught": { + "mean": 0.814, + "functions": 43, + "boot_lo": 0.721, + "boot_hi": 0.907, + "boot_half": 0.093, + "seeds": [ + 0.812, + 0.875, + 0.812 + ], + "seed_sd": 0.036, + "threshold": 0.1 + }, + "look_vs_file": { + "mean": 0.143, + "functions": 93, + "boot_lo": 0.116, + "boot_hi": 0.173, + "boot_half": 0.028, + "seeds": [ + 0.139, + 0.145, + 0.159 + ], + "seed_sd": 0.01, + "threshold": 0.03 + } + }, + "typescript": { + "callers_recall": { + "mean": 1.0, + "functions": 39, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 1.0, + "functions": 39, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 1.0, + "functions": 34, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "common_recall": { + "mean": 0.65, + "functions": 10, + "boot_lo": 0.4, + "boot_hi": 0.9, + "boot_half": 0.25, + "seeds": [ + 0.688, + 0.688, + 0.688 + ], + "seed_sd": 0.0, + "threshold": 0.25 + }, + "common_recall_with_maybe": { + "mean": 0.9, + "functions": 10, + "boot_lo": 0.8, + "boot_hi": 1.0, + "boot_half": 0.1, + "seeds": [ + 0.938, + 0.938, + 0.875 + ], + "seed_sd": 0.036, + "threshold": 0.1 + }, + "common_precision": { + "mean": 1.0, + "functions": 7, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.15 + }, + "rename_ok": { + "mean": 0.85, + "functions": 40, + "boot_lo": 0.75, + "boot_hi": 0.95, + "boot_half": 0.1, + "seeds": [ + 0.857, + 0.905, + 0.857 + ], + "seed_sd": 0.027, + "threshold": 0.1 + }, + "tests_recall": { + "mean": 0.194, + "functions": 22, + "boot_lo": 0.105, + "boot_hi": 0.287, + "boot_half": 0.091, + "seeds": [ + 0.153, + 0.243, + 0.196 + ], + "seed_sd": 0.045, + "threshold": 0.1 + }, + "tests_precision": { + "mean": 0.34, + "functions": 22, + "boot_lo": 0.191, + "boot_hi": 0.484, + "boot_half": 0.147, + "seeds": [ + 0.372, + 0.413, + 0.379 + ], + "seed_sd": 0.022, + "threshold": 0.15 + }, + "tests_top10_precision": { + "mean": 0.35, + "functions": 22, + "boot_lo": 0.195, + "boot_hi": 0.5, + "boot_half": 0.152, + "seeds": [ + 0.378, + 0.422, + 0.389 + ], + "seed_sd": 0.023, + "threshold": 0.16 + }, + "tests_top10_best": { + "mean": 0.382, + "functions": 22, + "boot_lo": 0.218, + "boot_hi": 0.541, + "boot_half": 0.161, + "seeds": [ + 0.389, + 0.444, + 0.433 + ], + "seed_sd": 0.029, + "threshold": 0.17 + }, + "tests_caught": { + "mean": 0.409, + "functions": 22, + "boot_lo": 0.227, + "boot_hi": 0.591, + "boot_half": 0.182, + "seeds": [ + 0.444, + 0.444, + 0.444 + ], + "seed_sd": 0.0, + "threshold": 0.19 + }, + "look_vs_file": { + "mean": 0.565, + "functions": 40, + "boot_lo": 0.449, + "boot_hi": 0.688, + "boot_half": 0.12, + "seeds": [ + 0.6, + 0.513, + 0.492 + ], + "seed_sd": 0.057, + "threshold": 0.12 + } + }, + "java": { + "callers_recall": { + "mean": 0.998, + "functions": 85, + "boot_lo": 0.993, + "boot_hi": 1.0, + "boot_half": 0.004, + "seeds": [ + 1.0, + 0.995, + 0.995 + ], + "seed_sd": 0.003, + "threshold": 0.02 + }, + "callers_precision": { + "mean": 0.998, + "functions": 85, + "boot_lo": 0.993, + "boot_hi": 1.0, + "boot_half": 0.004, + "seeds": [ + 1.0, + 0.995, + 0.995 + ], + "seed_sd": 0.003, + "threshold": 0.02 + }, + "blind_recall": { + "mean": 0.981, + "functions": 63, + "boot_lo": 0.949, + "boot_hi": 1.0, + "boot_half": 0.025, + "seeds": [ + 1.0, + 0.956, + 0.993 + ], + "seed_sd": 0.024, + "threshold": 0.03 + }, + "common_recall": { + "mean": 0.904, + "functions": 56, + "boot_lo": 0.845, + "boot_hi": 0.958, + "boot_half": 0.056, + "seeds": [ + 0.932, + 0.878, + 0.924 + ], + "seed_sd": 0.029, + "threshold": 0.06 + }, + "common_recall_with_maybe": { + "mean": 0.972, + "functions": 56, + "boot_lo": 0.938, + "boot_hi": 0.996, + "boot_half": 0.029, + "seeds": [ + 0.991, + 0.96, + 0.977 + ], + "seed_sd": 0.016, + "threshold": 0.03 + }, + "common_precision": { + "mean": 0.995, + "functions": 52, + "boot_lo": 0.984, + "boot_hi": 1.0, + "boot_half": 0.008, + "seeds": [ + 1.0, + 1.0, + 0.988 + ], + "seed_sd": 0.007, + "threshold": 0.02 + }, + "rename_ok": { + "mean": 0.965, + "functions": 86, + "boot_lo": 0.93, + "boot_hi": 0.988, + "boot_half": 0.029, + "seeds": [ + 0.925, + 0.975, + 0.975 + ], + "seed_sd": 0.029, + "threshold": 0.03 + }, + "tests_recall": { + "mean": 0.489, + "functions": 43, + "boot_lo": 0.376, + "boot_hi": 0.599, + "boot_half": 0.112, + "seeds": [ + 0.433, + 0.597, + 0.476 + ], + "seed_sd": 0.085, + "threshold": 0.12 + }, + "tests_precision": { + "mean": 0.611, + "functions": 43, + "boot_lo": 0.514, + "boot_hi": 0.71, + "boot_half": 0.098, + "seeds": [ + 0.601, + 0.52, + 0.706 + ], + "seed_sd": 0.093, + "threshold": 0.1 + }, + "tests_top10_precision": { + "mean": 0.673, + "functions": 43, + "boot_lo": 0.589, + "boot_hi": 0.759, + "boot_half": 0.085, + "seeds": [ + 0.639, + 0.656, + 0.733 + ], + "seed_sd": 0.05, + "threshold": 0.09 + }, + "tests_top10_best": { + "mean": 0.798, + "functions": 43, + "boot_lo": 0.718, + "boot_hi": 0.877, + "boot_half": 0.08, + "seeds": [ + 0.739, + 0.775, + 0.908 + ], + "seed_sd": 0.089, + "threshold": 0.08 + }, + "tests_caught": { + "mean": 0.953, + "functions": 43, + "boot_lo": 0.884, + "boot_hi": 1.0, + "boot_half": 0.058, + "seeds": [ + 0.938, + 0.938, + 1.0 + ], + "seed_sd": 0.036, + "threshold": 0.06 + }, + "look_vs_file": { + "mean": 0.138, + "functions": 86, + "boot_lo": 0.109, + "boot_hi": 0.17, + "boot_half": 0.03, + "seeds": [ + 0.143, + 0.129, + 0.125 + ], + "seed_sd": 0.01, + "threshold": 0.04 + } + }, + "rust": { + "callers_recall": { + "mean": 0.993, + "functions": 37, + "boot_lo": 0.982, + "boot_hi": 1.0, + "boot_half": 0.009, + "seeds": [ + 0.992, + 0.988, + 0.989 + ], + "seed_sd": 0.002, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 1.0, + "functions": 37, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 0.997, + "functions": 26, + "boot_lo": 0.991, + "boot_hi": 1.0, + "boot_half": 0.004, + "seeds": [ + 1.0, + 1.0, + 0.995 + ], + "seed_sd": 0.003, + "threshold": 0.04 + }, + "common_recall": { + "mean": 0.798, + "functions": 31, + "boot_lo": 0.685, + "boot_hi": 0.903, + "boot_half": 0.109, + "seeds": [ + 0.875, + 0.909, + 0.692 + ], + "seed_sd": 0.117, + "threshold": 0.11 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 31, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_precision": { + "mean": 0.992, + "functions": 26, + "boot_lo": 0.977, + "boot_hi": 1.0, + "boot_half": 0.012, + "seeds": [ + 1.0, + 0.98, + 1.0 + ], + "seed_sd": 0.012, + "threshold": 0.04 + }, + "rename_ok": { + "mean": 0.868, + "functions": 38, + "boot_lo": 0.763, + "boot_hi": 0.947, + "boot_half": 0.092, + "seeds": [ + 0.96, + 0.88, + 0.8 + ], + "seed_sd": 0.08, + "threshold": 0.1 + }, + "tests_recall": { + "mean": 0.528, + "functions": 22, + "boot_lo": 0.392, + "boot_hi": 0.667, + "boot_half": 0.137, + "seeds": [ + 0.539, + 0.548, + 0.614 + ], + "seed_sd": 0.041, + "threshold": 0.14 + }, + "tests_precision": { + "mean": 0.434, + "functions": 22, + "boot_lo": 0.304, + "boot_hi": 0.572, + "boot_half": 0.134, + "seeds": [ + 0.395, + 0.592, + 0.405 + ], + "seed_sd": 0.111, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.438, + "functions": 22, + "boot_lo": 0.305, + "boot_hi": 0.576, + "boot_half": 0.136, + "seeds": [ + 0.403, + 0.6, + 0.413 + ], + "seed_sd": 0.111, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.438, + "functions": 22, + "boot_lo": 0.305, + "boot_hi": 0.576, + "boot_half": 0.136, + "seeds": [ + 0.403, + 0.6, + 0.413 + ], + "seed_sd": 0.111, + "threshold": 0.14 + }, + "tests_caught": { + "mean": 0.727, + "functions": 22, + "boot_lo": 0.591, + "boot_hi": 0.864, + "boot_half": 0.136, + "seeds": [ + 0.727, + 0.818, + 0.727 + ], + "seed_sd": 0.052, + "threshold": 0.14 + }, + "look_vs_file": { + "mean": 0.136, + "functions": 38, + "boot_lo": 0.087, + "boot_hi": 0.193, + "boot_half": 0.053, + "seeds": [ + 0.157, + 0.126, + 0.106 + ], + "seed_sd": 0.026, + "threshold": 0.06 + } + } + } +} \ No newline at end of file diff --git a/eval/results/learn-tests-chi.json b/eval/results/learn-tests-chi.json new file mode 100644 index 0000000..b1c051c --- /dev/null +++ b/eval/results/learn-tests-chi.json @@ -0,0 +1,1458 @@ +{ + "repo": "chi", + "lang": "go", + "commit": "c64ed7d6635f", + "seed": 7, + "gitnext_commit": "08e599c", + "functions": [ + { + "group": "pick", + "symbol": "_examples::fileserver::FileServer", + "file": "_examples/fileserver/main.go", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "_examples::rest::ErrInvalidRequest", + "file": "_examples/rest/main.go", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "_examples::rest::NewArticleListResponse", + "file": "_examples/rest/main.go", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "_examples::rest::NewUserPayloadResponse", + "file": "_examples/rest/main.go", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "main::Chain", + "file": "chain.go", + "truth": 11, + "truth_doctests": 0, + "predicted_gitnext": 2, + "predicted_coverage": 12, + "missed_by_coverage": [], + "covered_not_failing": [ + "TestMountingSelf" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 1, + "top_coverage": [ + "TestMountingSelf", + "TestRouterFromMuxWith", + "TestMuxMiddlewareStack", + "TestWalkInlineMiddlewaresAcrossSubrouter", + "TestMuxRouteGroups", + "TestMuxWith", + "TestWalkMiddlewaresAcrossGroupAndRoute", + "TestWalker", + "TestNestedGroups", + "TestMuxComplicatedNotFound" + ], + "score": { + "gitnext": { + "recall": 0.18181818181818182, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9166666666666666, + "predicted": 12, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9166666666666666, + "predicted": 12, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Middlewares::HandlerFunc", + "file": "chain.go", + "truth": 1, + "truth_doctests": 0, + "predicted_gitnext": 0, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestMuxNestedNotFound" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Mux::MethodNotAllowedHandler", + "file": "mux.go", + "truth": 4, + "truth_doctests": 0, + "predicted_gitnext": 41, + "predicted_coverage": 4, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestMethodNotAllowed", + "TestQueryHTTPMethod", + "TestMuxNestedMethodNotAllowed", + "TestMuxBasic" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.0975609756097561, + "predicted": 41, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.0975609756097561, + "predicted": 41, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Mux::NotFoundHandler", + "file": "mux.go", + "truth": 14, + "truth_doctests": 0, + "predicted_gitnext": 43, + "predicted_coverage": 14, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestMuxEmptyRoutes", + "TestMuxPlain", + "TestServeHTTPExistingContext", + "TestMuxMissingParams", + "TestStripPrefix", + "TestMuxTrailingSlash", + "TestSupressNotFoundMount", + "TestMuxComplicatedNotFound", + "TestGetHead", + "TestMuxBig" + ], + "score": { + "gitnext": { + "recall": 0.6428571428571429, + "precision": 0.20930232558139536, + "predicted": 43, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 14, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.2916666666666667, + "predicted": 48, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::NewMux", + "file": "mux.go", + "truth": 101, + "truth_doctests": 0, + "predicted_gitnext": 104, + "predicted_coverage": 106, + "missed_by_coverage": [], + "covered_not_failing": [ + "TestMiddlewarePanicOnLateUse", + "TestMountingExistingPath", + "TestMountingSelf", + "TestMuxWildcardRoute", + "TestMuxWildcardRouteCheckTwo" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 5, + "top_coverage": [ + "TestMuxMatch_DoesNotHaveBasePath", + "TestMuxWildcardRoute", + "TestMuxWildcardRouteCheckTwo", + "TestMiddlewarePanicOnLateUse", + "TestMountingExistingPath", + "TestHeartbeat", + "TestNew", + "TestMountingSelf", + "TestMuxEmptyRoutes", + "TestMuxMatch_HasBasePath" + ], + "score": { + "gitnext": { + "recall": 0.9801980198019802, + "precision": 0.9519230769230769, + "predicted": 104, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9528301886792453, + "predicted": 106, + "top_hits": 5, + "top_n": 10, + "top_precision": 0.5, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9528301886792453, + "predicted": 106, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::RouteContext", + "file": "context.go", + "truth": 31, + "truth_doctests": 0, + "predicted_gitnext": 27, + "predicted_coverage": 31, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestRedirectSlashes_PreventBackslashRelativeOpenRedirect", + "TestStripSlashesWithNilContext", + "TestSingleHandler", + "TestMuxRegexp2", + "TestCleanPath", + "TestEscapedURLParams", + "TestMuxEmptyParams", + "TestPattern", + "TestSupressNotFoundRoutePattern", + "TestMuxRegexp" + ], + "score": { + "gitnext": { + "recall": 0.7419354838709677, + "precision": 0.8518518518518519, + "predicted": 27, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 31, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8857142857142857, + "predicted": 35, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::URLParamFromCtx", + "file": "context.go", + "truth": 20, + "truth_doctests": 0, + "predicted_gitnext": 23, + "predicted_coverage": 20, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestSingleHandler", + "TestMuxRegexp2", + "TestEscapedURLParams", + "TestMuxEmptyParams", + "TestMuxRegexp", + "TestMuxMissingParams", + "TestMuxMounts", + "TestMuxSubroutesBasic", + "TestStripPrefix", + "TestMuxSubrouterWildcardParam" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.8695652173913043, + "predicted": 23, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8695652173913043, + "predicted": 23, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Walk", + "file": "tree.go", + "truth": 5, + "truth_doctests": 0, + "predicted_gitnext": 5, + "predicted_coverage": 5, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestWalkRouteWithHandlerAndSubrouter", + "TestWalkInlineMiddlewaresAcrossSubrouter", + "TestWalkMiddlewaresAcrossGroupAndRoute", + "TestWalker", + "TestCustomHTTPMethod" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::endpoints::Value", + "file": "tree.go", + "truth": 105, + "truth_doctests": 0, + "predicted_gitnext": 43, + "predicted_coverage": 108, + "missed_by_coverage": [], + "covered_not_failing": [ + "TestMiddlewarePanicOnLateUse", + "TestMountingExistingPath", + "TestMountingSelf" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 3, + "top_coverage": [ + "TestTreeFindPattern", + "TestMiddlewarePanicOnLateUse", + "TestTreeRegexMatchWholeParam", + "TestTreeRegexp", + "TestTreeRegexpRecursive", + "TestTreeMoar", + "TestMountingExistingPath", + "TestHeartbeat", + "TestNew", + "TestMountingSelf" + ], + "score": { + "gitnext": { + "recall": 0.38095238095238093, + "precision": 0.9302325581395349, + "predicted": 43, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9722222222222222, + "predicted": 108, + "top_hits": 7, + "top_n": 10, + "top_precision": 0.7, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9459459459459459, + "predicted": 111, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "middleware::GetClientIPAddr", + "file": "middleware/client_ip.go", + "truth": 24, + "truth_doctests": 0, + "predicted_gitnext": 19, + "predicted_coverage": 24, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestGetClientIPAddr_Unset", + "TestRequestLogger", + "TestRequestLoggerReadFrom", + "TestClientIPFromRemoteAddr", + "TestClientIPFromRemoteAddr_V4MappedIsUnmapped", + "Example_clientIPFromXFFTrustedProxies", + "TestClientIPFromXFFTrustedProxies", + "TestGetClientIPAddr_RoundTrip", + "TestClientIPFromHeader", + "TestClientIPFromHeader_MultiValueLastWins" + ], + "score": { + "gitnext": { + "recall": 0.7916666666666666, + "precision": 1.0, + "predicted": 19, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 24, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 24, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "middleware::GetLogEntry", + "file": "middleware/logger.go", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 2, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestRecoverer", + "TestRecovererNoColor" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 2, + "top_hits": 0, + "top_n": 2, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.5, + "predicted": 4, + "top_hits": 2, + "top_n": 4, + "top_precision": 0.5, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "middleware::GetReqID", + "file": "middleware/request_id.go", + "truth": 4, + "truth_doctests": 0, + "predicted_gitnext": 1, + "predicted_coverage": 4, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestRequestLogger", + "TestRequestLoggerReadFrom", + "TestRequestID", + "TestRecovererNoColor" + ], + "score": { + "gitnext": { + "recall": 0.25, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "middleware::HeaderRoute::IsMatch", + "file": "middleware/route_headers.go", + "truth": 1, + "truth_doctests": 0, + "predicted_gitnext": 2, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestRouteHeaders" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "middleware::NewCompressor", + "file": "middleware/compress.go", + "truth": 3, + "truth_doctests": 0, + "predicted_gitnext": 3, + "predicted_coverage": 3, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestCompressorWildcards", + "TestCompressorDefaultTextTypes", + "TestCompressor" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "middleware::NewWrapResponseWriter", + "file": "middleware/wrap_writer.go", + "truth": 5, + "truth_doctests": 0, + "predicted_gitnext": 8, + "predicted_coverage": 5, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestWrapWriterHTTP2", + "TestWrapResponseWriterReadFromStatus", + "TestRequestLogger", + "TestRequestLoggerReadFrom", + "TestRecovererNoColor" + ], + "score": { + "gitnext": { + "recall": 0.6, + "precision": 0.375, + "predicted": 8, + "top_hits": 3, + "top_n": 8, + "top_precision": 0.375, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.5, + "predicted": 10, + "top_hits": 5, + "top_n": 10, + "top_precision": 0.5, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "middleware::RequestLogger", + "file": "middleware/logger.go", + "skipped": "mutant does not compile", + "predicted_gitnext": 3, + "predicted_coverage": 83 + }, + { + "group": "pick", + "symbol": "middleware::Throttle", + "file": "middleware/throttle.go", + "skipped": "no test fails when it throws", + "predicted_gitnext": 7, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "middleware::compressResponseWriter::Close", + "file": "middleware/compress.go", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 46, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestCompressorDefaultTextTypes", + "TestCompressor" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.043478260869565216, + "predicted": 46, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.043478260869565216, + "predicted": 46, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "middleware::ContentCharset", + "file": "middleware/content_charset.go", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 4, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestContentCharset", + "TestContentCharsetMediaParameters" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.5, + "predicted": 4, + "top_hits": 2, + "top_n": 4, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.5, + "predicted": 4, + "top_hits": 2, + "top_n": 4, + "top_precision": 0.5, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "middleware::matchAcceptEncoding", + "file": "middleware/compress.go", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 3, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestCompressorDefaultTextTypes", + "TestCompressor" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.6666666666666666, + "predicted": 3, + "top_hits": 2, + "top_n": 3, + "top_precision": 0.6666666666666666, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.6666666666666666, + "predicted": 3, + "top_hits": 2, + "top_n": 3, + "top_precision": 0.6666666666666666, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "middleware::init", + "file": "middleware/terminal.go", + "skipped": "mutant does not compile", + "predicted_gitnext": 4, + "predicted_coverage": 83 + }, + { + "group": "random", + "symbol": "middleware::init", + "file": "middleware/request_id.go", + "skipped": "mutant does not compile", + "predicted_gitnext": 4, + "predicted_coverage": 83 + }, + { + "group": "random", + "symbol": "main::Context::URLParam", + "file": "context.go", + "truth": 20, + "truth_doctests": 0, + "predicted_gitnext": 23, + "predicted_coverage": 20, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestSingleHandler", + "TestMuxRegexp2", + "TestEscapedURLParams", + "TestMuxEmptyParams", + "TestMuxRegexp", + "TestMuxMissingParams", + "TestMuxMounts", + "TestMuxSubroutesBasic", + "TestStripPrefix", + "TestMuxSubrouterWildcardParam" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.8695652173913043, + "predicted": 23, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8695652173913043, + "predicted": 23, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "middleware::ThrottleWithOpts", + "file": "middleware/throttle.go", + "truth": 6, + "truth_doctests": 0, + "predicted_gitnext": 6, + "predicted_coverage": 6, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestThrottleBacklog", + "TestThrottleClientTimeout", + "TestThrottleCustomStatusCode", + "TestThrottleRetryAfter", + "TestThrottleMaximum", + "TestThrottleTriggerGatewayTimeout" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "main::node::setEndpoint", + "file": "tree.go", + "truth": 105, + "truth_doctests": 0, + "predicted_gitnext": 8, + "predicted_coverage": 108, + "missed_by_coverage": [], + "covered_not_failing": [ + "TestMiddlewarePanicOnLateUse", + "TestMountingExistingPath", + "TestMountingSelf" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 3, + "top_coverage": [ + "TestTreeFindPattern", + "TestMiddlewarePanicOnLateUse", + "TestTreeRegexMatchWholeParam", + "TestTreeRegexp", + "TestTreeRegexpRecursive", + "TestTreeMoar", + "TestMountingExistingPath", + "TestHeartbeat", + "TestNew", + "TestMountingSelf" + ], + "score": { + "gitnext": { + "recall": 0.0761904761904762, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9722222222222222, + "predicted": 108, + "top_hits": 7, + "top_n": 10, + "top_precision": 0.7, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9722222222222222, + "predicted": 108, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "main::node::getEdge", + "file": "tree.go", + "truth": 105, + "truth_doctests": 0, + "predicted_gitnext": 8, + "predicted_coverage": 110, + "missed_by_coverage": [], + "covered_not_failing": [ + "TestMiddlewarePanicOnLateUse", + "TestMountingExistingPath", + "TestMountingSelf", + "TestMuxWildcardRoute", + "TestMuxWildcardRouteCheckTwo" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 5, + "top_coverage": [ + "TestMuxWildcardRoute", + "TestMuxWildcardRouteCheckTwo", + "TestTreeFindPattern", + "TestMiddlewarePanicOnLateUse", + "TestTreeRegexMatchWholeParam", + "TestTreeRegexp", + "TestTreeRegexpRecursive", + "TestTreeMoar", + "TestMountingExistingPath", + "TestHeartbeat" + ], + "score": { + "gitnext": { + "recall": 0.0761904761904762, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9545454545454546, + "predicted": 110, + "top_hits": 6, + "top_n": 10, + "top_precision": 0.6, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9545454545454546, + "predicted": 110, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "middleware::mustParsePrefixes", + "file": "middleware/client_ip.go", + "truth": 16, + "truth_doctests": 0, + "predicted_gitnext": 18, + "predicted_coverage": 18, + "missed_by_coverage": [], + "covered_not_failing": [ + "TestClientIPFromHeader_PanicsOnBadPrefix", + "TestClientIPFromXFF_PanicsOnBadPrefix" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 2, + "top_coverage": [ + "TestClientIPFromHeader_PanicsOnBadPrefix", + "TestClientIPFromXFF_PanicsOnBadPrefix", + "TestClientIPFromHeader", + "TestClientIPFromHeader_MultiValueLastWins", + "TestGetClientIPAddr_RoundTrip", + "Example_clientIP", + "TestAdvisory_GHSA_j6qf_3m9c_vwj3", + "TestAdvisory_GHSA_9g5q_2w5x_hmxf", + "TestClientIPFromXFF_SingleTrustedHop", + "TestClientIPFromXFF_TrustedPrefixes" + ], + "score": { + "gitnext": { + "recall": 0.9375, + "precision": 0.8333333333333334, + "predicted": 18, + "top_hits": 7, + "top_n": 10, + "top_precision": 0.7, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.8888888888888888, + "predicted": 18, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8421052631578947, + "predicted": 19, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "main::walk", + "file": "tree.go", + "truth": 5, + "truth_doctests": 0, + "predicted_gitnext": 5, + "predicted_coverage": 5, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestWalkRouteWithHandlerAndSubrouter", + "TestWalkInlineMiddlewaresAcrossSubrouter", + "TestWalkMiddlewaresAcrossGroupAndRoute", + "TestWalker", + "TestCustomHTTPMethod" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "main::chain", + "file": "chain.go", + "truth": 100, + "truth_doctests": 0, + "predicted_gitnext": 3, + "predicted_coverage": 105, + "missed_by_coverage": [], + "covered_not_failing": [ + "TestMiddlewarePanicOnLateUse", + "TestMountingExistingPath", + "TestMountingSelf", + "TestMuxWildcardRoute", + "TestMuxWildcardRouteCheckTwo" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 5, + "top_coverage": [ + "TestMuxWildcardRoute", + "TestMuxWildcardRouteCheckTwo", + "TestMiddlewarePanicOnLateUse", + "TestMountingExistingPath", + "TestHeartbeat", + "TestNew", + "TestMountingSelf", + "TestMuxEmptyRoutes", + "TestMuxMatch_HasBasePath", + "TestRoutesHidesMountStub" + ], + "score": { + "gitnext": { + "recall": 0.03, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9523809523809523, + "predicted": 105, + "top_hits": 5, + "top_n": 10, + "top_precision": 0.5, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9523809523809523, + "predicted": 105, + "top_hits": 5, + "top_n": 10, + "top_precision": 0.5, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "middleware::PageRoute", + "file": "middleware/page_route.go", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + } + ], + "summary": { + "pick": { + "gitnext": { + "recall": 0.661, + "precision": 0.614, + "top_precision": 0.667, + "caught": 0.875 + }, + "coverage": { + "recall": 1.0, + "precision": 0.99, + "top_precision": 0.944, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.719, + "top_precision": 0.812, + "caught": 1.0 + }, + "functions": 16 + }, + "random": { + "gitnext": { + "recall": 0.68, + "precision": 0.874, + "top_precision": 0.874, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.974, + "top_precision": 0.844, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.862, + "top_precision": 0.785, + "caught": 1.0 + }, + "functions": 9 + }, + "all": { + "gitnext": { + "recall": 0.668, + "precision": 0.708, + "top_precision": 0.742, + "caught": 0.92 + }, + "coverage": { + "recall": 1.0, + "precision": 0.984, + "top_precision": 0.908, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.77, + "top_precision": 0.803, + "caught": 1.0 + }, + "functions": 25 + } + }, + "cost": { + "build_s": 1.2, + "run_one_by_one_s": 29.7, + "map_s": 30.9, + "profiles_bytes": 5994063, + "packages": 2, + "testmain_packages": [], + "repeat": 3, + "plain_s": 26.8, + "tests": 140, + "map_pairs": 3826, + "map_functions": 164, + "map_sqlite_bytes": 53248, + "functions_with_body": 189, + "functions_never_run": 23, + "fail_alone_not_together": [], + "fail_together_not_alone": [], + "slowdown_runs": 1.2 + } +} \ No newline at end of file diff --git a/eval/results/learn-tests-chi.md b/eval/results/learn-tests-chi.md new file mode 100644 index 0000000..09c7819 --- /dev/null +++ b/eval/results/learn-tests-chi.md @@ -0,0 +1,73 @@ +# learn-tests на chi (go): покрытие по тестам против `tests-for` +chi c64ed7d6635f, gitnext 08e599c, seed 7. Истина — eval (тесты, падающие при panic в начале функции). pick — функции с ответом в кэше eval, random — случайные. + +| выборка | функций | источник | полнота | точность | из 10 падают | поймано | +|---|---:|---|---:|---:|---:|---:| +| pick (кэш eval) | 16 | gitnext | 66% | 61% | 67% | 88% | +| pick (кэш eval) | 16 | coverage | 100% | 99% | 94% | 100% | +| pick (кэш eval) | 16 | union | 100% | 72% | 81% | 100% | +| случайные | 9 | gitnext | 68% | 87% | 87% | 100% | +| случайные | 9 | coverage | 100% | 97% | 84% | 100% | +| случайные | 9 | union | 100% | 86% | 78% | 100% | +| все | 25 | gitnext | 67% | 71% | 74% | 92% | +| все | 25 | coverage | 100% | 98% | 91% | 100% | +| все | 25 | union | 100% | 77% | 80% | 100% | + +## По функциям + +| выборка | функция | падают | граф: полн / из 10 | покрытие: полн / точн / из 10 | мимо покрытия | +|---|---|---:|---|---|---| +| pick | `_examples::fileserver::FileServer` | 0 | no test fails when it throws | названо 0 | | +| pick | `_examples::rest::ErrInvalidRequest` | 0 | no test fails when it throws | названо 0 | | +| pick | `_examples::rest::NewArticleListResponse` | 0 | no test fails when it throws | названо 0 | | +| pick | `_examples::rest::NewUserPayloadResponse` | 0 | no test fails when it throws | названо 0 | | +| pick | `main::Chain` | 11 | 18% / 100% | 100% / 92% / 90% | | +| pick | `main::Middlewares::HandlerFunc` | 1 | 0% / 0% | 100% / 100% / 100% | | +| pick | `main::Mux::MethodNotAllowedHandler` | 4 | 100% / 40% | 100% / 100% / 100% | | +| pick | `main::Mux::NotFoundHandler` | 14 | 64% / 30% | 100% / 100% / 100% | | +| pick | `main::NewMux` | 101 | 98% / 100% | 100% / 95% / 50% | | +| pick | `main::RouteContext` | 31 | 74% / 100% | 100% / 100% / 100% | | +| pick | `main::URLParamFromCtx` | 20 | 100% / 100% | 100% / 100% / 100% | | +| pick | `main::Walk` | 5 | 100% / 100% | 100% / 100% / 100% | | +| pick | `main::endpoints::Value` | 105 | 38% / 90% | 100% / 97% / 70% | | +| pick | `middleware::GetClientIPAddr` | 24 | 79% / 100% | 100% / 100% / 100% | | +| pick | `middleware::GetLogEntry` | 2 | 0% / 0% | 100% / 100% / 100% | | +| pick | `middleware::GetReqID` | 4 | 25% / 100% | 100% / 100% / 100% | | +| pick | `middleware::HeaderRoute::IsMatch` | 1 | 100% / 50% | 100% / 100% / 100% | | +| pick | `middleware::NewCompressor` | 3 | 100% / 100% | 100% / 100% / 100% | | +| pick | `middleware::NewWrapResponseWriter` | 5 | 60% / 38% | 100% / 100% / 100% | | +| pick | `middleware::RequestLogger` | 0 | mutant does not compile | названо 83 | | +| pick | `middleware::Throttle` | 0 | no test fails when it throws | названо 0 | | +| pick | `middleware::compressResponseWriter::Close` | 2 | 100% / 20% | 100% / 100% / 100% | | +| random | `middleware::ContentCharset` | 2 | 100% / 50% | 100% / 100% / 100% | | +| random | `middleware::matchAcceptEncoding` | 2 | 100% / 67% | 100% / 100% / 100% | | +| random | `middleware::init` | 0 | mutant does not compile | названо 83 | | +| random | `middleware::init` | 0 | mutant does not compile | названо 83 | | +| random | `main::Context::URLParam` | 20 | 100% / 100% | 100% / 100% / 100% | | +| random | `middleware::ThrottleWithOpts` | 6 | 100% / 100% | 100% / 100% / 100% | | +| random | `main::node::setEndpoint` | 105 | 8% / 100% | 100% / 97% / 70% | | +| random | `main::node::getEdge` | 105 | 8% / 100% | 100% / 95% / 60% | | +| random | `middleware::mustParsePrefixes` | 16 | 94% / 70% | 100% / 89% / 80% | | +| random | `main::walk` | 5 | 100% / 100% | 100% / 100% / 100% | | +| random | `main::chain` | 100 | 3% / 100% | 100% / 95% / 50% | | +| random | `middleware::PageRoute` | 0 | no test fails when it throws | названо 0 | | + +## Цена + +- `build_s`: 1.2 +- `run_one_by_one_s`: 29.7 +- `map_s`: 30.9 +- `profiles_bytes`: 5994063 +- `packages`: 2 +- `testmain_packages`: [] +- `repeat`: 3 +- `plain_s`: 26.8 +- `tests`: 140 +- `map_pairs`: 3826 +- `map_functions`: 164 +- `map_sqlite_bytes`: 53248 +- `functions_with_body`: 189 +- `functions_never_run`: 23 +- `fail_alone_not_together`: [] +- `fail_together_not_alone`: [] +- `slowdown_runs`: 1.2 diff --git a/eval/results/learn-tests-click.json b/eval/results/learn-tests-click.json new file mode 100644 index 0000000..91747a8 --- /dev/null +++ b/eval/results/learn-tests-click.json @@ -0,0 +1,4127 @@ +{ + "repo": "click", + "commit": "8abb77a8432e", + "seed": 7, + "gitnext_commit": "4bf0096", + "functions": [ + { + "group": "pick", + "symbol": "click::types::Path::coerce_path_result", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 9, + "truth_eval": 9, + "missed_by_coverage": [ + "test_path_dash_no_byteswarning" + ], + "covered_not_failing": [], + "top_coverage": [ + "test_path_resolve_symlink", + "test_other_command_invoke_with_defaults", + "test_path_type", + "test_tempdir_replacement_pattern", + "test_dual_options_custom_type_sentinel_flag_value", + "test_envvar_container_type", + "test_path_allow_dash", + "test_path_option" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 0.8888888888888888, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 0.8888888888888888, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 0.8888888888888888, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 0.8888888888888888, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 0.8888888888888888, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 0.8888888888888888, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::core::Option::get_help_extra", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 89, + "truth_eval": 89, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_removing_multiline_marker" + ], + "top_coverage": [ + "test_help_spec", + "test_count_default_type_help", + "test_do_not_show_default_empty_multiple", + "test_hide_false_default_boolean_flag_value", + "test_show_default_boolean_flag_name", + "test_show_true_default_boolean_flag_value", + "test_deprecated_empty_help_no_leading_space", + "test_do_not_show_no_default", + "test_dynamic_default_help_special_method", + "test_file_type_help_default" + ], + "full": { + "gitnext": { + "recall": 0.12359550561797752, + "precision": 1.0, + "predicted": 11, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9888888888888889, + "predicted": 90, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9888888888888889, + "predicted": 90, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9888888888888889, + "predicted": 90, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.12359550561797752, + "precision": 1.0, + "predicted": 11, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9888888888888889, + "predicted": 90, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9888888888888889, + "predicted": 90, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9888888888888889, + "predicted": 90, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::formatting::HelpFormatter::write_heading", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 76, + "truth_eval": 76, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_removing_multiline_marker" + ], + "top_coverage": [ + "test_context_formatter_class", + "test_command_no_args_is_help", + "test_group_with_args", + "test_command_write_usage_no_args", + "test_help_option_custom_names_and_class", + "test_truncating_docstring_no_help", + "test_callable_flag_value_show_default", + "test_hidden_option", + "test_show_envvar_empty", + "test_formatting_empty_help_lines" + ], + "full": { + "gitnext": { + "recall": 0.13157894736842105, + "precision": 0.43478260869565216, + "predicted": 23, + "top_hits": 5, + "top_n": 10, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.987012987012987, + "predicted": 77, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8539325842696629, + "predicted": 89, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.987012987012987, + "predicted": 77, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.13157894736842105, + "precision": 0.43478260869565216, + "predicted": 23, + "top_hits": 5, + "top_n": 10, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.987012987012987, + "predicted": 77, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8539325842696629, + "predicted": 89, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.987012987012987, + "predicted": 77, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::formatting::HelpFormatter::indentation", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 10, + "truth_eval": 10, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_formatting_empty_help_lines", + "test_basic_functionality", + "test_truncating_docstring", + "test_deprecated_empty_help_no_leading_space", + "test_deprecated_in_help_messages", + "test_chaining_help", + "test_deprecated_help_text_is_not_translated", + "test_basic_group", + "test_wrapping_long_command_name", + "test_wrapping_long_options_strings" + ], + "full": { + "gitnext": { + "recall": 0.5, + "precision": 0.21739130434782608, + "predicted": 23, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 10, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.35714285714285715, + "predicted": 28, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 10, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.5, + "precision": 0.21739130434782608, + "predicted": 23, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 10, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.35714285714285715, + "predicted": 28, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 10, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::globals::push_context", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 372, + "truth_eval": 122, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_false_show_default_cause_no_default_display_in_prompt", + "test_invoke_with_thread_pool_and_exit", + "test_pdb_init_restored_after_invoke", + "test_progressbar_hidden_manual", + "test_progressbar_item_show_func", + "test_prompts_eof", + "test_removing_multiline_marker", + "test_sys_streams_restored_after_exception" + ], + "top_coverage": [ + "test_with_resource", + "test_with_resource_exception", + "test_with_resource_nested_exception", + "test_context_pushing", + "test_command", + "test_command_context_class", + "test_argument_default", + "test_return_values", + "test_interrupt_while_reporting_error", + "test_exit_not_standalone" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9763779527559056, + "predicted": 381, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9763779527559056, + "predicted": 381, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9763779527559056, + "predicted": 381, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.32020997375328086, + "predicted": 381, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.32020997375328086, + "predicted": 381, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.32020997375328086, + "predicted": 381, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::_textwrap::TextWrapper::extra_indent", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 77, + "truth_eval": 77, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_removing_multiline_marker" + ], + "top_coverage": [ + "test_help_formatter_write_text", + "test_context_formatter_class", + "test_command_no_args_is_help", + "test_group_with_args", + "test_command_write_usage_no_args", + "test_help_option_custom_names_and_class", + "test_callable_flag_value_show_default", + "test_hidden_option", + "test_show_envvar_empty", + "test_truncating_docstring_no_help" + ], + "full": { + "gitnext": { + "recall": 0.012987012987012988, + "precision": 0.09090909090909091, + "predicted": 11, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9871794871794872, + "predicted": 78, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.875, + "predicted": 88, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9871794871794872, + "predicted": 78, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.012987012987012988, + "precision": 0.09090909090909091, + "predicted": 11, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9871794871794872, + "predicted": 78, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.875, + "predicted": 88, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9871794871794872, + "predicted": 78, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::termui::confirm", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 6, + "truth_eval": 6, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_full_prompt_passed_to_readline", + "test_echo_writing_to_standard_error", + "test_prompt_and_confirm_ansi_respects_color", + "test_flag_value_prompt", + "test_confirm_repeat", + "test_prompts" + ], + "full": { + "gitnext": { + "recall": 0.5, + "precision": 0.045454545454545456, + "predicted": 66, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.08695652173913043, + "predicted": 69, + "top_hits": 6, + "top_n": 10, + "top_precision": 0.6, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.5, + "precision": 0.045454545454545456, + "predicted": 66, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.08695652173913043, + "predicted": 69, + "top_hits": 6, + "top_n": 10, + "top_precision": 0.6, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::core::Command::format_usage", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 109, + "truth_eval": 109, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_duplicate_names_warning", + "test_removing_multiline_marker" + ], + "top_coverage": [ + "test_context_formatter_class", + "test_suggest_possible_options", + "test_unknown_options", + "test_formatting_usage_error_no_help", + "test_command_no_args_is_help", + "test_bad_defaults_for_multiple", + "test_boolean_envvar_bad_values", + "test_dual_options_custom_type_sentinel_flag_value", + "test_invalid_flag_definition", + "test_missing_envvar" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9819819819819819, + "predicted": 111, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9819819819819819, + "predicted": 111, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9819819819819819, + "predicted": 111, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9819819819819819, + "predicted": 111, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9819819819819819, + "predicted": 111, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9819819819819819, + "predicted": 111, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::decorators::option", + "test_files_not_imported": [ + "tests/test_formatting.py" + ], + "eval_says_none_fail": true, + "truth_full": 355, + "truth_eval": 0, + "missed_by_coverage": [ + "test_context" + ], + "covered_not_failing": [ + "test_command_write_usage_no_args", + "test_formatting_custom_type_metavar", + "test_formatting_empty_help_lines", + "test_formatting_usage_custom_help", + "test_formatting_usage_error", + "test_formatting_usage_error_help_hint", + "test_formatting_usage_error_metavar_bad_arg", + "test_formatting_usage_error_metavar_missing_arg" + ], + "top_coverage": [ + "test_bad_defaults_for_multiple", + "test_invalid_nargs", + "test_callable_flag_value_get_default_override", + "test_command", + "test_command_to_info_dict_multiple_arguments", + "test_command_parse_args_collects_option_prefixes", + "test_command_context_class", + "test_context_formatter_class", + "test_group_parse_args_collects_base_option_prefixes", + "test_return_values" + ], + "full": { + "gitnext": { + "recall": 0.1352112676056338, + "precision": 0.8275862068965517, + "predicted": 58, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "coverage": { + "recall": 0.9971830985915493, + "precision": 0.9389920424403183, + "predicted": 377, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 0.9971830985915493, + "precision": 0.9147286821705426, + "predicted": 387, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 0.9971830985915493, + "precision": 0.9389920424403183, + "predicted": 377, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::_compat::should_strip_ansi", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 26, + "truth_eval": 26, + "missed_by_coverage": [ + "test_light_imports" + ], + "covered_not_failing": [], + "top_coverage": [ + "test_should_strip_ansi", + "test_echo_custom_file", + "test_full_prompt_passed_to_readline", + "test_prompt_default_round_trips_through_type", + "test_progress_bar_update_min_steps", + "test_prompt_cast_default", + "test_progressbar_eta", + "test_progressbar_format_eta", + "test_progressbar_format_pos", + "test_progressbar_time_per_iteration" + ], + "full": { + "gitnext": { + "recall": 0.15384615384615385, + "precision": 0.3076923076923077, + "predicted": 13, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 0.9615384615384616, + "precision": 1.0, + "predicted": 25, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 0.9615384615384616, + "precision": 0.7352941176470589, + "predicted": 34, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 0.9615384615384616, + "precision": 1.0, + "predicted": 25, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.15384615384615385, + "precision": 0.3076923076923077, + "predicted": 13, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 0.9615384615384616, + "precision": 1.0, + "predicted": 25, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 0.9615384615384616, + "precision": 0.7352941176470589, + "predicted": 34, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 0.9615384615384616, + "precision": 1.0, + "predicted": 25, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::_winconsole::get_buffer", + "test_files_not_imported": [], + "eval_says_none_fail": true, + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "click::core::Parameter::handle_parse_result", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 365, + "truth_eval": 122, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_duplicate_names_warning", + "test_false_show_default_cause_no_default_display_in_prompt", + "test_flag_group_competition_duplicate_option_name", + "test_invoke_with_thread_pool_and_exit", + "test_pdb_init_restored_after_invoke", + "test_progressbar_hidden_manual", + "test_progressbar_item_show_func", + "test_prompts_eof" + ], + "top_coverage": [ + "test_command_parse_args_collects_option_prefixes", + "test_command_context_class", + "test_group_parse_args_collects_base_option_prefixes", + "test_argument_default", + "test_return_values", + "test_interrupt_while_reporting_error", + "test_exit_not_standalone", + "test_interrupt_while_reporting_abort", + "test_version_option_ambiguous_import_name_errors", + "test_version_option_unknown_package_errors" + ], + "full": { + "gitnext": { + "recall": 0.019178082191780823, + "precision": 1.0, + "predicted": 7, + "top_hits": 7, + "top_n": 7, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9707446808510638, + "predicted": 376, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9707446808510638, + "predicted": 376, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9707446808510638, + "predicted": 376, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 7, + "top_hits": 0, + "top_n": 7, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.324468085106383, + "predicted": 376, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.324468085106383, + "predicted": 376, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.324468085106383, + "predicted": 376, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::core::Context::get_parameter_source", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 365, + "truth_eval": 122, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_duplicate_names_warning", + "test_false_show_default_cause_no_default_display_in_prompt", + "test_flag_group_competition_duplicate_option_name", + "test_invoke_with_thread_pool_and_exit", + "test_pdb_init_restored_after_invoke", + "test_progressbar_hidden_manual", + "test_progressbar_item_show_func", + "test_prompts_eof" + ], + "top_coverage": [ + "test_command_parse_args_collects_option_prefixes", + "test_command_context_class", + "test_group_parse_args_collects_base_option_prefixes", + "test_argument_default", + "test_return_values", + "test_interrupt_while_reporting_error", + "test_exit_not_standalone", + "test_interrupt_while_reporting_abort", + "test_version_option_ambiguous_import_name_errors", + "test_version_option_unknown_package_errors" + ], + "full": { + "gitnext": { + "recall": 0.005479452054794521, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9707446808510638, + "predicted": 376, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9707446808510638, + "predicted": 376, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9707446808510638, + "predicted": 376, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 2, + "top_hits": 0, + "top_n": 2, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.324468085106383, + "predicted": 376, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.324468085106383, + "predicted": 376, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.324468085106383, + "predicted": 376, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::core::Context::call_on_close", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 16, + "truth_eval": 16, + "missed_by_coverage": [ + "test_getchar_windows" + ], + "covered_not_failing": [], + "top_coverage": [ + "test_context_pushing", + "test_multiple_eager_callbacks", + "test_multi_enter", + "test_close_before_exit", + "test_files_closed", + "test_close_before_pop", + "test_file_atomics", + "test_stdout_default", + "test_file_args", + "test_file_prompt_default_format" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 0.9375, + "precision": 1.0, + "predicted": 15, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 0.9375, + "precision": 1.0, + "predicted": 15, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 0.9375, + "precision": 1.0, + "predicted": 15, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 0.9375, + "precision": 1.0, + "predicted": 15, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 0.9375, + "precision": 1.0, + "predicted": 15, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 0.9375, + "precision": 1.0, + "predicted": 15, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::formatting::HelpFormatter::write_dl", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 76, + "truth_eval": 76, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_removing_multiline_marker" + ], + "top_coverage": [ + "test_context_formatter_class", + "test_command_no_args_is_help", + "test_group_with_args", + "test_command_write_usage_no_args", + "test_help_option_custom_names_and_class", + "test_truncating_docstring_no_help", + "test_callable_flag_value_show_default", + "test_hidden_option", + "test_show_envvar_empty", + "test_formatting_empty_help_lines" + ], + "full": { + "gitnext": { + "recall": 0.13157894736842105, + "precision": 0.43478260869565216, + "predicted": 23, + "top_hits": 5, + "top_n": 10, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.987012987012987, + "predicted": 77, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8539325842696629, + "predicted": 89, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.987012987012987, + "predicted": 77, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.13157894736842105, + "precision": 0.43478260869565216, + "predicted": 23, + "top_hits": 5, + "top_n": 10, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.987012987012987, + "predicted": 77, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8539325842696629, + "predicted": 89, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.987012987012987, + "predicted": 77, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::core::Group::result_callback", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 2, + "truth_eval": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_no_command_result_callback", + "test_pipeline" + ], + "full": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::core::Context::ensure_object", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 2, + "truth_eval": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_ensure_context_objects", + "test_get_context_objects" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::_compat::get_best_encoding", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 5, + "truth_eval": 5, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_tempfile_pager_closes_file_before_unlink", + "test_tempfile_pager_accepts_text", + "test_tempfile_pager_passes_pager_params", + "test_tempfile_pager_handles_ansi", + "test_open_file_ignore_errors_stdin" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "click::_termui_impl::ProgressBar::format_bar", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 9, + "truth_eval": 9, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_progressbar_item_show_func" + ], + "top_coverage": [ + "test_progressbar_format_bar", + "test_progressbar_format_progress_line", + "test_progressbar_format_progress_line_with_show_func", + "test_progressbar_lands_on_final_position", + "test_progressbar_strip_regression", + "test_progressbar_update_with_item_show_func", + "test_progressbar_is_iterator", + "test_progressbar_length_hint", + "test_progressbar_item_show_func", + "test_progressbar_update" + ], + "full": { + "gitnext": { + "recall": 0.3333333333333333, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9, + "predicted": 10, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9, + "predicted": 10, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9, + "predicted": 10, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.3333333333333333, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9, + "predicted": 10, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9, + "predicted": 10, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9, + "predicted": 10, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "examples::aliases::aliases::Config::write_config", + "test_files_not_imported": [], + "eval_says_none_fail": true, + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "click::_winconsole::_WindowsConsoleWriter::write", + "test_files_not_imported": [], + "eval_says_none_fail": true, + "skipped": "no test fails when it throws", + "predicted_gitnext": 7, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "click::core::Option::_pick_type", + "test_files_not_imported": [ + "tests/test_basic.py", + "tests/test_deprecations.py", + "tests/test_info_dict.py" + ], + "eval_says_none_fail": true, + "truth_full": 365, + "truth_eval": 0, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_basic_group", + "test_boolean_conversion", + "test_boolean_flag", + "test_boolean_switch", + "test_cast_multi_default", + "test_choice_argument", + "test_choice_argument_custom_type", + "test_choice_argument_enum" + ], + "top_coverage": [ + "test_flag_auto_detection", + "test_normalized_explicit_name_not_deprecated", + "test_option_explicit_name_keeps_its_case", + "test_parameter_duplication", + "test_parameter_name_identifier_check_follows_the_unicode_table", + "test_parameter_name_transform", + "test_type_from_default_container", + "test_unusable_name_deprecated", + "test_usable_name_not_deprecated", + "test_deprecated_prompt" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.8690476190476191, + "predicted": 420, + "top_hits": 7, + "top_n": 10, + "top_precision": 0.7, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8690476190476191, + "predicted": 420, + "top_hits": 7, + "top_n": 10, + "top_precision": 0.7, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.8690476190476191, + "predicted": 420, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::core::Argument::get_error_hint", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 14, + "truth_eval": 14, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_duplicate_names_warning" + ], + "top_coverage": [ + "test_formatting_usage_error_no_help", + "test_bad_defaults_for_nargs", + "test_duplicate_names_warning", + "test_formatting_usage_error_metavar_bad_arg", + "test_formatting_usage_custom_help", + "test_formatting_usage_error", + "test_formatting_usage_error_metavar_missing_arg", + "test_missing_arg", + "test_empty_nargs", + "test_formatting_usage_error_help_hint" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9333333333333333, + "predicted": 15, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9333333333333333, + "predicted": 15, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9333333333333333, + "predicted": 15, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9333333333333333, + "predicted": 15, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9333333333333333, + "predicted": 15, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9333333333333333, + "predicted": 15, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::core::Parameter::consume_value", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 365, + "truth_eval": 122, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_duplicate_names_warning", + "test_false_show_default_cause_no_default_display_in_prompt", + "test_flag_group_competition_duplicate_option_name", + "test_invoke_with_thread_pool_and_exit", + "test_pdb_init_restored_after_invoke", + "test_progressbar_hidden_manual", + "test_progressbar_item_show_func", + "test_prompts_eof" + ], + "top_coverage": [ + "test_command_parse_args_collects_option_prefixes", + "test_command_context_class", + "test_group_parse_args_collects_base_option_prefixes", + "test_argument_default", + "test_return_values", + "test_interrupt_while_reporting_error", + "test_exit_not_standalone", + "test_interrupt_while_reporting_abort", + "test_version_option_ambiguous_import_name_errors", + "test_version_option_unknown_package_errors" + ], + "full": { + "gitnext": { + "recall": 0.005479452054794521, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9707446808510638, + "predicted": 376, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9707446808510638, + "predicted": 376, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9707446808510638, + "predicted": 376, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 2, + "top_hits": 0, + "top_n": 2, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.324468085106383, + "predicted": 376, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.324468085106383, + "predicted": 376, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.324468085106383, + "predicted": 376, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::core::Option::flag_activation_value", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 369, + "truth_eval": 120, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_duplicate_names_warning", + "test_false_show_default_cause_no_default_display_in_prompt", + "test_flag_group_competition_duplicate_option_name", + "test_invoke_with_thread_pool_and_exit", + "test_pdb_init_restored_after_invoke", + "test_progressbar_hidden_manual", + "test_progressbar_item_show_func", + "test_prompts_eof" + ], + "top_coverage": [ + "test_parameter", + "test_context", + "test_param_to_info_dict_help", + "test_param_to_info_dict_deprecated_help", + "test_parser_collects_prefixes", + "test_callable_flag_value_get_default_override", + "test_command", + "test_command_to_info_dict_multiple_arguments", + "test_command_parse_args_collects_option_prefixes", + "test_command_context_class" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9710526315789474, + "predicted": 380, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9710526315789474, + "predicted": 380, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9710526315789474, + "predicted": 380, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.3157894736842105, + "predicted": 380, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.3157894736842105, + "predicted": 380, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.3157894736842105, + "predicted": 380, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::_textwrap::TextWrapper::_wrap_chunks", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 113, + "truth_eval": 113, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_duplicate_names_warning", + "test_removing_multiline_marker" + ], + "top_coverage": [ + "test_wrap_text_visible_width", + "test_help_formatter_write_usage", + "test_write_usage_styled_prefix_keeps_options_on_one_line", + "test_help_formatter_write_text", + "test_context_formatter_class", + "test_suggest_possible_options", + "test_unknown_options", + "test_formatting_usage_error_no_help", + "test_command_no_args_is_help", + "test_bad_defaults_for_multiple" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9826086956521739, + "predicted": 115, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9826086956521739, + "predicted": 115, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9826086956521739, + "predicted": 115, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9826086956521739, + "predicted": 115, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9826086956521739, + "predicted": 115, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9826086956521739, + "predicted": 115, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::core::Group::invoke", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 41, + "truth_eval": 41, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_group_add_command_name", + "test_make_pass_meta_decorator", + "test_get_context_objects_missing", + "test_group_invoke_collects_used_option_prefixes", + "test_no_command_result_callback", + "test_group_commands_dict", + "test_group_from_list", + "test_custom_parser", + "test_args_and_chain", + "test_basic_chaining" + ], + "full": { + "gitnext": { + "recall": 0.024390243902439025, + "precision": 0.07692307692307693, + "predicted": 13, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 41, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.7735849056603774, + "predicted": 53, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 41, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.024390243902439025, + "precision": 0.07692307692307693, + "predicted": 13, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 41, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.7735849056603774, + "predicted": 53, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 41, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::shell_completion::FishComplete::get_completion_args", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 1, + "truth_eval": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_full_complete" + ], + "full": { + "gitnext": { + "recall": 1.0, + "precision": 0.02631578947368421, + "predicted": 38, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.02631578947368421, + "predicted": 38, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 1.0, + "precision": 0.02631578947368421, + "predicted": 38, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.02631578947368421, + "predicted": 38, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::_winconsole::_get_windows_console_stream", + "test_files_not_imported": [], + "eval_says_none_fail": true, + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "click::decorators::version_option", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 3, + "truth_eval": 3, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_version_option_ambiguous_import_name_errors", + "test_version_option_unknown_package_errors", + "test_version_option_resolves_import_name_to_distribution" + ], + "full": { + "gitnext": { + "recall": 1.0, + "precision": 0.6, + "predicted": 5, + "top_hits": 3, + "top_n": 5, + "top_precision": 0.6, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.6, + "predicted": 5, + "top_hits": 3, + "top_n": 5, + "top_precision": 0.6, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 1.0, + "precision": 0.6, + "predicted": 5, + "top_hits": 3, + "top_n": 5, + "top_precision": 0.6, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.6, + "predicted": 5, + "top_hits": 3, + "top_n": 5, + "top_precision": 0.6, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::_compat::_FixupStream::readable", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 1, + "truth_eval": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_open_file_ignore_errors_stdin" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 2, + "top_hits": 0, + "top_n": 2, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.3333333333333333, + "predicted": 3, + "top_hits": 1, + "top_n": 3, + "top_precision": 0.3333333333333333, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 2, + "top_hits": 0, + "top_n": 2, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.3333333333333333, + "predicted": 3, + "top_hits": 1, + "top_n": 3, + "top_precision": 0.3333333333333333, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::_termui_impl::get_pager_file", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 19, + "truth_eval": 19, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_get_pager_file_flushes_stream_on_exception", + "test_get_pager_file_nullpager_wraps_textio_stream", + "test_pipepager_less_detection_matches_stem", + "test_echo_via_pager_streams_each_write", + "test_get_pager_file_missing_pager_keeps_borrowed_stream_open", + "test_get_pager_file_pager_missing_binary_falls_back", + "test_get_pager_file_pager_unset_falls_back_when_no_default", + "test_get_pager_file_close_does_not_close_borrowed_stream", + "test_get_pager_file_nullpager_keeps_stringio_stream", + "test_tempfile_pager_closes_file_before_unlink" + ], + "full": { + "gitnext": { + "recall": 0.42105263157894735, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 19, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 19, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 19, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.42105263157894735, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 19, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 19, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 19, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::exceptions::ClickException::__init__", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 95, + "truth_eval": 95, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_argument_default", + "test_argument_order", + "test_context_settings", + "test_double_dash", + "test_duplicate_names_warning", + "test_option_custom", + "test_option_flag" + ], + "top_coverage": [ + "test_file_error_surrogates", + "test_editor_failure_exception", + "test_editor_nonexistent_exception", + "test_func_param_type_uses_value_error_message", + "test_unstyle_exception_message", + "test_invalid_path_with_esc_sequence", + "test_range_fail", + "test_explicit_dict_type_rejects_string", + "test_path_surrogates", + "test_file_surrogates" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 2, + "top_hits": 0, + "top_n": 2, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9313725490196079, + "predicted": 102, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9134615384615384, + "predicted": 104, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9313725490196079, + "predicted": 102, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 2, + "top_hits": 0, + "top_n": 2, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9313725490196079, + "predicted": 102, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9134615384615384, + "predicted": 104, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9313725490196079, + "predicted": 102, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::types::Tuple::to_info_dict", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 1, + "truth_eval": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_parameter" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 4, + "top_hits": 0, + "top_n": 4, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.2, + "predicted": 5, + "top_hits": 1, + "top_n": 5, + "top_precision": 0.2, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 4, + "top_hits": 0, + "top_n": 4, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.2, + "predicted": 5, + "top_hits": 1, + "top_n": 5, + "top_precision": 0.2, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::core::Option::process_value", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 335, + "truth_eval": 95, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_absolute_path", + "test_add_different_name", + "test_argument_nargs", + "test_argument_order", + "test_chained", + "test_choice_case_sensitive", + "test_choice_conflicting_prefix", + "test_choice_special_characters" + ], + "top_coverage": [ + "test_required_option", + "test_command_parse_args_collects_option_prefixes", + "test_command_context_class", + "test_group_parse_args_collects_base_option_prefixes", + "test_return_values", + "test_interrupt_while_reporting_error", + "test_exit_not_standalone", + "test_interrupt_while_reporting_abort", + "test_version_option_ambiguous_import_name_errors", + "test_version_option_unknown_package_errors" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.8957219251336899, + "predicted": 374, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8957219251336899, + "predicted": 374, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.8957219251336899, + "predicted": 374, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.2540106951871658, + "predicted": 374, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "caught": 0.0 + }, + "union": { + "recall": 1.0, + "precision": 0.2540106951871658, + "predicted": 374, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "caught": 0.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.2540106951871658, + "predicted": 374, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "caught": 0.0 + } + } + }, + { + "group": "random", + "symbol": "click::core::Group::parse_args", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 58, + "truth_eval": 58, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_removing_multiline_marker" + ], + "top_coverage": [ + "test_group_parse_args_collects_base_option_prefixes", + "test_help_option", + "test_nested_group", + "test_add_different_name", + "test_group", + "test_chained", + "test_files_closed", + "test_group_add_command_name", + "test_group_command_same_option", + "test_make_pass_meta_decorator" + ], + "full": { + "gitnext": { + "recall": 0.15517241379310345, + "precision": 0.32142857142857145, + "predicted": 28, + "top_hits": 6, + "top_n": 10, + "top_precision": 0.6, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9830508474576272, + "predicted": 59, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.7435897435897436, + "predicted": 78, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9830508474576272, + "predicted": 59, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.15517241379310345, + "precision": 0.32142857142857145, + "predicted": 28, + "top_hits": 6, + "top_n": 10, + "top_precision": 0.6, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9830508474576272, + "predicted": 59, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.7435897435897436, + "predicted": 78, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9830508474576272, + "predicted": 59, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::core::Parameter::value_from_envvar", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 31, + "truth_eval": 31, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_duplicate_names_warning" + ], + "top_coverage": [ + "test_argument_default", + "test_cast_multi_default", + "test_double_dash", + "test_nargs_envvar", + "test_option_custom", + "test_option_with_optional_value", + "test_flag_option_with_nargs_option", + "test_option_flag", + "test_nargs_envvar_only_if_values_empty", + "test_argument_order" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.96875, + "predicted": 32, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.96875, + "predicted": 32, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.96875, + "predicted": 32, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.96875, + "predicted": 32, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.96875, + "predicted": 32, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.96875, + "predicted": 32, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::core::Argument::get_help_record", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 26, + "truth_eval": 26, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_argument_get_help_record_never_none", + "test_help_spec_matches_help_record", + "test_deprecated_empty_help_no_leading_space", + "test_group_with_args", + "test_formatting_with_options_metavar_empty", + "test_formatting_custom_type_metavar", + "test_argument_help_empty_string_lists_all", + "test_argument_help_lists_undocumented_arguments", + "test_argument_help_optional_metavar", + "test_argument_help_undocumented_arguments_only_no_section" + ], + "full": { + "gitnext": { + "recall": 0.038461538461538464, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 26, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 26, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 26, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.038461538461538464, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 26, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 26, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 26, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::types::File::shell_complete", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 1, + "truth_eval": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_path_types" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::core::Command::get_help_option", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 373, + "truth_eval": 122, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_false_show_default_cause_no_default_display_in_prompt", + "test_invoke_with_thread_pool_and_exit", + "test_pdb_init_restored_after_invoke", + "test_progressbar_hidden_manual", + "test_progressbar_item_show_func", + "test_prompts_eof", + "test_removing_multiline_marker", + "test_sys_streams_restored_after_exception" + ], + "top_coverage": [ + "test_context", + "test_command", + "test_command_to_info_dict_multiple_arguments", + "test_command_parse_args_collects_option_prefixes", + "test_command_context_class", + "test_context_formatter_class", + "test_group_parse_args_collects_base_option_prefixes", + "test_argument_default", + "test_return_values", + "test_interrupt_while_reporting_error" + ], + "full": { + "gitnext": { + "recall": 0.010723860589812333, + "precision": 0.8, + "predicted": 5, + "top_hits": 4, + "top_n": 5, + "top_precision": 0.8, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9764397905759162, + "predicted": 382, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9738903394255874, + "predicted": 383, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9764397905759162, + "predicted": 382, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 5, + "top_hits": 0, + "top_n": 5, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.3193717277486911, + "predicted": 382, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.3185378590078329, + "predicted": 383, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.3193717277486911, + "predicted": 382, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::shell_completion::ShellComplete::__init__", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 34, + "truth_eval": 34, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_fish_format_completion_escapes_help", + "test_powershell_format_completion_escapes_help", + "test_source_uses_lf_line_endings", + "test_full_source", + "test_full_source_powershell", + "test_argument_default", + "test_option_optional", + "test_help_option", + "test_nested_group", + "test_add_different_name" + ], + "full": { + "gitnext": { + "recall": 1.0, + "precision": 0.85, + "predicted": 40, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 34, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.85, + "predicted": 40, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 34, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 1.0, + "precision": 0.85, + "predicted": 40, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 34, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.85, + "predicted": 40, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 34, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::parser::_OptionParser::parse_args", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 367, + "truth_eval": 121, + "missed_by_coverage": [], + "covered_not_failing": [ + "test_duplicate_names_warning", + "test_false_show_default_cause_no_default_display_in_prompt", + "test_flag_group_competition_duplicate_option_name", + "test_invoke_with_thread_pool_and_exit", + "test_pdb_init_restored_after_invoke", + "test_progressbar_hidden_manual", + "test_progressbar_item_show_func", + "test_prompts_eof" + ], + "top_coverage": [ + "test_command_parse_args_collects_option_prefixes", + "test_command_context_class", + "test_group_parse_args_collects_base_option_prefixes", + "test_argument_default", + "test_return_values", + "test_interrupt_while_reporting_error", + "test_exit_not_standalone", + "test_interrupt_while_reporting_abort", + "test_version_option_ambiguous_import_name_errors", + "test_version_option_unknown_package_errors" + ], + "full": { + "gitnext": { + "recall": 0.005449591280653951, + "precision": 0.4, + "predicted": 5, + "top_hits": 2, + "top_n": 5, + "top_precision": 0.4, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9708994708994709, + "predicted": 378, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.963254593175853, + "predicted": 381, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.9708994708994709, + "predicted": 378, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 5, + "top_hits": 0, + "top_n": 5, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.3201058201058201, + "predicted": 378, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.31758530183727035, + "predicted": 381, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.3201058201058201, + "predicted": 378, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::shell_completion::BashComplete::get_completion_args", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 2, + "truth_eval": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_full_complete", + "test_context_settings" + ], + "full": { + "gitnext": { + "recall": 1.0, + "precision": 0.05263157894736842, + "predicted": 38, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.05263157894736842, + "predicted": 38, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 1.0, + "precision": 0.05263157894736842, + "predicted": 38, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.05263157894736842, + "predicted": 38, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "click::_compat::_NonClosingTextIOWrapper::__del__", + "test_files_not_imported": [], + "eval_says_none_fail": false, + "truth_full": 1, + "truth_eval": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "top_coverage": [ + "test_open_file_ignore_errors_stdin" + ], + "full": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + }, + "eval": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + } + ], + "summary": { + "pick": { + "full": { + "gitnext": { + "recall": 0.169, + "precision": 0.409, + "top_precision": 0.433, + "caught": 0.667 + }, + "coverage": { + "recall": 0.988, + "precision": 0.983, + "top_precision": 0.994, + "caught": 1.0 + }, + "union": { + "recall": 0.988, + "precision": 0.859, + "top_precision": 0.961, + "caught": 1.0 + }, + "learned": { + "recall": 0.988, + "precision": 0.983, + "top_precision": 0.994, + "caught": 1.0 + }, + "functions": 18 + }, + "eval": { + "gitnext": { + "recall": 0.17, + "precision": 0.267, + "top_precision": 0.288, + "caught": 0.529 + }, + "coverage": { + "recall": 0.988, + "precision": 0.871, + "top_precision": 0.841, + "caught": 1.0 + }, + "union": { + "recall": 0.988, + "precision": 0.741, + "top_precision": 0.806, + "caught": 1.0 + }, + "learned": { + "recall": 0.988, + "precision": 0.871, + "top_precision": 0.841, + "caught": 1.0 + }, + "functions": 17 + } + }, + "random": { + "full": { + "gitnext": { + "recall": 0.212, + "precision": 0.279, + "top_precision": 0.286, + "caught": 0.409 + }, + "coverage": { + "recall": 1.0, + "precision": 0.975, + "top_precision": 0.982, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.774, + "top_precision": 0.82, + "caught": 1.0 + }, + "learned": { + "recall": 1.0, + "precision": 0.975, + "top_precision": 0.991, + "caught": 1.0 + }, + "functions": 22 + }, + "eval": { + "gitnext": { + "recall": 0.221, + "precision": 0.187, + "top_precision": 0.195, + "caught": 0.286 + }, + "coverage": { + "recall": 1.0, + "precision": 0.825, + "top_precision": 0.79, + "caught": 0.952 + }, + "union": { + "recall": 1.0, + "precision": 0.615, + "top_precision": 0.616, + "caught": 0.952 + }, + "learned": { + "recall": 1.0, + "precision": 0.825, + "top_precision": 0.79, + "caught": 0.952 + }, + "functions": 21 + } + }, + "all": { + "full": { + "gitnext": { + "recall": 0.193, + "precision": 0.337, + "top_precision": 0.352, + "caught": 0.525 + }, + "coverage": { + "recall": 0.995, + "precision": 0.979, + "top_precision": 0.988, + "caught": 1.0 + }, + "union": { + "recall": 0.995, + "precision": 0.812, + "top_precision": 0.883, + "caught": 1.0 + }, + "learned": { + "recall": 0.995, + "precision": 0.979, + "top_precision": 0.993, + "caught": 1.0 + }, + "functions": 40 + }, + "eval": { + "gitnext": { + "recall": 0.198, + "precision": 0.223, + "top_precision": 0.237, + "caught": 0.395 + }, + "coverage": { + "recall": 0.994, + "precision": 0.846, + "top_precision": 0.813, + "caught": 0.974 + }, + "union": { + "recall": 0.994, + "precision": 0.671, + "top_precision": 0.701, + "caught": 0.974 + }, + "learned": { + "recall": 0.994, + "precision": 0.846, + "top_precision": 0.813, + "caught": 0.974 + }, + "functions": 38 + } + } + }, + "cost": { + "repeat": 3, + "plain_s": 5.3, + "pytest_cov_s": 13.4, + "test_function_s": 13.0, + "slowdown": 2.5, + "coverage_db_bytes": 3047424, + "map_sqlite_bytes": 1626112, + "map_pairs": 143423, + "map_functions": 430, + "map_tests": 2571, + "map_test_names": 585, + "items": "2648", + "tf_pairs": 43755, + "tf_missed": 4, + "cov_missed": 4, + "functions_with_body": 585, + "gitnext_learn_s": 21.7, + "functions_run_outside_tests": 33, + "functions_run_outside_tests_only": 0, + "functions_never_run": 155 + } +} \ No newline at end of file diff --git a/eval/results/learn-tests-click.md b/eval/results/learn-tests-click.md new file mode 100644 index 0000000..f9b9b63 --- /dev/null +++ b/eval/results/learn-tests-click.md @@ -0,0 +1,93 @@ +# learn-tests на click: покрытие по тестам против `tests-for` +click 8abb77a8432e, gitnext 4bf0096, seed 7. Метрики как в eval: полнота, точность, доля падающих в первых 10, поймано ли первыми 10. + +## Итог: полная истина (основная) + +| выборка | функций | источник | полнота | точность | из 10 падают | поймано | +|---|---:|---|---:|---:|---:|---:| +| pick (есть вызывающие) | 18 | gitnext | 17% | 41% | 43% | 67% | +| pick (есть вызывающие) | 18 | coverage | 99% | 98% | 99% | 100% | +| pick (есть вызывающие) | 18 | union | 99% | 86% | 96% | 100% | +| pick (есть вызывающие) | 18 | learned | 99% | 98% | 99% | 100% | +| случайные | 22 | gitnext | 21% | 28% | 29% | 41% | +| случайные | 22 | coverage | 100% | 98% | 98% | 100% | +| случайные | 22 | union | 100% | 77% | 82% | 100% | +| случайные | 22 | learned | 100% | 98% | 99% | 100% | +| все | 40 | gitnext | 19% | 34% | 35% | 52% | +| все | 40 | coverage | 100% | 98% | 99% | 100% | +| все | 40 | union | 100% | 81% | 88% | 100% | +| все | 40 | learned | 100% | 98% | 99% | 100% | + +## Итог: истина eval (`tail -400`) + +| выборка | функций | источник | полнота | точность | из 10 падают | поймано | +|---|---:|---|---:|---:|---:|---:| +| pick (есть вызывающие) | 17 | gitnext | 17% | 27% | 29% | 53% | +| pick (есть вызывающие) | 17 | coverage | 99% | 87% | 84% | 100% | +| pick (есть вызывающие) | 17 | union | 99% | 74% | 81% | 100% | +| pick (есть вызывающие) | 17 | learned | 99% | 87% | 84% | 100% | +| случайные | 21 | gitnext | 22% | 19% | 20% | 29% | +| случайные | 21 | coverage | 100% | 82% | 79% | 95% | +| случайные | 21 | union | 100% | 62% | 62% | 95% | +| случайные | 21 | learned | 100% | 82% | 79% | 95% | +| все | 38 | gitnext | 20% | 22% | 24% | 40% | +| все | 38 | coverage | 99% | 85% | 81% | 97% | +| все | 38 | union | 99% | 67% | 70% | 97% | +| все | 38 | learned | 99% | 85% | 81% | 97% | + +## По функциям (полная истина) + +| выборка | функция | падают (eval) | gitnext: полн / из 10 | покрытие: полн / точн / из 10 | объединение: полн / из 10 | +|---|---|---:|---|---|---| +| pick | `click::types::Path::coerce_path_result` | 9 (9) | 0% / 0% | 89% / 100% / 100% | 89% / 100% | +| pick | `click::core::Option::get_help_extra` | 89 (89) | 12% / 100% | 100% / 99% / 100% | 100% / 100% | +| pick | `click::formatting::HelpFormatter::write_heading` | 76 (76) | 13% / 50% | 100% / 99% / 100% | 100% / 90% | +| pick | `click::formatting::HelpFormatter::indentation` | 10 (10) | 50% / 40% | 100% / 100% / 100% | 100% / 100% | +| pick | `click::globals::push_context` | 372 (122) | 0% / 0% | 100% / 98% / 100% | 100% / 100% | +| pick | `click::_textwrap::TextWrapper::extra_indent` | 77 (77) | 1% / 10% | 100% / 99% / 100% | 100% / 100% | +| pick | `click::termui::confirm` | 6 (6) | 50% / 20% | 100% / 100% / 100% | 100% / 60% | +| pick | `click::core::Command::format_usage` | 109 (109) | 0% / 0% | 100% / 98% / 100% | 100% / 100% | +| pick | `click::decorators::option` | 355 (0, не импортир. файлов 1) | 14% / 90% | 100% / 94% / 100% | 100% / 100% | +| pick | `click::_compat::should_strip_ansi` | 26 (26) | 15% / 20% | 96% / 100% / 100% | 96% / 100% | +| pick | `click::_winconsole::get_buffer` | 0 | no test fails when it throws: названо 0 | названо 0 | | +| pick | `click::core::Parameter::handle_parse_result` | 365 (122) | 2% / 100% | 100% / 97% / 100% | 100% / 100% | +| pick | `click::core::Context::get_parameter_source` | 365 (122) | 1% / 100% | 100% / 97% / 100% | 100% / 100% | +| pick | `click::core::Context::call_on_close` | 16 (16) | 0% / 0% | 94% / 100% / 100% | 94% / 100% | +| pick | `click::formatting::HelpFormatter::write_dl` | 76 (76) | 13% / 50% | 100% / 99% / 100% | 100% / 90% | +| pick | `click::core::Group::result_callback` | 2 (2) | 100% / 100% | 100% / 100% / 100% | 100% / 100% | +| pick | `click::core::Context::ensure_object` | 2 (2) | 0% / 0% | 100% / 100% / 100% | 100% / 100% | +| pick | `click::_compat::get_best_encoding` | 5 (5) | 0% / 0% | 100% / 100% / 100% | 100% / 100% | +| pick | `click::_termui_impl::ProgressBar::format_bar` | 9 (9) | 33% / 100% | 100% / 90% / 90% | 100% / 90% | +| pick | `examples::aliases::aliases::Config::write_config` | 0 | no test fails when it throws: названо 0 | названо 0 | | +| random | `click::_winconsole::_WindowsConsoleWriter::write` | 0 | no test fails when it throws: названо 7 | названо 0 | | +| random | `click::core::Option::_pick_type` | 365 (0, не импортир. файлов 3) | 0% / 0% | 100% / 87% / 70% | 100% / 70% | +| random | `click::core::Argument::get_error_hint` | 14 (14) | 0% / 0% | 100% / 93% / 90% | 100% / 90% | +| random | `click::core::Parameter::consume_value` | 365 (122) | 1% / 100% | 100% / 97% / 100% | 100% / 100% | +| random | `click::core::Option::flag_activation_value` | 369 (120) | 0% / 0% | 100% / 97% / 100% | 100% / 100% | +| random | `click::_textwrap::TextWrapper::_wrap_chunks` | 113 (113) | 0% / 0% | 100% / 98% / 100% | 100% / 100% | +| random | `click::core::Group::invoke` | 41 (41) | 2% / 10% | 100% / 100% / 100% | 100% / 100% | +| random | `click::shell_completion::FishComplete::get_completion_args` | 1 (1) | 100% / 0% | 100% / 100% / 100% | 100% / 10% | +| random | `click::_winconsole::_get_windows_console_stream` | 0 | no test fails when it throws: названо 0 | названо 0 | | +| random | `click::decorators::version_option` | 3 (3) | 100% / 60% | 100% / 100% / 100% | 100% / 60% | +| random | `click::_compat::_FixupStream::readable` | 1 (1) | 0% / 0% | 100% / 100% / 100% | 100% / 33% | +| random | `click::_termui_impl::get_pager_file` | 19 (19) | 42% / 100% | 100% / 100% / 100% | 100% / 100% | +| random | `click::exceptions::ClickException::__init__` | 95 (95) | 0% / 0% | 100% / 93% / 100% | 100% / 100% | +| random | `click::types::Tuple::to_info_dict` | 1 (1) | 0% / 0% | 100% / 100% / 100% | 100% / 20% | +| random | `click::core::Option::process_value` | 335 (95) | 0% / 0% | 100% / 90% / 100% | 100% / 100% | +| random | `click::core::Group::parse_args` | 58 (58) | 16% / 60% | 100% / 98% / 100% | 100% / 100% | +| random | `click::core::Parameter::value_from_envvar` | 31 (31) | 0% / 0% | 100% / 97% / 100% | 100% / 100% | +| random | `click::core::Argument::get_help_record` | 26 (26) | 4% / 100% | 100% / 100% / 100% | 100% / 100% | +| random | `click::types::File::shell_complete` | 1 (1) | 0% / 0% | 100% / 100% / 100% | 100% / 100% | +| random | `click::core::Command::get_help_option` | 373 (122) | 1% / 80% | 100% / 98% / 100% | 100% / 100% | +| random | `click::shell_completion::ShellComplete::__init__` | 34 (34) | 100% / 80% | 100% / 100% / 100% | 100% / 100% | +| random | `click::parser::_OptionParser::parse_args` | 367 (121) | 1% / 40% | 100% / 97% / 100% | 100% / 100% | +| random | `click::shell_completion::BashComplete::get_completion_args` | 2 (2) | 100% / 0% | 100% / 100% / 100% | 100% / 20% | +| random | `click::_compat::_NonClosingTextIOWrapper::__del__` | 1 (1) | 0% / 0% | 100% / 100% / 100% | 100% / 100% | + +## Цена + +- прогон тестов: без покрытия 5.3 с, pytest-cov по тестам 13.4 с (×2.5), coverage `test_function` 13.0 с; медиана из 3 +- `.coverage` 3047424 байт; карта «функция → тест»: 143423 пар, 430 функций, 2571 контекстов; SQLite (2 int на пару) 1626112 байт +- тестов собрано 2648, разных имён тестов в карте 585 +- функций с телом: 585; исполнено хоть раз вне тестов (импорт, сбор): 33, только вне тестов: 0; не исполнено ни разу: 155 +- `test_function` против pytest-cov: пар 43755 против 143423; тестов, падающих по полной истине, но не найденных: 4 против 4 diff --git a/eval/results/learn-tests-cobra.json b/eval/results/learn-tests-cobra.json new file mode 100644 index 0000000..ccbadb6 --- /dev/null +++ b/eval/results/learn-tests-cobra.json @@ -0,0 +1,1661 @@ +{ + "repo": "cobra", + "lang": "go", + "commit": "adbc8813901b", + "seed": 7, + "gitnext_commit": "08e599c", + "functions": [ + { + "group": "pick", + "symbol": "main::CheckErr", + "file": "cobra.go", + "truth": 109, + "truth_doctests": 0, + "predicted_gitnext": 232, + "predicted_coverage": 109, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestFishCompletionNoActiveHelp", + "TestProgWithColon", + "TestProgWithDash", + "TestBashCompletionV2WithActiveHelp", + "TestPwshCompletionNoActiveHelp", + "TestZshCompletionWithActiveHelp", + "TestUsageStringRedirected", + "TestCompleteCmdInZshScript", + "TestCompleteNoDesCmdInZshScript", + "TestManPrintFlagsHidesShortDeprecated" + ], + "score": { + "gitnext": { + "recall": 0.926605504587156, + "precision": 0.4353448275862069, + "predicted": 232, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 109, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.45416666666666666, + "predicted": 240, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::CalledAs", + "file": "command.go", + "truth": 47, + "truth_doctests": 0, + "predicted_gitnext": 204, + "predicted_coverage": 47, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestArgAliasesCompletionInGo", + "TestCompletionDoesNotMutateOsArgs", + "TestFlagCompletionInGo", + "TestFlagDirFilterCompletionInGo", + "TestValidArgsCompletionInGo", + "TestValidArgsFuncSingleCmd", + "TestValidArgsFuncSingleCmdInvalidArg", + "TestValidArgsNotValidArgsFunc", + "TestCalledAs", + "TestActiveHelpForFlag" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.23039215686274508, + "predicted": 204, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 47, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.23039215686274508, + "predicted": 204, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::CommandPathPadding", + "file": "command.go", + "truth": 1, + "truth_doctests": 0, + "predicted_gitnext": 125, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestUsageIsNotPrintedTwice" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.008, + "predicted": 125, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.008, + "predicted": 125, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::Commands", + "file": "command.go", + "truth": 96, + "truth_doctests": 0, + "predicted_gitnext": 231, + "predicted_coverage": 96, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestEnableCommandSortingIsDisabled", + "TestCommandsAreSorted", + "TestGenMdDocWithNoLongOrSynopsis", + "TestGenMdTree", + "TestGenRSTTree", + "TestGenYamlTree", + "TestBashCompletionNoActiveHelp", + "TestBashCompletionDeprecatedFlag", + "TestBashCompletionHiddenFlag", + "TestGenMdDoc" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.4155844155844156, + "predicted": 231, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 96, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.4155844155844156, + "predicted": 231, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::FlagErrorFunc", + "file": "command.go", + "truth": 17, + "truth_doctests": 0, + "predicted_gitnext": 202, + "predicted_coverage": 17, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestFlagErrorFuncHelp", + "TestFlagInvalidInput", + "TestShorthandVersionFlagOnlyAddedIfShorthandNotDefined", + "TestShorthandVersionFlagOnlyAddedIfVersionNotDefined", + "TestShorthandVersionFlagOnlyExistsIfVersionNonEmpty", + "TestVersionFlagOnlyExistsIfVersionNonEmpty", + "TestFlagErrorFunc", + "TestChildFlagWithParentLocalFlag", + "TestShortVersionFlagOnlyAddedToRoot", + "TestVersionFlagOnlyAddedToRoot" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.08415841584158416, + "predicted": 202, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 17, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.08415841584158416, + "predicted": 202, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::Flags", + "file": "command.go", + "skipped": "mutant does not compile", + "predicted_gitnext": 253, + "predicted_coverage": 252 + }, + { + "group": "pick", + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "file": "powershell_completions.go", + "skipped": "no test fails when it throws", + "predicted_gitnext": 203, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "main::Command::GenZshCompletion", + "file": "zsh_completions.go", + "truth": 3, + "truth_doctests": 0, + "predicted_gitnext": 205, + "predicted_coverage": 3, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestZshCompletionWithActiveHelp", + "TestCompleteCmdInZshScript", + "TestDefaultCompletionCmd" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.014634146341463415, + "predicted": 205, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.014634146341463415, + "predicted": 205, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::HasParent", + "file": "command.go", + "skipped": "mutant does not compile", + "predicted_gitnext": 261, + "predicted_coverage": 265 + }, + { + "group": "pick", + "symbol": "main::Command::HasPersistentFlags", + "file": "command.go", + "truth": 4, + "truth_doctests": 0, + "predicted_gitnext": 11, + "predicted_coverage": 4, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestCompletionFuncCompatibility", + "TestGetFlagCompletion", + "TestFlagCompletionForPersistentFlagsCalledFromSubCmd", + "TestFlagCompletionWithNotInterspersedArgs" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.36363636363636365, + "predicted": 11, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.36363636363636365, + "predicted": 11, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::Help", + "file": "command.go", + "truth": 7, + "truth_doctests": 0, + "predicted_gitnext": 223, + "predicted_coverage": 7, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestHelpFuncExecuted", + "TestHelpCommandExecutedOnChild", + "TestHelpCommandExecutedOnChildWithFlagThatShadowsParentFlag", + "TestHelpFlagInHelp", + "TestHelpCommandExecuted", + "TestHelpCommandExecutedWithVersionSet", + "TestHelpCommandExecutedWithoutVersionSet" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.03139013452914798, + "predicted": 223, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 7, + "top_hits": 7, + "top_n": 7, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.03139013452914798, + "predicted": 223, + "top_hits": 7, + "top_n": 10, + "top_precision": 0.7, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::InitDefaultVersionFlag", + "file": "command.go", + "truth": 197, + "truth_doctests": 0, + "predicted_gitnext": 217, + "predicted_coverage": 197, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestShorthandVersionFlagExecuted", + "TestVersionFlagExecuted", + "TestVersionFlagExecutedDiplayName", + "TestVersionFlagExecutedWithNoName", + "TestShorthandVersionFlagExecutedOnSubcommand", + "TestShorthandVersionTemplate", + "TestVersionFlagExecutedOnSubcommand", + "TestVersionTemplate", + "TestCallCommandWithoutSubcommands", + "TestHelpExecutedOnNonRunnableChild" + ], + "score": { + "gitnext": { + "recall": 0.9796954314720813, + "precision": 0.8894009216589862, + "predicted": 217, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 197, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8914027149321267, + "predicted": 221, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::LocalFlags", + "file": "command.go", + "truth": 149, + "truth_doctests": 0, + "predicted_gitnext": 9, + "predicted_coverage": 149, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestConsistentNormalizedName", + "TestNormPassedOnLocal", + "TestSortedFlags", + "TestChildFlagShadowsParentPersistentFlag", + "TestNormPassedOnInherited", + "TestGenMdDocWithNoLongOrSynopsis", + "TestGenMdTree", + "TestGenRSTTree", + "TestGenYamlTree", + "TestBashCompletionNoActiveHelp" + ], + "score": { + "gitnext": { + "recall": 0.053691275167785234, + "precision": 0.8888888888888888, + "predicted": 9, + "top_hits": 8, + "top_n": 9, + "top_precision": 0.8888888888888888, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 149, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9933333333333333, + "predicted": 150, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::NamePadding", + "file": "command.go", + "truth": 21, + "truth_doctests": 0, + "predicted_gitnext": 125, + "predicted_coverage": 21, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestNoRootRunCommandExecutedWithVersionSet", + "TestNoRootRunCommandExecutedWithoutVersionSet", + "TestUsageIsNotPrintedTwice", + "TestFlagOnPflagCommandLine", + "TestHelpflagCommandExecutedWithVersionSet", + "TestHelpflagCommandExecutedWithoutVersionSet", + "TestUsageWithGroup", + "TestAddGroup", + "TestPluginWithSubCommands", + "TestUsageHelpGroup" + ], + "score": { + "gitnext": { + "recall": 0.9047619047619048, + "precision": 0.152, + "predicted": 125, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 21, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.16535433070866143, + "predicted": 127, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::OutOrStderr", + "file": "command.go", + "truth": 87, + "truth_doctests": 0, + "predicted_gitnext": 203, + "predicted_coverage": 87, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestUsageStringRedirected", + "TestAddTemplateFunctions", + "TestDeprecatedCommand", + "TestSetHelpCommand", + "TestCommandPrintRedirection", + "TestFlagsInUsage", + "TestPlugin", + "TestUseDeprecatedFlags", + "TestHelpFlagExecuted", + "TestLongVersionFlagOnlyInHelpWhenShortPredefined" + ], + "score": { + "gitnext": { + "recall": 0.9885057471264368, + "precision": 0.4236453201970443, + "predicted": 203, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 87, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.4264705882352941, + "predicted": 204, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::Print", + "file": "command.go", + "truth": 59, + "truth_doctests": 0, + "predicted_gitnext": 210, + "predicted_coverage": 59, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestUsageStringRedirected", + "TestDeprecatedCommand", + "TestSetHelpCommand", + "TestCommandPrintRedirection", + "TestUseDeprecatedFlags", + "TestFlagInvalidInput", + "TestShorthandVersionFlagOnlyAddedIfShorthandNotDefined", + "TestShorthandVersionFlagOnlyAddedIfVersionNotDefined", + "TestShorthandVersionFlagOnlyExistsIfVersionNonEmpty", + "TestVersionFlagOnlyExistsIfVersionNonEmpty" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.28095238095238095, + "predicted": 210, + "top_hits": 3, + "top_n": 10, + "top_precision": 0.3, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 59, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.28095238095238095, + "predicted": 210, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::PrintErrf", + "file": "command.go", + "truth": 7, + "truth_doctests": 0, + "predicted_gitnext": 205, + "predicted_coverage": 7, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestCaseSensitivityBackwardCompatibility", + "TestRootExecuteUnknownCommand", + "TestRootTakesNoArgs", + "TestSuggestions", + "TestCommandPrintRedirection", + "TestCaseInsensitive", + "TestCalledAs" + ], + "score": { + "gitnext": { + "recall": 0.8571428571428571, + "precision": 0.02926829268292683, + "predicted": 205, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 7, + "top_hits": 7, + "top_n": 7, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.03398058252427184, + "predicted": 206, + "top_hits": 7, + "top_n": 10, + "top_precision": 0.7, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::PrintErrln", + "file": "command.go", + "truth": 61, + "truth_doctests": 0, + "predicted_gitnext": 207, + "predicted_coverage": 61, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestCaseSensitivityBackwardCompatibility", + "TestRootExecuteUnknownCommand", + "TestRootTakesNoArgs", + "TestSuggestions", + "TestCommandPrintRedirection", + "TestFlagInvalidInput", + "TestShorthandVersionFlagOnlyAddedIfShorthandNotDefined", + "TestShorthandVersionFlagOnlyAddedIfVersionNotDefined", + "TestShorthandVersionFlagOnlyExistsIfVersionNonEmpty", + "TestVersionFlagOnlyExistsIfVersionNonEmpty" + ], + "score": { + "gitnext": { + "recall": 0.9836065573770492, + "precision": 0.2898550724637681, + "predicted": 207, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 61, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.2932692307692308, + "predicted": 208, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::Root", + "file": "command.go", + "truth": 248, + "truth_doctests": 0, + "predicted_gitnext": 237, + "predicted_coverage": 251, + "missed_by_coverage": [], + "covered_not_failing": [ + "TestWrongGroupFirstLevel", + "TestWrongGroupForHelp", + "TestWrongGroupNestedLevel" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 3, + "top_coverage": [ + "TestGetEnvConfig", + "TestMergeCommandLineToFlags", + "TestConsistentNormalizedName", + "TestNormPassedOnLocal", + "TestSortedFlags", + "TestCompletionFuncCompatibility", + "TestStripFlags", + "TestInitHelpFlagMergesFlags", + "TestChildFlagShadowsParentPersistentFlag", + "TestNormPassedOnInherited" + ], + "score": { + "gitnext": { + "recall": 0.9435483870967742, + "precision": 0.9873417721518988, + "predicted": 237, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9880478087649402, + "predicted": 251, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9880478087649402, + "predicted": 251, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::SetGlobalNormalizationFunc", + "file": "command.go", + "truth": 4, + "truth_doctests": 0, + "predicted_gitnext": 229, + "predicted_coverage": 4, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestGlobalNormFuncPropagation", + "TestConsistentNormalizedName", + "TestNormPassedOnLocal", + "TestNormPassedOnInherited" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.017467248908296942, + "predicted": 229, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.017467248908296942, + "predicted": 229, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::UseLine", + "file": "command.go", + "truth": 86, + "truth_doctests": 0, + "predicted_gitnext": 19, + "predicted_coverage": 86, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestGenManTree", + "TestGenMdNoTag", + "TestGenRSTNoTag", + "TestGenYamlDocRunnable", + "TestGenYamlNoTag", + "TestGenManSeeAlso", + "TestGenManDoc", + "TestGenManNoGenTag", + "TestGenManNoHiddenParents", + "TestFlagsInUsage" + ], + "score": { + "gitnext": { + "recall": 0.11627906976744186, + "precision": 0.5263157894736842, + "predicted": 19, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 86, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9052631578947369, + "predicted": 95, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::Command::ValidateFlagGroups", + "file": "flag_groups.go", + "truth": 116, + "truth_doctests": 0, + "predicted_gitnext": 202, + "predicted_coverage": 116, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestCallCommandWithoutSubcommands", + "TestNoArgs", + "TestEmptyInputs", + "TestHiddenCommandExecutes", + "TestSetContext", + "TestSetContextPreRun", + "TestMinimumNArgs", + "TestMinimumNArgs_WithValid", + "TestMinimumNArgs_WithValid__WithInvalidArgs", + "TestSetContextPreRunOverwrite" + ], + "score": { + "gitnext": { + "recall": 0.9655172413793104, + "precision": 0.5544554455445545, + "predicted": 202, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 116, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.5631067961165048, + "predicted": 206, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::CompErrorln", + "file": "completions.go", + "truth": 1, + "truth_doctests": 0, + "predicted_gitnext": 203, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestNoCmdNameCompletionInGo" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.0049261083743842365, + "predicted": 203, + "top_hits": 0, + "top_n": 10, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.0049261083743842365, + "predicted": 203, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::MinimumNArgs", + "file": "args.go", + "truth": 204, + "truth_doctests": 0, + "predicted_gitnext": 204, + "predicted_coverage": 208, + "missed_by_coverage": [], + "covered_not_failing": [ + "TestWrongGroupFirstLevel", + "TestWrongGroupForCompletion", + "TestWrongGroupForHelp", + "TestWrongGroupNestedLevel" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 4, + "top_coverage": [ + "TestWrongGroupFirstLevel", + "TestWrongGroupForCompletion", + "TestWrongGroupForHelp", + "TestInitDefaultCompletionCmd", + "TestShorthandVersionFlagExecuted", + "TestVersionFlagExecuted", + "TestVersionFlagExecutedDiplayName", + "TestVersionFlagExecutedWithNoName", + "TestWrongGroupNestedLevel", + "TestShorthandVersionFlagExecutedOnSubcommand" + ], + "score": { + "gitnext": { + "recall": 0.9803921568627451, + "precision": 0.9803921568627451, + "predicted": 204, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.9807692307692307, + "predicted": 208, + "top_hits": 6, + "top_n": 10, + "top_precision": 0.6, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9807692307692307, + "predicted": 208, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "main::flagCompError::Error", + "file": "completions.go", + "skipped": "no test fails when it throws", + "predicted_gitnext": 212, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "main::Command::UsageTemplate", + "file": "command.go", + "skipped": "no test fails when it throws", + "predicted_gitnext": 125, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "main::rpad", + "file": "cobra.go", + "truth": 22, + "truth_doctests": 0, + "predicted_gitnext": 5, + "predicted_coverage": 22, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestRpad", + "TestNoRootRunCommandExecutedWithVersionSet", + "TestNoRootRunCommandExecutedWithoutVersionSet", + "TestUsageIsNotPrintedTwice", + "TestFlagOnPflagCommandLine", + "TestHelpflagCommandExecutedWithVersionSet", + "TestHelpflagCommandExecutedWithoutVersionSet", + "TestUsageWithGroup", + "TestAddGroup", + "TestPluginWithSubCommands" + ], + "score": { + "gitnext": { + "recall": 0.045454545454545456, + "precision": 0.2, + "predicted": 5, + "top_hits": 1, + "top_n": 5, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 22, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8461538461538461, + "predicted": 26, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "main::ShellCompDirective::string", + "file": "completions.go", + "truth": 46, + "truth_doctests": 0, + "predicted_gitnext": 205, + "predicted_coverage": 46, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestArgAliasesCompletionInGo", + "TestCompletionDoesNotMutateOsArgs", + "TestFlagCompletionInGo", + "TestFlagDirFilterCompletionInGo", + "TestValidArgsCompletionInGo", + "TestValidArgsFuncSingleCmd", + "TestValidArgsFuncSingleCmdInvalidArg", + "TestValidArgsNotValidArgsFunc", + "TestActiveHelpForFlag", + "TestArgsNotDetectedAsFlagsCompletionInGo" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.22439024390243903, + "predicted": 205, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 46, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.22439024390243903, + "predicted": 205, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "main::writeCmdAliases", + "file": "bash_completions.go", + "truth": 4, + "truth_doctests": 0, + "predicted_gitnext": 8, + "predicted_coverage": 4, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestCompleteCmdInBashScript", + "TestNoValidArgsFuncInBashScript", + "TestValidArgsFuncInBashScript", + "TestBashCompletions" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.5, + "predicted": 8, + "top_hits": 4, + "top_n": 8, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.5, + "predicted": 8, + "top_hits": 4, + "top_n": 8, + "top_precision": 0.5, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "main::Command::UsagePadding", + "file": "command.go", + "skipped": "no test fails when it throws", + "predicted_gitnext": 125, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "main::Command::getVersionTemplateFunc", + "file": "command.go", + "truth": 8, + "truth_doctests": 0, + "predicted_gitnext": 202, + "predicted_coverage": 8, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestShorthandVersionFlagExecuted", + "TestVersionFlagExecuted", + "TestVersionFlagExecutedDiplayName", + "TestVersionFlagExecutedWithNoName", + "TestShorthandVersionFlagExecutedOnSubcommand", + "TestShorthandVersionTemplate", + "TestVersionFlagExecutedOnSubcommand", + "TestVersionTemplate" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.039603960396039604, + "predicted": 202, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.039603960396039604, + "predicted": 202, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "doc::GenManTreeFromOpts", + "file": "doc/man_docs.go", + "truth": 1, + "truth_doctests": 0, + "predicted_gitnext": 6, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestGenManTree" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.16666666666666666, + "predicted": 6, + "top_hits": 1, + "top_n": 6, + "top_precision": 0.16666666666666666, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.16666666666666666, + "predicted": 6, + "top_hits": 1, + "top_n": 6, + "top_precision": 0.16666666666666666, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "main::validateOneRequiredFlagGroups", + "file": "flag_groups.go", + "truth": 68, + "truth_doctests": 0, + "predicted_gitnext": 195, + "predicted_coverage": 68, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestCallCommandWithoutSubcommands", + "TestNoArgs", + "TestEmptyInputs", + "TestHiddenCommandExecutes", + "TestSetContext", + "TestSetContextPreRun", + "TestMinimumNArgs", + "TestMinimumNArgs_WithValid", + "TestMinimumNArgs_WithValid__WithInvalidArgs", + "TestSetContextPreRunOverwrite" + ], + "score": { + "gitnext": { + "recall": 0.8529411764705882, + "precision": 0.29743589743589743, + "predicted": 195, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 68, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.33170731707317075, + "predicted": 205, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "main::Command::ResetCommands", + "file": "command.go", + "skipped": "no test fails when it throws", + "predicted_gitnext": 125, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "main::Command::SetHelpTemplate", + "file": "command.go", + "truth": 1, + "truth_doctests": 0, + "predicted_gitnext": 125, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestSetHelpTemplate" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.008, + "predicted": 125, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.008, + "predicted": 125, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "main::prepareCustomAnnotationsForFlags", + "file": "bash_completions.go", + "truth": 8, + "truth_doctests": 0, + "predicted_gitnext": 8, + "predicted_coverage": 8, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "TestBashCompletionNoActiveHelp", + "TestBashCompletionDeprecatedFlag", + "TestBashCompletionHiddenFlag", + "TestBashCompletionTraverseChildren", + "TestCompleteCmdInBashScript", + "TestNoValidArgsFuncInBashScript", + "TestValidArgsFuncInBashScript", + "TestBashCompletions" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "main::Command::CommandPath", + "file": "command.go", + "skipped": "mutant does not compile", + "predicted_gitnext": 252, + "predicted_coverage": 253 + } + ], + "summary": { + "pick": { + "gitnext": { + "recall": 0.89, + "precision": 0.362, + "top_precision": 0.442, + "caught": 0.81 + }, + "coverage": { + "recall": 1.0, + "precision": 0.999, + "top_precision": 0.981, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.388, + "top_precision": 0.795, + "caught": 1.0 + }, + "functions": 21 + }, + "random": { + "gitnext": { + "recall": 0.862, + "precision": 0.305, + "top_precision": 0.346, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.39, + "top_precision": 0.696, + "caught": 1.0 + }, + "functions": 8 + }, + "all": { + "gitnext": { + "recall": 0.883, + "precision": 0.346, + "top_precision": 0.416, + "caught": 0.862 + }, + "coverage": { + "recall": 1.0, + "precision": 0.999, + "top_precision": 0.986, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.388, + "top_precision": 0.768, + "caught": 1.0 + }, + "functions": 29 + } + }, + "cost": { + "build_s": 0.9, + "run_one_by_one_s": 2.7, + "map_s": 3.5, + "profiles_bytes": 16868180, + "packages": 2, + "testmain_packages": [], + "repeat": 3, + "plain_s": 0.7, + "tests": 279, + "map_pairs": 13106, + "map_functions": 236, + "map_sqlite_bytes": 143360, + "functions_with_body": 270, + "functions_never_run": 34, + "fail_alone_not_together": [], + "fail_together_not_alone": [], + "slowdown_runs": 5.0 + } +} \ No newline at end of file diff --git a/eval/results/learn-tests-cobra.md b/eval/results/learn-tests-cobra.md new file mode 100644 index 0000000..6fb5f0c --- /dev/null +++ b/eval/results/learn-tests-cobra.md @@ -0,0 +1,76 @@ +# learn-tests на cobra (go): покрытие по тестам против `tests-for` +cobra adbc8813901b, gitnext 08e599c, seed 7. Истина — eval (тесты, падающие при panic в начале функции). pick — функции с ответом в кэше eval, random — случайные. + +| выборка | функций | источник | полнота | точность | из 10 падают | поймано | +|---|---:|---|---:|---:|---:|---:| +| pick (кэш eval) | 21 | gitnext | 89% | 36% | 44% | 81% | +| pick (кэш eval) | 21 | coverage | 100% | 100% | 98% | 100% | +| pick (кэш eval) | 21 | union | 100% | 39% | 80% | 100% | +| случайные | 8 | gitnext | 86% | 30% | 35% | 100% | +| случайные | 8 | coverage | 100% | 100% | 100% | 100% | +| случайные | 8 | union | 100% | 39% | 70% | 100% | +| все | 29 | gitnext | 88% | 35% | 42% | 86% | +| все | 29 | coverage | 100% | 100% | 99% | 100% | +| все | 29 | union | 100% | 39% | 77% | 100% | + +## По функциям + +| выборка | функция | падают | граф: полн / из 10 | покрытие: полн / точн / из 10 | мимо покрытия | +|---|---|---:|---|---|---| +| pick | `main::CheckErr` | 109 | 93% / 80% | 100% / 100% / 100% | | +| pick | `main::Command::CalledAs` | 47 | 100% / 20% | 100% / 100% / 100% | | +| pick | `main::Command::CommandPathPadding` | 1 | 100% / 0% | 100% / 100% / 100% | | +| pick | `main::Command::Commands` | 96 | 100% / 100% | 100% / 100% / 100% | | +| pick | `main::Command::FlagErrorFunc` | 17 | 100% / 20% | 100% / 100% / 100% | | +| pick | `main::Command::Flags` | 0 | mutant does not compile | названо 252 | | +| pick | `main::Command::GenPowerShellCompletionWithDesc` | 0 | no test fails when it throws | названо 0 | | +| pick | `main::Command::GenZshCompletion` | 3 | 100% / 30% | 100% / 100% / 100% | | +| pick | `main::Command::HasParent` | 0 | mutant does not compile | названо 265 | | +| pick | `main::Command::HasPersistentFlags` | 4 | 100% / 30% | 100% / 100% / 100% | | +| pick | `main::Command::Help` | 7 | 100% / 0% | 100% / 100% / 100% | | +| pick | `main::Command::InitDefaultVersionFlag` | 197 | 98% / 80% | 100% / 100% / 100% | | +| pick | `main::Command::LocalFlags` | 149 | 5% / 89% | 100% / 100% / 100% | | +| pick | `main::Command::NamePadding` | 21 | 90% / 0% | 100% / 100% / 100% | | +| pick | `main::Command::OutOrStderr` | 87 | 99% / 40% | 100% / 100% / 100% | | +| pick | `main::Command::Print` | 59 | 100% / 30% | 100% / 100% / 100% | | +| pick | `main::Command::PrintErrf` | 7 | 86% / 10% | 100% / 100% / 100% | | +| pick | `main::Command::PrintErrln` | 61 | 98% / 20% | 100% / 100% / 100% | | +| pick | `main::Command::Root` | 248 | 94% / 100% | 100% / 99% / 100% | | +| pick | `main::Command::SetGlobalNormalizationFunc` | 4 | 100% / 40% | 100% / 100% / 100% | | +| pick | `main::Command::UseLine` | 86 | 12% / 40% | 100% / 100% / 100% | | +| pick | `main::Command::ValidateFlagGroups` | 116 | 97% / 100% | 100% / 100% / 100% | | +| pick | `main::CompErrorln` | 1 | 100% / 0% | 100% / 100% / 100% | | +| pick | `main::MinimumNArgs` | 204 | 98% / 100% | 100% / 98% / 60% | | +| pick | `main::flagCompError::Error` | 0 | no test fails when it throws | названо 0 | | +| random | `main::Command::UsageTemplate` | 0 | no test fails when it throws | названо 0 | | +| random | `main::rpad` | 22 | 5% / 20% | 100% / 100% / 100% | | +| random | `main::ShellCompDirective::string` | 46 | 100% / 20% | 100% / 100% / 100% | | +| random | `main::writeCmdAliases` | 4 | 100% / 50% | 100% / 100% / 100% | | +| random | `main::Command::UsagePadding` | 0 | no test fails when it throws | названо 0 | | +| random | `main::Command::getVersionTemplateFunc` | 8 | 100% / 20% | 100% / 100% / 100% | | +| random | `doc::GenManTreeFromOpts` | 1 | 100% / 17% | 100% / 100% / 100% | | +| random | `main::validateOneRequiredFlagGroups` | 68 | 85% / 40% | 100% / 100% / 100% | | +| random | `main::Command::ResetCommands` | 0 | no test fails when it throws | названо 0 | | +| random | `main::Command::SetHelpTemplate` | 1 | 100% / 10% | 100% / 100% / 100% | | +| random | `main::prepareCustomAnnotationsForFlags` | 8 | 100% / 100% | 100% / 100% / 100% | | +| random | `main::Command::CommandPath` | 0 | mutant does not compile | названо 253 | | + +## Цена + +- `build_s`: 0.9 +- `run_one_by_one_s`: 2.7 +- `map_s`: 3.5 +- `profiles_bytes`: 16868180 +- `packages`: 2 +- `testmain_packages`: [] +- `repeat`: 3 +- `plain_s`: 0.7 +- `tests`: 279 +- `map_pairs`: 13106 +- `map_functions`: 236 +- `map_sqlite_bytes`: 143360 +- `functions_with_body`: 270 +- `functions_never_run`: 34 +- `fail_alone_not_together`: [] +- `fail_together_not_alone`: [] +- `slowdown_runs`: 5.0 diff --git a/eval/results/learn-tests-indexmap.json b/eval/results/learn-tests-indexmap.json new file mode 100644 index 0000000..db4d50e --- /dev/null +++ b/eval/results/learn-tests-indexmap.json @@ -0,0 +1,1483 @@ +{ + "repo": "indexmap", + "lang": "rust", + "commit": "41a870887c4c", + "seed": 7, + "gitnext_commit": "08e599c", + "functions": [ + { + "group": "pick", + "symbol": "indexmap::benches::bench::simple_sort", + "file": "benches/bench.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "indexmap::inner::Core::get_index_of_raw", + "file": "src/inner.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 1, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "indexmap::inner::Core::replace_index_unique", + "file": "src/inner.rs", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 2, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "replace_index", + "is_sorted" + ], + "score": { + "gitnext": { + "recall": 0.5, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.6666666666666666, + "predicted": 3, + "top_hits": 2, + "top_n": 3, + "top_precision": 0.6666666666666666, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::inner::Core::retain_in_order", + "file": "src/inner.rs", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 2, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "retain", + "retain_ordered" + ], + "score": { + "gitnext": { + "recall": 0.5, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.6666666666666666, + "predicted": 3, + "top_hits": 2, + "top_n": 3, + "top_precision": 0.6666666666666666, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::inner::Core::shift_insert_unique", + "file": "src/inner.rs", + "truth": 6, + "truth_doctests": 0, + "predicted_gitnext": 1, + "predicted_coverage": 8, + "missed_by_coverage": [], + "covered_not_failing": [ + "insert_before_oob", + "shift_insert_oob" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 2, + "top_coverage": [ + "insert_before_oob", + "shift_insert_oob", + "insert_sorted", + "insert_sorted_by", + "insert_sorted_by_key", + "shift_insert", + "occupied_entry_shift_insert", + "raw_occupied_entry_shift_insert" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 1, + "top_hits": 0, + "top_n": 1, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.75, + "predicted": 8, + "top_hits": 6, + "top_n": 8, + "top_precision": 0.75, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.6666666666666666, + "predicted": 9, + "top_hits": 6, + "top_n": 9, + "top_precision": 0.6666666666666666, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::inner::Core::split_splice", + "file": "src/inner.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 1, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "indexmap::inner::extract::ExtractCore::remaining", + "file": "src/inner/extract.rs", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 0, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "extract_if_odd", + "extract_if_odd_limit" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::map::IndexMap::contains_key", + "file": "src/map.rs", + "truth": 15, + "truth_doctests": 0, + "predicted_gitnext": 4, + "predicted_coverage": 15, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_lookup", + "test_string_str", + "drain_bounds", + "replace_index", + "vacant_replace_index", + "comparisons", + "from_array", + "extract_if_odd", + "retain_ordered", + "extract_if_odd_limit" + ], + "score": { + "gitnext": { + "recall": 0.26666666666666666, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 15, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 15, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::map::IndexMap::sort_keys", + "file": "src/map.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 6, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "indexmap::map::IndexMap::sort_unstable_keys", + "file": "src/map.rs", + "truth": 1, + "truth_doctests": 0, + "predicted_gitnext": 7, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "sort_unstable" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.14285714285714285, + "predicted": 7, + "top_hits": 1, + "top_n": 7, + "top_precision": 0.14285714285714285, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.14285714285714285, + "predicted": 7, + "top_hits": 1, + "top_n": 7, + "top_precision": 0.14285714285714285, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::map::disjoint::get_disjoint_opt_mut", + "file": "src/map/disjoint.rs", + "truth": 8, + "truth_doctests": 0, + "predicted_gitnext": 9, + "predicted_coverage": 9, + "missed_by_coverage": [], + "covered_not_failing": [ + "disjoint_mut_multi_fail_duplicate_panic" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 1, + "top_coverage": [ + "disjoint_mut_empty_map", + "disjoint_mut_empty_param", + "disjoint_mut_multi_fail_duplicate_panic", + "disjoint_mut_single_fail", + "disjoint_mut_single_success", + "disjoint_mut_multi_fail_missing", + "disjoint_mut_multi_success", + "disjoint_mut_multi_success_borrow_key", + "disjoint_mut_multi_success_unsized_key" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.8888888888888888, + "predicted": 9, + "top_hits": 8, + "top_n": 9, + "top_precision": 0.8888888888888888, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.8888888888888888, + "predicted": 9, + "top_hits": 8, + "top_n": 9, + "top_precision": 0.8888888888888888, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8888888888888888, + "predicted": 9, + "top_hits": 8, + "top_n": 9, + "top_precision": 0.8888888888888888, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash", + "file": "src/map/raw_entry_v1.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 1, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut", + "file": "src/map/raw_entry_v1.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 1, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "indexmap::map::raw_entry_v1::RawVacantEntryMut::insert_hashed_nocheck", + "file": "src/map/raw_entry_v1.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 1, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck", + "file": "src/map/raw_entry_v1.rs", + "truth": 1, + "truth_doctests": 0, + "predicted_gitnext": 1, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "raw_occupied_entry_shift_insert" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 1, + "top_hits": 0, + "top_n": 1, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::map::slice::Slice::from_mut_slice", + "file": "src/map/slice.rs", + "truth": 13, + "truth_doctests": 0, + "predicted_gitnext": 12, + "predicted_coverage": 13, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "slice_new_mut", + "disjoint_indices_mut_empty", + "disjoint_indices_mut_fail_duplicate", + "disjoint_indices_mut_fail_oob", + "disjoint_indices_mut_success", + "get_range_mut", + "slice_get_index_mut", + "slice_split_first", + "slice_split_first_mut", + "slice_split_last" + ], + "score": { + "gitnext": { + "recall": 0.9230769230769231, + "precision": 1.0, + "predicted": 12, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 13, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 13, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::rayon::set::IndexSet::par_difference", + "file": "src/rayon/set.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 5, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "indexmap::rayon::set::IndexSet::par_is_subset", + "file": "src/rayon/set.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 5, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "indexmap::serde::cautious_capacity", + "file": "src/serde.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "indexmap::set::IndexSet::contains", + "file": "src/set.rs", + "truth": 5, + "truth_doctests": 0, + "predicted_gitnext": 5, + "predicted_coverage": 5, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "comparisons", + "from_array", + "iter_comparisons", + "partial_eq_and_eq", + "ops" + ], + "score": { + "gitnext": { + "recall": 0.6, + "precision": 0.6, + "predicted": 5, + "top_hits": 3, + "top_n": 5, + "top_precision": 0.6, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.7142857142857143, + "predicted": 7, + "top_hits": 5, + "top_n": 7, + "top_precision": 0.7142857142857143, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::set::IndexSet::difference", + "file": "src/set.rs", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 5, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "iter_comparisons", + "ops" + ], + "score": { + "gitnext": { + "recall": 0.5, + "precision": 0.2, + "predicted": 5, + "top_hits": 1, + "top_n": 5, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.3333333333333333, + "predicted": 6, + "top_hits": 2, + "top_n": 6, + "top_precision": 0.3333333333333333, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::set::IndexSet::intersection", + "file": "src/set.rs", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 5, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "iter_comparisons", + "ops" + ], + "score": { + "gitnext": { + "recall": 0.5, + "precision": 0.2, + "predicted": 5, + "top_hits": 1, + "top_n": 5, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.3333333333333333, + "predicted": 6, + "top_hits": 2, + "top_n": 6, + "top_precision": 0.3333333333333333, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::set::IndexSet::is_subset", + "file": "src/set.rs", + "truth": 4, + "truth_doctests": 0, + "predicted_gitnext": 5, + "predicted_coverage": 4, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "comparisons", + "from_array", + "partial_eq_and_eq", + "ops" + ], + "score": { + "gitnext": { + "recall": 0.5, + "precision": 0.4, + "predicted": 5, + "top_hits": 2, + "top_n": 5, + "top_precision": 0.4, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.5714285714285714, + "predicted": 7, + "top_hits": 4, + "top_n": 7, + "top_precision": 0.5714285714285714, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::set::IndexSet::swap_take", + "file": "src/set.rs", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 8, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "take", + "swap_take" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.25, + "predicted": 8, + "top_hits": 2, + "top_n": 8, + "top_precision": 0.25, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.25, + "predicted": 8, + "top_hits": 2, + "top_n": 8, + "top_precision": 0.25, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::set::IndexSet::union", + "file": "src/set.rs", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 5, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "iter_comparisons", + "ops" + ], + "score": { + "gitnext": { + "recall": 0.5, + "precision": 0.2, + "predicted": 5, + "top_hits": 1, + "top_n": 5, + "top_precision": 0.2, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.3333333333333333, + "predicted": 6, + "top_hits": 2, + "top_n": 6, + "top_precision": 0.3333333333333333, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::util::assert_index_le", + "file": "src/util.rs", + "truth": 6, + "truth_doctests": 0, + "predicted_gitnext": 8, + "predicted_coverage": 8, + "missed_by_coverage": [], + "covered_not_failing": [ + "insert_before_oob", + "shift_insert_oob" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 2, + "top_coverage": [ + "insert_before_oob", + "shift_insert_oob", + "insert_sorted", + "insert_sorted_by", + "insert_sorted_by_key", + "shift_insert", + "split_off", + "insert_sorted_bad" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.75, + "predicted": 8, + "top_hits": 6, + "top_n": 8, + "top_precision": 0.75, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.75, + "predicted": 8, + "top_hits": 6, + "top_n": 8, + "top_precision": 0.75, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.75, + "predicted": 8, + "top_hits": 6, + "top_n": 8, + "top_precision": 0.75, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::util::simplify_range", + "file": "src/util.rs", + "truth": 6, + "truth_doctests": 0, + "predicted_gitnext": 0, + "predicted_coverage": 6, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "drain_bounds", + "drain", + "drain_range", + "extract_if_odd", + "extract_if_odd_limit", + "drain_full" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::util::third", + "file": "src/util.rs", + "truth": 11, + "truth_doctests": 0, + "predicted_gitnext": 0, + "predicted_coverage": 11, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_string_str", + "remove_to_empty", + "insert_remove", + "shift_remove", + "drain_full", + "equality", + "keys_values_mut", + "operations_i8", + "operations_string", + "keys_values" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 11, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 11, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "indexmap::util::try_simplify_range", + "file": "src/util.rs", + "truth": 3, + "truth_doctests": 0, + "predicted_gitnext": 3, + "predicted_coverage": 3, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "get_range_mut", + "get_range", + "slice_get_range" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "indexmap::map::iter::IterMut::default", + "file": "src/map/iter.rs", + "truth": 1, + "truth_doctests": 0, + "predicted_gitnext": 4, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "iter_default" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.25, + "predicted": 4, + "top_hits": 1, + "top_n": 4, + "top_precision": 0.25, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.25, + "predicted": 4, + "top_hits": 1, + "top_n": 4, + "top_precision": 0.25, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "indexmap::rayon::set::IndexSet::par_sort_unstable_by_key", + "file": "src/rayon/set.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 5, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "indexmap::map::slice::Slice::split_first", + "file": "src/map/slice.rs", + "truth": 1, + "truth_doctests": 0, + "predicted_gitnext": 10, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "slice_split_first" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.1, + "predicted": 10, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.1, + "predicted": 10, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "indexmap::inner::Core::move_index_inner", + "file": "src/inner.rs", + "truth": 7, + "truth_doctests": 0, + "predicted_gitnext": 2, + "predicted_coverage": 7, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "map_move_index", + "shift_insert", + "indexed_entry_move_index", + "occupied_entry_move_index", + "set_move_index", + "raw_occupied_entry_move_index", + "insert_sorted_bad" + ], + "score": { + "gitnext": { + "recall": 0.14285714285714285, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 7, + "top_hits": 7, + "top_n": 7, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.875, + "predicted": 8, + "top_hits": 7, + "top_n": 8, + "top_precision": 0.875, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "indexmap::inner::update_index", + "file": "src/inner.rs", + "truth": 32, + "truth_doctests": 0, + "predicted_gitnext": 3, + "predicted_coverage": 32, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_string_str", + "swap_remove_index", + "shift_remove_full", + "shift_shift_remove_index", + "shift_remove_entry", + "insert_remove", + "insert_sorted", + "insert_sorted_by", + "drain_range", + "shift_remove_index" + ], + "score": { + "gitnext": { + "recall": 0.0625, + "precision": 0.6666666666666666, + "predicted": 3, + "top_hits": 2, + "top_n": 3, + "top_precision": 0.6666666666666666, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 32, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9696969696969697, + "predicted": 33, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "indexmap::rayon::map::Slice::par_values", + "file": "src/rayon/map.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 6, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "indexmap::map::iter::ExtractIf::next", + "file": "src/map/iter.rs", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 0, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "extract_if_odd", + "extract_if_odd_limit" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "indexmap::map::IndexMap::shift_remove_entry", + "file": "src/map.rs", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 8, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "shift_remove_entry", + "shift_take" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.25, + "predicted": 8, + "top_hits": 2, + "top_n": 8, + "top_precision": 0.25, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.25, + "predicted": 8, + "top_hits": 2, + "top_n": 8, + "top_precision": 0.25, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "indexmap::rayon::map::Slice::par_values_mut", + "file": "src/rayon/map.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 6, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "indexmap::set::iter::Difference::clone", + "file": "src/set/iter.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "indexmap::rayon::set::ParIntersection::fmt", + "file": "src/rayon/set.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "indexmap::inner::Core::shrink_to", + "file": "src/inner.rs", + "truth": 4, + "truth_doctests": 0, + "predicted_gitnext": 3, + "predicted_coverage": 4, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "try_reserve_exact", + "shrink_to_fit", + "occupied_entry_shift_insert", + "raw_occupied_entry_shift_insert" + ], + "score": { + "gitnext": { + "recall": 0.5, + "precision": 0.6666666666666666, + "predicted": 3, + "top_hits": 2, + "top_n": 3, + "top_precision": 0.6666666666666666, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.8, + "predicted": 5, + "top_hits": 4, + "top_n": 5, + "top_precision": 0.8, + "caught": 1.0 + } + } + } + ], + "summary": { + "pick": { + "gitnext": { + "recall": 0.515, + "precision": 0.402, + "top_precision": 0.402, + "caught": 0.737 + }, + "coverage": { + "recall": 1.0, + "precision": 0.968, + "top_precision": 0.968, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.675, + "top_precision": 0.675, + "caught": 1.0 + }, + "functions": 19 + }, + "random": { + "gitnext": { + "recall": 0.529, + "precision": 0.348, + "top_precision": 0.348, + "caught": 0.857 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.606, + "top_precision": 0.611, + "caught": 1.0 + }, + "functions": 7 + }, + "all": { + "gitnext": { + "recall": 0.519, + "precision": 0.387, + "top_precision": 0.387, + "caught": 0.769 + }, + "coverage": { + "recall": 1.0, + "precision": 0.976, + "top_precision": 0.976, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.656, + "top_precision": 0.657, + "caught": 1.0 + }, + "functions": 26 + } + }, + "cost": { + "build_s": 12.0, + "run_one_by_one_s": 4.1, + "export_s": 9.8, + "map_s": 25.9, + "map_without_build_s": 13.9, + "profiles_bytes": 40501624, + "test_binaries": 5, + "files_with_doctests": "7", + "repeat": 3, + "plain_s": 2.1, + "tests": 183, + "map_pairs": 5003, + "map_functions": 381, + "map_sqlite_bytes": 69632, + "functions_with_body": 739, + "functions_never_run": 345, + "fail_alone_not_together": [], + "fail_together_not_alone": [], + "slowdown_runs": 12.3 + } +} \ No newline at end of file diff --git a/eval/results/learn-tests-indexmap.md b/eval/results/learn-tests-indexmap.md new file mode 100644 index 0000000..a38f7b9 --- /dev/null +++ b/eval/results/learn-tests-indexmap.md @@ -0,0 +1,82 @@ +# learn-tests на indexmap (rust): покрытие по тестам против `tests-for` +indexmap 41a870887c4c, gitnext 08e599c, seed 7. Истина — eval (тесты, падающие при panic в начале функции). pick — функции с ответом в кэше eval, random — случайные. + +| выборка | функций | источник | полнота | точность | из 10 падают | поймано | +|---|---:|---|---:|---:|---:|---:| +| pick (кэш eval) | 19 | gitnext | 52% | 40% | 40% | 74% | +| pick (кэш eval) | 19 | coverage | 100% | 97% | 97% | 100% | +| pick (кэш eval) | 19 | union | 100% | 68% | 68% | 100% | +| случайные | 7 | gitnext | 53% | 35% | 35% | 86% | +| случайные | 7 | coverage | 100% | 100% | 100% | 100% | +| случайные | 7 | union | 100% | 61% | 61% | 100% | +| все | 26 | gitnext | 52% | 39% | 39% | 77% | +| все | 26 | coverage | 100% | 98% | 98% | 100% | +| все | 26 | union | 100% | 66% | 66% | 100% | + +## По функциям + +| выборка | функция | падают | граф: полн / из 10 | покрытие: полн / точн / из 10 | мимо покрытия | +|---|---|---:|---|---|---| +| pick | `indexmap::benches::bench::simple_sort` | 0 | no test fails when it throws | названо 0 | | +| pick | `indexmap::inner::Core::get_index_of_raw` | 0 | no test fails when it throws | названо 0 | | +| pick | `indexmap::inner::Core::replace_index_unique` | 2 | 50% / 50% | 100% / 100% / 100% | | +| pick | `indexmap::inner::Core::retain_in_order` | 2 | 50% / 50% | 100% / 100% / 100% | | +| pick | `indexmap::inner::Core::shift_insert_unique` | 6 | 0% / 0% | 100% / 75% / 75% | | +| pick | `indexmap::inner::Core::split_splice` | 0 | no test fails when it throws | названо 0 | | +| pick | `indexmap::inner::extract::ExtractCore::remaining` | 2 | 0% / 0% | 100% / 100% / 100% | | +| pick | `indexmap::map::IndexMap::contains_key` | 15 | 27% / 100% | 100% / 100% / 100% | | +| pick | `indexmap::map::IndexMap::sort_keys` | 0 | no test fails when it throws | названо 0 | | +| pick | `indexmap::map::IndexMap::sort_unstable_keys` | 1 | 100% / 14% | 100% / 100% / 100% | | +| pick | `indexmap::map::disjoint::get_disjoint_opt_mut` | 8 | 100% / 89% | 100% / 89% / 89% | | +| pick | `indexmap::map::raw_entry_v1::RawEntryBuilder::index_from_hash` | 0 | no test fails when it throws | названо 0 | | +| pick | `indexmap::map::raw_entry_v1::RawOccupiedEntryMut::into_key_value_mut` | 0 | no test fails when it throws | названо 0 | | +| pick | `indexmap::map::raw_entry_v1::RawVacantEntryMut::insert_hashed_nocheck` | 0 | no test fails when it throws | названо 0 | | +| pick | `indexmap::map::raw_entry_v1::RawVacantEntryMut::shift_insert_hashed_nocheck` | 1 | 0% / 0% | 100% / 100% / 100% | | +| pick | `indexmap::map::slice::Slice::from_mut_slice` | 13 | 92% / 100% | 100% / 100% / 100% | | +| pick | `indexmap::rayon::set::IndexSet::par_difference` | 0 | no test fails when it throws | названо 0 | | +| pick | `indexmap::rayon::set::IndexSet::par_is_subset` | 0 | no test fails when it throws | названо 0 | | +| pick | `indexmap::serde::cautious_capacity` | 0 | no test fails when it throws | названо 0 | | +| pick | `indexmap::set::IndexSet::contains` | 5 | 60% / 60% | 100% / 100% / 100% | | +| pick | `indexmap::set::IndexSet::difference` | 2 | 50% / 20% | 100% / 100% / 100% | | +| pick | `indexmap::set::IndexSet::intersection` | 2 | 50% / 20% | 100% / 100% / 100% | | +| pick | `indexmap::set::IndexSet::is_subset` | 4 | 50% / 40% | 100% / 100% / 100% | | +| pick | `indexmap::set::IndexSet::swap_take` | 2 | 100% / 25% | 100% / 100% / 100% | | +| pick | `indexmap::set::IndexSet::union` | 2 | 50% / 20% | 100% / 100% / 100% | | +| pick | `indexmap::util::assert_index_le` | 6 | 100% / 75% | 100% / 75% / 75% | | +| pick | `indexmap::util::simplify_range` | 6 | 0% / 0% | 100% / 100% / 100% | | +| pick | `indexmap::util::third` | 11 | 0% / 0% | 100% / 100% / 100% | | +| pick | `indexmap::util::try_simplify_range` | 3 | 100% / 100% | 100% / 100% / 100% | | +| random | `indexmap::map::iter::IterMut::default` | 1 | 100% / 25% | 100% / 100% / 100% | | +| random | `indexmap::rayon::set::IndexSet::par_sort_unstable_by_key` | 0 | no test fails when it throws | названо 0 | | +| random | `indexmap::map::slice::Slice::split_first` | 1 | 100% / 10% | 100% / 100% / 100% | | +| random | `indexmap::inner::Core::move_index_inner` | 7 | 14% / 50% | 100% / 100% / 100% | | +| random | `indexmap::inner::update_index` | 32 | 6% / 67% | 100% / 100% / 100% | | +| random | `indexmap::rayon::map::Slice::par_values` | 0 | no test fails when it throws | названо 0 | | +| random | `indexmap::map::iter::ExtractIf::next` | 2 | 0% / 0% | 100% / 100% / 100% | | +| random | `indexmap::map::IndexMap::shift_remove_entry` | 2 | 100% / 25% | 100% / 100% / 100% | | +| random | `indexmap::rayon::map::Slice::par_values_mut` | 0 | no test fails when it throws | названо 0 | | +| random | `indexmap::set::iter::Difference::clone` | 0 | no test fails when it throws | названо 0 | | +| random | `indexmap::rayon::set::ParIntersection::fmt` | 0 | no test fails when it throws | названо 0 | | +| random | `indexmap::inner::Core::shrink_to` | 4 | 50% / 67% | 100% / 100% / 100% | | + +## Цена + +- `build_s`: 12.0 +- `run_one_by_one_s`: 4.1 +- `export_s`: 9.8 +- `map_s`: 25.9 +- `map_without_build_s`: 13.9 +- `profiles_bytes`: 40501624 +- `test_binaries`: 5 +- `files_with_doctests`: 7 +- `repeat`: 3 +- `plain_s`: 2.1 +- `tests`: 183 +- `map_pairs`: 5003 +- `map_functions`: 381 +- `map_sqlite_bytes`: 69632 +- `functions_with_body`: 739 +- `functions_never_run`: 345 +- `fail_alone_not_together`: [] +- `fail_together_not_alone`: [] +- `slowdown_runs`: 12.3 diff --git a/eval/results/learn-tests-semver.json b/eval/results/learn-tests-semver.json new file mode 100644 index 0000000..0e48c60 --- /dev/null +++ b/eval/results/learn-tests-semver.json @@ -0,0 +1,940 @@ +{ + "repo": "semver", + "lang": "rust", + "commit": "280ebcb6edac", + "seed": 7, + "gitnext_commit": "08e599c", + "functions": [ + { + "group": "pick", + "symbol": "semver::eval::matches_comparator", + "file": "src/eval.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "pick", + "symbol": "semver::eval::matches_req", + "file": "src/eval.rs", + "truth": 11, + "truth_doctests": 0, + "predicted_gitnext": 11, + "predicted_coverage": 11, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_any", + "test_cargo3202", + "test_pre", + "test_wildcard", + "test_basic", + "test_caret", + "test_tilde", + "test_exact", + "test_greater_than", + "test_less_than" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 11, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 11, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 11, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "semver::identifier::Identifier::empty", + "file": "src/identifier.rs", + "skipped": "mutant does not compile", + "predicted_gitnext": 0, + "predicted_coverage": 29 + }, + { + "group": "pick", + "symbol": "semver::identifier::Identifier::new_unchecked", + "file": "src/identifier.rs", + "truth": 24, + "truth_doctests": 0, + "predicted_gitnext": 22, + "predicted_coverage": 24, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_prerelease", + "test_eq", + "test_leading_digit_in_pre_and_build", + "test_ne", + "test_wildcard_and_another", + "test_parse", + "test_align", + "test_display", + "test_new", + "test_ge" + ], + "score": { + "gitnext": { + "recall": 0.8333333333333334, + "precision": 0.9090909090909091, + "predicted": 22, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 24, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9230769230769231, + "predicted": 26, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "semver::identifier::Identifier::ptr_eq", + "file": "src/identifier.rs", + "truth": 20, + "truth_doctests": 0, + "predicted_gitnext": 0, + "predicted_coverage": 20, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_eq_hash", + "test_eq", + "test_ne", + "test_cargo3202", + "test_new", + "test_ge", + "test_gt", + "test_le", + "test_lt", + "test_pre" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "semver::identifier::Identifier::clone", + "file": "src/identifier.rs", + "truth": 1, + "truth_doctests": 0, + "predicted_gitnext": 0, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_new" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "semver::eval::matches_tilde", + "file": "src/eval.rs", + "truth": 1, + "truth_doctests": 0, + "predicted_gitnext": 11, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_tilde" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.09090909090909091, + "predicted": 11, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.09090909090909091, + "predicted": 11, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "semver::identifier::decode_len", + "file": "src/identifier.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 4 + }, + { + "group": "random", + "symbol": "semver::eval::matches_exact", + "file": "src/eval.rs", + "truth": 7, + "truth_doctests": 0, + "predicted_gitnext": 11, + "predicted_coverage": 7, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_cargo3202", + "test_pre", + "test_wildcard", + "test_exact", + "test_greater_than", + "test_less_than", + "test_multiple" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.6363636363636364, + "predicted": 11, + "top_hits": 6, + "top_n": 10, + "top_precision": 0.6, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 7, + "top_hits": 7, + "top_n": 7, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.6363636363636364, + "predicted": 11, + "top_hits": 7, + "top_n": 10, + "top_precision": 0.7, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "semver::impls::VersionReq::from_iter", + "file": "src/impls.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "semver::eval::matches_impl", + "file": "src/eval.rs", + "truth": 10, + "truth_doctests": 0, + "predicted_gitnext": 11, + "predicted_coverage": 10, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_cargo3202", + "test_pre", + "test_wildcard", + "test_basic", + "test_caret", + "test_tilde", + "test_exact", + "test_greater_than", + "test_less_than", + "test_multiple" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.9090909090909091, + "predicted": 11, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 10, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9090909090909091, + "predicted": 11, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "semver::display::Version::fmt", + "file": "src/display.rs", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 0, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_align", + "test_display" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "semver::parse::BuildMetadata::from_str", + "file": "src/parse.rs", + "truth": 2, + "truth_doctests": 0, + "predicted_gitnext": 2, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_eq", + "test_parse" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "semver::serde::Version::deserialize", + "file": "src/serde.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "semver::eval::pre_is_compatible", + "file": "src/eval.rs", + "truth": 8, + "truth_doctests": 0, + "predicted_gitnext": 11, + "predicted_coverage": 8, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_pre", + "test_basic", + "test_caret", + "test_tilde", + "test_exact", + "test_greater_than", + "test_less_than", + "test_multiple" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.7272727272727273, + "predicted": 11, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.7272727272727273, + "predicted": 11, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "semver::parse::identifier", + "file": "src/parse.rs", + "truth": 24, + "truth_doctests": 0, + "predicted_gitnext": 0, + "predicted_coverage": 24, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_prerelease", + "test_eq", + "test_leading_digit_in_pre_and_build", + "test_ne", + "test_wildcard_and_another", + "test_parse", + "test_align", + "test_display", + "test_new", + "test_ge" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 24, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 24, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "semver::identifier::Identifier::is_empty", + "file": "src/identifier.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 29 + }, + { + "group": "random", + "symbol": "semver::error::Error::fmt", + "file": "src/error.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 9 + }, + { + "group": "random", + "symbol": "semver::parse::Prerelease::from_str", + "file": "src/parse.rs", + "truth": 4, + "truth_doctests": 0, + "predicted_gitnext": 4, + "predicted_coverage": 4, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_prerelease", + "test_eq", + "test_new", + "test_parse" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "semver::parse::build_identifier", + "file": "src/parse.rs", + "truth": 11, + "truth_doctests": 0, + "predicted_gitnext": 20, + "predicted_coverage": 11, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_eq", + "test_leading_digit_in_pre_and_build", + "test_ne", + "test_display", + "test_ge", + "test_gt", + "test_le", + "test_lt", + "test_comparator_parse", + "test_parse" + ], + "score": { + "gitnext": { + "recall": 0.8181818181818182, + "precision": 0.45, + "predicted": 20, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 11, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.5, + "predicted": 22, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "semver::serde::VersionReq::deserialize", + "file": "src/serde.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "semver::Version::cmp_precedence", + "file": "src/lib.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "semver::identifier::Identifier::is_empty_or_inline", + "file": "src/identifier.rs", + "skipped": "no test fails when it throws", + "predicted_gitnext": 0, + "predicted_coverage": 29 + }, + { + "group": "random", + "symbol": "semver::parse::version_req", + "file": "src/parse.rs", + "truth": 17, + "truth_doctests": 0, + "predicted_gitnext": 17, + "predicted_coverage": 17, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_digit_after_wildcard", + "test_eq_hash", + "test_logical_or", + "test_whitespace_delimited_comparator_sets", + "test_leading_digit_in_pre_and_build", + "test_wildcard_and_another", + "test_parse", + "test_cargo3202", + "test_pre", + "test_wildcard" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 17, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 17, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 17, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "semver::parse::prerelease_identifier", + "file": "src/parse.rs", + "truth": 24, + "truth_doctests": 0, + "predicted_gitnext": 22, + "predicted_coverage": 24, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "test_prerelease", + "test_eq", + "test_leading_digit_in_pre_and_build", + "test_ne", + "test_wildcard_and_another", + "test_parse", + "test_align", + "test_display", + "test_new", + "test_ge" + ], + "score": { + "gitnext": { + "recall": 0.8333333333333334, + "precision": 0.9090909090909091, + "predicted": 22, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 24, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9230769230769231, + "predicted": 26, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + } + ], + "summary": { + "pick": { + "gitnext": { + "recall": 0.611, + "precision": 0.636, + "top_precision": 0.667, + "caught": 0.667 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.974, + "top_precision": 1.0, + "caught": 1.0 + }, + "functions": 3 + }, + "random": { + "gitnext": { + "recall": 0.721, + "precision": 0.56, + "top_precision": 0.6, + "caught": 0.75 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.816, + "top_precision": 0.883, + "caught": 1.0 + }, + "functions": 12 + }, + "all": { + "gitnext": { + "recall": 0.699, + "precision": 0.575, + "top_precision": 0.613, + "caught": 0.733 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.847, + "top_precision": 0.907, + "caught": 1.0 + }, + "functions": 15 + } + }, + "cost": { + "build_s": 20.6, + "run_one_by_one_s": 0.3, + "export_s": 0.6, + "map_s": 21.5, + "map_without_build_s": 0.9, + "profiles_bytes": 341456, + "test_binaries": 5, + "files_with_doctests": "2", + "repeat": 3, + "plain_s": 0.4, + "tests": 34, + "map_pairs": 782, + "map_functions": 70, + "map_sqlite_bytes": 20480, + "functions_with_body": 85, + "functions_never_run": 11, + "fail_alone_not_together": [], + "fail_together_not_alone": [], + "slowdown_runs": 53.8 + } +} \ No newline at end of file diff --git a/eval/results/learn-tests-semver.md b/eval/results/learn-tests-semver.md new file mode 100644 index 0000000..a9e6c20 --- /dev/null +++ b/eval/results/learn-tests-semver.md @@ -0,0 +1,66 @@ +# learn-tests на semver (rust): покрытие по тестам против `tests-for` +semver 280ebcb6edac, gitnext 08e599c, seed 7. Истина — eval (тесты, падающие при panic в начале функции). pick — функции с ответом в кэше eval, random — случайные. + +| выборка | функций | источник | полнота | точность | из 10 падают | поймано | +|---|---:|---|---:|---:|---:|---:| +| pick (кэш eval) | 3 | gitnext | 61% | 64% | 67% | 67% | +| pick (кэш eval) | 3 | coverage | 100% | 100% | 100% | 100% | +| pick (кэш eval) | 3 | union | 100% | 97% | 100% | 100% | +| случайные | 12 | gitnext | 72% | 56% | 60% | 75% | +| случайные | 12 | coverage | 100% | 100% | 100% | 100% | +| случайные | 12 | union | 100% | 82% | 88% | 100% | +| все | 15 | gitnext | 70% | 57% | 61% | 73% | +| все | 15 | coverage | 100% | 100% | 100% | 100% | +| все | 15 | union | 100% | 85% | 91% | 100% | + +## По функциям + +| выборка | функция | падают | граф: полн / из 10 | покрытие: полн / точн / из 10 | мимо покрытия | +|---|---|---:|---|---|---| +| pick | `semver::eval::matches_comparator` | 0 | no test fails when it throws | названо 0 | | +| pick | `semver::eval::matches_req` | 11 | 100% / 100% | 100% / 100% / 100% | | +| pick | `semver::identifier::Identifier::empty` | 0 | mutant does not compile | названо 29 | | +| pick | `semver::identifier::Identifier::new_unchecked` | 24 | 83% / 100% | 100% / 100% / 100% | | +| pick | `semver::identifier::Identifier::ptr_eq` | 20 | 0% / 0% | 100% / 100% / 100% | | +| random | `semver::identifier::Identifier::clone` | 1 | 0% / 0% | 100% / 100% / 100% | | +| random | `semver::eval::matches_tilde` | 1 | 100% / 10% | 100% / 100% / 100% | | +| random | `semver::identifier::decode_len` | 0 | no test fails when it throws | названо 4 | | +| random | `semver::eval::matches_exact` | 7 | 100% / 60% | 100% / 100% / 100% | | +| random | `semver::impls::VersionReq::from_iter` | 0 | no test fails when it throws | названо 0 | | +| random | `semver::eval::matches_impl` | 10 | 100% / 90% | 100% / 100% / 100% | | +| random | `semver::display::Version::fmt` | 2 | 0% / 0% | 100% / 100% / 100% | | +| random | `semver::parse::BuildMetadata::from_str` | 2 | 100% / 100% | 100% / 100% / 100% | | +| random | `semver::serde::Version::deserialize` | 0 | no test fails when it throws | названо 0 | | +| random | `semver::eval::pre_is_compatible` | 8 | 100% / 80% | 100% / 100% / 100% | | +| random | `semver::parse::identifier` | 24 | 0% / 0% | 100% / 100% / 100% | | +| random | `semver::identifier::Identifier::is_empty` | 0 | no test fails when it throws | названо 29 | | +| random | `semver::error::Error::fmt` | 0 | no test fails when it throws | названо 9 | | +| random | `semver::parse::Prerelease::from_str` | 4 | 100% / 100% | 100% / 100% / 100% | | +| random | `semver::parse::build_identifier` | 11 | 82% / 80% | 100% / 100% / 100% | | +| random | `semver::serde::VersionReq::deserialize` | 0 | no test fails when it throws | названо 0 | | +| random | `semver::Version::cmp_precedence` | 0 | no test fails when it throws | названо 0 | | +| random | `semver::identifier::Identifier::is_empty_or_inline` | 0 | no test fails when it throws | названо 29 | | +| random | `semver::parse::version_req` | 17 | 100% / 100% | 100% / 100% / 100% | | +| random | `semver::parse::prerelease_identifier` | 24 | 83% / 100% | 100% / 100% / 100% | | + +## Цена + +- `build_s`: 20.6 +- `run_one_by_one_s`: 0.3 +- `export_s`: 0.6 +- `map_s`: 21.5 +- `map_without_build_s`: 0.9 +- `profiles_bytes`: 341456 +- `test_binaries`: 5 +- `files_with_doctests`: 2 +- `repeat`: 3 +- `plain_s`: 0.4 +- `tests`: 34 +- `map_pairs`: 782 +- `map_functions`: 70 +- `map_sqlite_bytes`: 20480 +- `functions_with_body`: 85 +- `functions_never_run`: 11 +- `fail_alone_not_together`: [] +- `fail_together_not_alone`: [] +- `slowdown_runs`: 53.8 diff --git a/eval/results/learn-tests-yaml.causes.json b/eval/results/learn-tests-yaml.causes.json new file mode 100644 index 0000000..4ae9336 --- /dev/null +++ b/eval/results/learn-tests-yaml.causes.json @@ -0,0 +1,2836 @@ +{ + "repo": "yaml", + "package": "yaml", + "test_files": 24, + "test_functions_by_file": { + "tests/_utils.ts": 6, + "tests/artifacts/cli-singlequote.js": 1, + "tests/artifacts/cli-unstyle.cjs": 2, + "tests/cli.ts": 2, + "tests/clone.ts": 2, + "tests/cst.ts": 1, + "tests/doc/YAML-1.1.spec.ts": 1, + "tests/doc/YAML-1.2.spec.ts": 21, + "tests/doc/stringify.ts": 5, + "tests/doc/types.ts": 5, + "tests/json-test-suite.ts": 2, + "tests/visit.ts": 3, + "tests/yaml-test-suite.ts": 3 + }, + "functions": [ + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_8": 15, + "sure_or_possible_4": [], + "named_sure_or_possible_4": 0, + "sure_or_possible_8": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_8": 15 + }, + "simulated_file_as_test": { + "sure": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "sure_or_possible": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure": 21, + "named_sure_or_possible": 21, + "ancestors_sure": 11, + "ancestors_all": 11 + }, + "symbol": "src::compose::compose_collection::composeCollection", + "file": "src/compose/compose-collection.ts", + "truth": 17, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/cli.ts", + "reach": "package subpath `yaml/cli`; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/clone.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/collection-access.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/directives.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/foldFlowLines.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/line-counter.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/visit.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 3 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/visit.ts" + ], + "named_sure_4": 13, + "sure_8": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_8": 15, + "sure_or_possible_4": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_4": 13, + "sure_or_possible_8": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_8": 15 + }, + "simulated_file_as_test": { + "sure": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "sure_or_possible": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure": 21, + "named_sure_or_possible": 21, + "ancestors_sure": 9, + "ancestors_all": 9 + }, + "symbol": "src::compose::compose_doc::composeDoc", + "file": "src/compose/compose-doc.ts", + "truth": 18, + "named_files": 2, + "hit": 1, + "named": [ + "tests/cli.ts", + "tests/json-test-suite.ts" + ], + "named_how": [ + "3 hops", + "4 hops" + ], + "missed": [ + { + "test": "tests/clone.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/collection-access.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/directives.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.1.spec.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 1 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/foldFlowLines.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/line-counter.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/visit.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 3 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_8": 15, + "sure_or_possible_4": [], + "named_sure_or_possible_4": 0, + "sure_or_possible_8": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_8": 15 + }, + "simulated_file_as_test": { + "sure": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "sure_or_possible": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure": 21, + "named_sure_or_possible": 21, + "ancestors_sure": 12, + "ancestors_all": 12 + }, + "symbol": "src::compose::compose_scalar::composeScalar", + "file": "src/compose/compose-scalar.ts", + "truth": 18, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/cli.ts", + "reach": "package subpath `yaml/cli`; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/clone.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/collection-access.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/directives.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.1.spec.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 1 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/foldFlowLines.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/line-counter.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/visit.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 3 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_4": 14, + "sure_8": [ + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_8": 14, + "sure_or_possible_4": [ + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_4": 14, + "sure_or_possible_8": [ + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_8": 14 + }, + "simulated_file_as_test": { + "sure": [ + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "sure_or_possible": [ + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure": 20, + "named_sure_or_possible": 20, + "ancestors_sure": 5, + "ancestors_all": 5 + }, + "symbol": "src::compose::composer::Composer::compose", + "file": "src/compose/composer.ts", + "truth": 17, + "named_files": 1, + "hit": 0, + "named": [ + "tests/json-test-suite.ts" + ], + "named_how": [ + "2 hops" + ], + "missed": [ + { + "test": "tests/clone.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/collection-access.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/directives.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.1.spec.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 1 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/foldFlowLines.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/line-counter.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/visit.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 3 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [ + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/node-to-js.ts", + "tests/visit.ts" + ], + "named_sure_8": 13, + "sure_or_possible_4": [], + "named_sure_or_possible_4": 0, + "sure_or_possible_8": [ + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/node-to-js.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_8": 13 + }, + "simulated_file_as_test": { + "sure": [ + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "sure_or_possible": [ + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure": 21, + "named_sure_or_possible": 21, + "ancestors_sure": 13, + "ancestors_all": 13 + }, + "symbol": "src::compose::resolve_block_seq::resolveBlockSeq", + "file": "src/compose/resolve-block-seq.ts", + "truth": 13, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/directives.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/foldFlowLines.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/visit.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 3 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/visit.ts" + ], + "named_sure_4": 13, + "sure_8": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_8": 15, + "sure_or_possible_4": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_4": 13, + "sure_or_possible_8": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_8": 15 + }, + "simulated_file_as_test": { + "sure": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "sure_or_possible": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure": 21, + "named_sure_or_possible": 21, + "ancestors_sure": 19, + "ancestors_all": 19 + }, + "symbol": "src::compose::resolve_end::resolveEnd", + "file": "src/compose/resolve-end.ts", + "truth": 19, + "named_files": 2, + "hit": 1, + "named": [ + "tests/cli.ts", + "tests/json-test-suite.ts" + ], + "named_how": [ + "3 hops", + "4 hops" + ], + "missed": [ + { + "test": "tests/clone.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/collection-access.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/cst.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 1 + }, + { + "test": "tests/directives.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.1.spec.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 1 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/foldFlowLines.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/line-counter.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/visit.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 3 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [ + "tests/cli.ts", + "tests/doc/parse.ts" + ], + "named_sure_8": 2, + "sure_or_possible_4": [], + "named_sure_or_possible_4": 0, + "sure_or_possible_8": [ + "tests/cli.ts", + "tests/doc/parse.ts" + ], + "named_sure_or_possible_8": 2 + }, + "simulated_file_as_test": { + "sure": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/visit.ts" + ], + "sure_or_possible": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/visit.ts" + ], + "named_sure": 19, + "named_sure_or_possible": 19, + "ancestors_sure": 15, + "ancestors_all": 15 + }, + "symbol": "src::compose::util_contains_newline::containsNewline", + "file": "src/compose/util-contains-newline.ts", + "truth": 17, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/cli.ts", + "reach": "package subpath `yaml/cli`; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/clone.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/collection-access.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/directives.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/foldFlowLines.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/line-counter.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/visit.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 3 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 2, + "sure_or_possible_4": [], + "named_sure_or_possible_4": 0, + "sure_or_possible_8": [], + "named_sure_or_possible_8": 2 + }, + "simulated_file_as_test": { + "sure": [ + "tests/compat.ts" + ], + "sure_or_possible": [ + "tests/compat.ts" + ], + "named_sure": 19, + "named_sure_or_possible": 19, + "ancestors_sure": 13, + "ancestors_all": 13 + }, + "symbol": "src::compose::util_flow_indent_check::flowIndentCheck", + "file": "src/compose/util-flow-indent-check.ts", + "truth": 1, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/doc/types.ts" + ], + "named_sure_4": 1, + "sure_8": [ + "tests/doc/types.ts" + ], + "named_sure_8": 1, + "sure_or_possible_4": [ + "tests/doc/types.ts" + ], + "named_sure_or_possible_4": 1, + "sure_or_possible_8": [ + "tests/doc/types.ts" + ], + "named_sure_or_possible_8": 1 + }, + "simulated_file_as_test": { + "sure": [ + "tests/doc/types.ts" + ], + "sure_or_possible": [ + "tests/doc/types.ts" + ], + "named_sure": 1, + "named_sure_or_possible": 1, + "ancestors_sure": 2, + "ancestors_all": 2 + }, + "symbol": "src::doc::Document::Document::setSchema", + "file": "src/doc/Document.ts", + "truth": 20, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/cli.ts", + "reach": "package subpath `yaml/cli`; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/clone.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/collection-access.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/directives.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.1.spec.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 1 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/createNode.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/foldFlowLines.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/line-counter.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/rawJSON.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/visit.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 3 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/clone.ts", + "tests/collection-access.ts", + "tests/doc/anchors.ts", + "tests/doc/createNode.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/visit.ts" + ], + "named_sure_4": 7, + "sure_8": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/doc/anchors.ts", + "tests/doc/createNode.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/visit.ts" + ], + "named_sure_8": 12, + "sure_or_possible_4": [ + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/doc/anchors.ts", + "tests/doc/createNode.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/properties.ts", + "tests/rawJSON.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_4": 10, + "sure_or_possible_8": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/rawJSON.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_8": 23 + }, + "simulated_file_as_test": { + "sure": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/rawJSON.ts", + "tests/visit.ts" + ], + "sure_or_possible": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/rawJSON.ts", + "tests/visit.ts" + ], + "named_sure": 23, + "named_sure_or_possible": 23, + "ancestors_sure": 63, + "ancestors_all": 98 + }, + "symbol": "src::doc::NodeCreator::NodeCreator::setAnchors", + "file": "src/doc/NodeCreator.ts", + "truth": 20, + "named_files": 1, + "hit": 1, + "named": [ + "tests/visit.ts" + ], + "named_how": [ + "2 hops" + ], + "missed": [ + { + "test": "tests/cli.ts", + "reach": "package subpath `yaml/cli`; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/clone.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/collection-access.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/directives.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.1.spec.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 1 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/createNode.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/foldFlowLines.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/line-counter.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/rawJSON.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [], + "named_sure_or_possible_4": 0, + "sure_or_possible_8": [], + "named_sure_or_possible_8": 0 + }, + "simulated_file_as_test": { + "sure": [], + "sure_or_possible": [], + "named_sure": 0, + "named_sure_or_possible": 0, + "ancestors_sure": 2, + "ancestors_all": 2 + }, + "symbol": "src::doc::directives::Directives::atDocument", + "file": "src/doc/directives.ts", + "truth": 18, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/cli.ts", + "reach": "package subpath `yaml/cli`; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/clone.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/collection-access.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/directives.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.1.spec.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 1 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/foldFlowLines.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/line-counter.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/visit.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 3 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [ + "tests/cli.ts", + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts" + ], + "named_sure_or_possible_4": 12, + "sure_or_possible_8": [ + "tests/cli.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts" + ], + "named_sure_or_possible_8": 19 + }, + "simulated_file_as_test": { + "sure": [ + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts" + ], + "sure_or_possible": [ + "tests/cli.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts" + ], + "named_sure": 8, + "named_sure_or_possible": 20, + "ancestors_sure": 2, + "ancestors_all": 22 + }, + "symbol": "src::nodes::YAMLMap::YAMLMap::#stringifyFlowMap", + "file": "src/nodes/YAMLMap.ts", + "truth": 8, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/cli.ts", + "reach": "package subpath `yaml/cli`; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/createNode.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [ + "tests/collection-access.ts", + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/properties.ts", + "tests/rawJSON.ts" + ], + "named_sure_or_possible_4": 12, + "sure_or_possible_8": [ + "tests/collection-access.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/properties.ts", + "tests/rawJSON.ts" + ], + "named_sure_or_possible_8": 19 + }, + "simulated_file_as_test": { + "sure": [ + "tests/collection-access.ts", + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts" + ], + "sure_or_possible": [ + "tests/collection-access.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/createNode.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/properties.ts", + "tests/rawJSON.ts" + ], + "named_sure": 8, + "named_sure_or_possible": 20, + "ancestors_sure": 2, + "ancestors_all": 22 + }, + "symbol": "src::nodes::YAMLSeq::YAMLSeq::#stringifyBlockSeq", + "file": "src/nodes/YAMLSeq.ts", + "truth": 12, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/collection-access.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/createNode.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/foldFlowLines.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/rawJSON.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/visit.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 3 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [ + "tests/doc/types.ts" + ], + "named_sure_or_possible_4": 12, + "sure_or_possible_8": [ + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/types.ts" + ], + "named_sure_or_possible_8": 19 + }, + "simulated_file_as_test": { + "sure": [ + "tests/doc/types.ts" + ], + "sure_or_possible": [ + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/types.ts" + ], + "named_sure": 8, + "named_sure_or_possible": 20, + "ancestors_sure": 2, + "ancestors_all": 22 + }, + "symbol": "src::nodes::YAMLSet::YAMLSet::#stringifyBlockSet", + "file": "src/nodes/YAMLSet.ts", + "truth": 2, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [ + "tests/doc/types.ts" + ], + "named_sure_or_possible_4": 12, + "sure_or_possible_8": [ + "tests/doc/types.ts" + ], + "named_sure_or_possible_8": 19 + }, + "simulated_file_as_test": { + "sure": [ + "tests/doc/types.ts" + ], + "sure_or_possible": [ + "tests/doc/types.ts" + ], + "named_sure": 8, + "named_sure_or_possible": 20, + "ancestors_sure": 2, + "ancestors_all": 22 + }, + "symbol": "src::nodes::YAMLSet::YAMLSet::#stringifyFlowSet", + "file": "src/nodes/YAMLSet.ts", + "truth": 1, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [ + "tests/cli.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/node-to-js.ts" + ], + "named_sure_or_possible_4": 14, + "sure_or_possible_8": [ + "tests/cli.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/node-to-js.ts" + ], + "named_sure_or_possible_8": 14 + }, + "simulated_file_as_test": { + "sure": [ + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/node-to-js.ts" + ], + "sure_or_possible": [ + "tests/cli.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/node-to-js.ts" + ], + "named_sure": 14, + "named_sure_or_possible": 15, + "ancestors_sure": 4, + "ancestors_all": 8 + }, + "symbol": "src::nodes::toJS::ToJSContext::resolveAlias", + "file": "src/nodes/toJS.ts", + "truth": 6, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/cli.ts", + "reach": "package subpath `yaml/cli`; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [ + "tests/cli.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/node-to-js.ts" + ], + "named_sure_or_possible_4": 14, + "sure_or_possible_8": [ + "tests/cli.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/node-to-js.ts" + ], + "named_sure_or_possible_8": 14 + }, + "simulated_file_as_test": { + "sure": [ + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/node-to-js.ts" + ], + "sure_or_possible": [ + "tests/cli.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/node-to-js.ts" + ], + "named_sure": 14, + "named_sure_or_possible": 15, + "ancestors_sure": 2, + "ancestors_all": 9 + }, + "symbol": "src::nodes::toJS::ToJSContext::setAnchor", + "file": "src/nodes/toJS.ts", + "truth": 6, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/cli.ts", + "reach": "package subpath `yaml/cli`; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/visit.ts" + ], + "named_sure_4": 14, + "sure_8": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_8": 16, + "sure_or_possible_4": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_4": 14, + "sure_or_possible_8": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_8": 16 + }, + "simulated_file_as_test": { + "sure": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "sure_or_possible": [ + "tests/cli.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/foldFlowLines.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure": 21, + "named_sure_or_possible": 21, + "ancestors_sure": 8, + "ancestors_all": 8 + }, + "symbol": "src::parse::cst::tokenType", + "file": "src/parse/cst.ts", + "truth": 19, + "named_files": 3, + "hit": 2, + "named": [ + "tests/cst.ts", + "tests/cli.ts", + "tests/json-test-suite.ts" + ], + "named_how": [ + "3 hops", + "4 hops" + ], + "missed": [ + { + "test": "tests/clone.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 2 + }, + { + "test": "tests/collection-access.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/directives.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.1.spec.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 1 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/foldFlowLines.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/line-counter.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/visit.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 3 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/cli.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/lexer.ts", + "tests/node-to-js.ts", + "tests/visit.ts" + ], + "named_sure_4": 15, + "sure_8": [ + "tests/cli.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/lexer.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_8": 17, + "sure_or_possible_4": [ + "tests/cli.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/lexer.ts", + "tests/node-to-js.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_4": 15, + "sure_or_possible_8": [ + "tests/cli.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts", + "tests/lexer.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure_or_possible_8": 17 + }, + "simulated_file_as_test": { + "sure": [ + "tests/cli.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/lexer.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "sure_or_possible": [ + "tests/cli.ts", + "tests/compat.ts", + "tests/cst.ts", + "tests/directives.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/anchors.ts", + "tests/doc/comments.ts", + "tests/doc/errors.ts", + "tests/doc/parse.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts", + "tests/lexer.ts", + "tests/node-to-js.ts", + "tests/properties.ts", + "tests/visit.ts" + ], + "named_sure": 22, + "named_sure_or_possible": 22, + "ancestors_sure": 8, + "ancestors_all": 8 + }, + "symbol": "src::parse::lexer::Lexer::flow", + "file": "src/parse/lexer.ts", + "truth": 15, + "named_files": 3, + "hit": 2, + "named": [ + "tests/cli.ts", + "tests/cst.ts", + "tests/json-test-suite.ts" + ], + "named_how": [ + "3 hops", + "4 hops" + ], + "missed": [ + { + "test": "tests/compat.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/directives.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/comments.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/stringify.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 5 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + }, + { + "test": "tests/lexer.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/node-to-js.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/properties.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 0 + }, + { + "test": "tests/visit.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 3 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/doc/YAML-1.1.spec.ts" + ], + "named_sure_4": 2, + "sure_8": [ + "tests/doc/YAML-1.1.spec.ts" + ], + "named_sure_8": 2, + "sure_or_possible_4": [ + "tests/doc/YAML-1.1.spec.ts" + ], + "named_sure_or_possible_4": 2, + "sure_or_possible_8": [ + "tests/doc/YAML-1.1.spec.ts" + ], + "named_sure_or_possible_8": 2 + }, + "simulated_file_as_test": { + "sure": [ + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/errors.ts", + "tests/doc/parse.ts" + ], + "sure_or_possible": [ + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/errors.ts", + "tests/doc/parse.ts" + ], + "named_sure": 5, + "named_sure_or_possible": 5, + "ancestors_sure": 2, + "ancestors_all": 2 + }, + "symbol": "src::public_api::parseAllDocuments", + "file": "src/public-api.ts", + "truth": 4, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/doc/YAML-1.1.spec.ts", + "reach": "helper `tests/_utils`; package name (vitest alias) → index re-export", + "test_symbols": 1 + }, + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/errors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [ + "tests/doc/parse.ts" + ], + "named_sure_or_possible_4": 1, + "sure_or_possible_8": [ + "tests/doc/parse.ts" + ], + "named_sure_or_possible_8": 1 + }, + "simulated_file_as_test": { + "sure": [ + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts" + ], + "sure_or_possible": [ + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts" + ], + "named_sure": 6, + "named_sure_or_possible": 6, + "ancestors_sure": 2, + "ancestors_all": 2 + }, + "symbol": "src::schema::yaml_1_1::pairs::resolvePairs", + "file": "src/schema/yaml-1.1/pairs.ts", + "truth": 4, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/doc/YAML-1.2.spec.ts", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 21 + }, + { + "test": "tests/doc/anchors.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/parse.ts", + "reach": "package name (vitest alias) → index re-export; helper `tests/_utils`", + "test_symbols": 0 + }, + { + "test": "tests/doc/types.ts", + "reach": "package name (vitest alias) → index re-export; package subpath `yaml/util`; helper `tests/_utils`", + "test_symbols": 5 + } + ] + } + ] +} \ No newline at end of file diff --git a/eval/results/learn-tests-yaml.causes.md b/eval/results/learn-tests-yaml.causes.md new file mode 100644 index 0000000..1dae033 --- /dev/null +++ b/eval/results/learn-tests-yaml.causes.md @@ -0,0 +1,27 @@ +# Почему `tests-for` не называет падающие файлы тестов: yaml + +Функций с промахом: 21 из 21; падающих файлов 255, названо верно 7, пропущено 248. Тестовых файлов 24, из них без единой именованной функции 11. + +Пара «функция, пропущенный файл» по первой подходящей причине: + +| причина | пар | функций | пример (функция → файл) | +|---|---:|---:|---| +| граф доходит до модуля тестового файла (вызов в `it(…, () => …)`), `tests-for` его отбрасывает: не функция (locate.rs, `is_callable`) — 4 перехода, уверенные рёбра | 57 | 8 | `composeDoc` → `tests/clone.ts` | +| то же, но через «возможное» ребро (`.method` у получателя неизвестного типа) — 4 перехода | 31 | 8 | `setAnchors` → `tests/compat.ts` | +| то же, но глубже 4 переходов (5–8) | 58 | 12 | `composeCollection` → `tests/cli.ts` | +| в графе нет ребра по пути, хотя тестовый файл вызывает функцию-предка по имени (текст) | 62 | 12 | `composeCollection` → `tests/doc/YAML-1.2.spec.ts` | +| ни граф, ни имя предка в тексте теста: экспорт под другим именем (`export const persist = persistImpl as …`), вызов через объект (`api.subscribe`), данные набора тестов | 40 | 5 | `containsNewline` → `tests/properties.ts` | + +Из пропущенных пар в файлах без именованных функций: 155; путь импорта (по парам): +- по имени пакета: 248 + +Оценка починки графа (по функциям, среднее; `named` — сколько файлов назвал бы): + +| вариант | полнота | точность | функций с ответом | +|---|---:|---:|---:| +| модули тестов, уверенные рёбра, 4 перехода | 18% | 81% | 8 из 21 | +| + возможные рёбра, 4 перехода | 43% | 64% | 15 из 21 | +| модули тестов, уверенные, 8 переходов | 30% | 73% | 13 из 21 | +| + возможные, 8 переходов | 62% | 63% | 20 из 21 | +| потолок графа: файл вызывает предка по имени (текст, 8 переходов) | 89% | 62% | 20 из 21 | +| сейчас (`tests-for`) | 2% | | | diff --git a/eval/results/learn-tests-yaml.json b/eval/results/learn-tests-yaml.json new file mode 100644 index 0000000..33bca64 --- /dev/null +++ b/eval/results/learn-tests-yaml.json @@ -0,0 +1,1759 @@ +{ + "repo": "yaml", + "lang": "typescript", + "commit": "528ef30d6ded", + "seed": 7, + "gitnext_commit": "92dc87d", + "functions": [ + { + "group": "pick", + "symbol": "src::compose::compose_collection::composeCollection", + "file": "src/compose/compose-collection.ts", + "truth": 17, + "truth_doctests": 17, + "predicted_gitnext": 0, + "predicted_coverage": 17, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts", + "tests/cli.ts", + "tests/doc/foldFlowLines.ts", + "tests/properties.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 17, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 17, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::compose::compose_doc::composeDoc", + "file": "src/compose/compose-doc.ts", + "truth": 18, + "truth_doctests": 18, + "predicted_gitnext": 2, + "predicted_coverage": 18, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/YAML-1.1.spec.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts", + "tests/cli.ts", + "tests/doc/foldFlowLines.ts" + ], + "score": { + "gitnext": { + "recall": 0.05555555555555555, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 18, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9473684210526315, + "predicted": 19, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::compose::compose_scalar::composeScalar", + "file": "src/compose/compose-scalar.ts", + "truth": 18, + "truth_doctests": 18, + "predicted_gitnext": 0, + "predicted_coverage": 18, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/YAML-1.1.spec.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts", + "tests/cli.ts", + "tests/doc/foldFlowLines.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 18, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 18, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::compose::composer::Composer::compose", + "file": "src/compose/composer.ts", + "truth": 17, + "truth_doctests": 17, + "predicted_gitnext": 1, + "predicted_coverage": 17, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/YAML-1.1.spec.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts", + "tests/doc/foldFlowLines.ts", + "tests/properties.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 1, + "top_hits": 0, + "top_n": 1, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 17, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9444444444444444, + "predicted": 18, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::compose::resolve_block_seq::resolveBlockSeq", + "file": "src/compose/resolve-block-seq.ts", + "truth": 13, + "truth_doctests": 13, + "predicted_gitnext": 0, + "predicted_coverage": 13, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts", + "tests/doc/foldFlowLines.ts", + "tests/properties.ts", + "tests/doc/comments.ts", + "tests/doc/anchors.ts", + "tests/doc/stringify.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 13, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 13, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::compose::resolve_end::resolveEnd", + "file": "src/compose/resolve-end.ts", + "truth": 19, + "truth_doctests": 19, + "predicted_gitnext": 2, + "predicted_coverage": 19, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/cst.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts", + "tests/cli.ts" + ], + "score": { + "gitnext": { + "recall": 0.05263157894736842, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 19, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.95, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::compose::resolve_flow_scalar::resolveFlowScalar", + "file": "src/compose/resolve-flow-scalar.ts", + "skipped": "mutant does not compile", + "predicted_gitnext": 0, + "predicted_coverage": 19 + }, + { + "group": "pick", + "symbol": "src::compose::util_contains_newline::containsNewline", + "file": "src/compose/util-contains-newline.ts", + "truth": 17, + "truth_doctests": 17, + "predicted_gitnext": 0, + "predicted_coverage": 17, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts", + "tests/cli.ts", + "tests/doc/foldFlowLines.ts", + "tests/properties.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 17, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 17, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::compose::util_flow_indent_check::flowIndentCheck", + "file": "src/compose/util-flow-indent-check.ts", + "truth": 1, + "truth_doctests": 1, + "predicted_gitnext": 0, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/compat.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::doc::Document::Document::setSchema", + "file": "src/doc/Document.ts", + "truth": 20, + "truth_doctests": 20, + "predicted_gitnext": 0, + "predicted_coverage": 20, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/rawJSON.ts", + "tests/doc/createNode.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::doc::NodeCreator::NodeCreator::setAnchors", + "file": "src/doc/NodeCreator.ts", + "truth": 20, + "truth_doctests": 20, + "predicted_gitnext": 1, + "predicted_coverage": 20, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/rawJSON.ts", + "tests/doc/createNode.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts" + ], + "score": { + "gitnext": { + "recall": 0.05, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::doc::directives::Directives::atDocument", + "file": "src/doc/directives.ts", + "truth": 18, + "truth_doctests": 18, + "predicted_gitnext": 0, + "predicted_coverage": 18, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/YAML-1.1.spec.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts", + "tests/cli.ts", + "tests/doc/foldFlowLines.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 18, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 18, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::nodes::YAMLMap::YAMLMap::#stringifyFlowMap", + "file": "src/nodes/YAMLMap.ts", + "truth": 8, + "truth_doctests": 8, + "predicted_gitnext": 0, + "predicted_coverage": 8, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/createNode.ts", + "tests/cli.ts", + "tests/doc/comments.ts", + "tests/doc/anchors.ts", + "tests/doc/stringify.ts", + "tests/doc/parse.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/types.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::nodes::YAMLSeq::YAMLSeq::#stringifyBlockSeq", + "file": "src/nodes/YAMLSeq.ts", + "truth": 12, + "truth_doctests": 12, + "predicted_gitnext": 0, + "predicted_coverage": 12, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/rawJSON.ts", + "tests/doc/createNode.ts", + "tests/visit.ts", + "tests/doc/foldFlowLines.ts", + "tests/properties.ts", + "tests/doc/comments.ts", + "tests/collection-access.ts", + "tests/doc/anchors.ts", + "tests/doc/stringify.ts", + "tests/doc/parse.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 12, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 12, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::nodes::YAMLSet::YAMLSet::#stringifyBlockSet", + "file": "src/nodes/YAMLSet.ts", + "truth": 2, + "truth_doctests": 2, + "predicted_gitnext": 0, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/types.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::nodes::YAMLSet::YAMLSet::#stringifyFlowSet", + "file": "src/nodes/YAMLSet.ts", + "truth": 1, + "truth_doctests": 1, + "predicted_gitnext": 0, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/types.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::nodes::toJS::ToJSContext::resolveAlias", + "file": "src/nodes/toJS.ts", + "truth": 6, + "truth_doctests": 6, + "predicted_gitnext": 0, + "predicted_coverage": 6, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/node-to-js.ts", + "tests/cli.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/types.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::nodes::toJS::ToJSContext::setAnchor", + "file": "src/nodes/toJS.ts", + "truth": 6, + "truth_doctests": 6, + "predicted_gitnext": 0, + "predicted_coverage": 6, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/node-to-js.ts", + "tests/cli.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/types.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::parse::cst::tokenType", + "file": "src/parse/cst.ts", + "truth": 19, + "truth_doctests": 19, + "predicted_gitnext": 3, + "predicted_coverage": 19, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/cst.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts", + "tests/cli.ts" + ], + "score": { + "gitnext": { + "recall": 0.10526315789473684, + "precision": 0.6666666666666666, + "predicted": 3, + "top_hits": 2, + "top_n": 3, + "top_precision": 0.6666666666666666, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 19, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.95, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::parse::lexer::Lexer::flow", + "file": "src/parse/lexer.ts", + "truth": 15, + "truth_doctests": 15, + "predicted_gitnext": 3, + "predicted_coverage": 15, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/lexer.ts", + "tests/cst.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts", + "tests/cli.ts", + "tests/properties.ts", + "tests/doc/comments.ts" + ], + "score": { + "gitnext": { + "recall": 0.13333333333333333, + "precision": 0.6666666666666666, + "predicted": 3, + "top_hits": 2, + "top_n": 3, + "top_precision": 0.6666666666666666, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 15, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9375, + "predicted": 16, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::public_api::parseAllDocuments", + "file": "src/public-api.ts", + "truth": 4, + "truth_doctests": 4, + "predicted_gitnext": 0, + "predicted_coverage": 4, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/YAML-1.1.spec.ts", + "tests/doc/errors.ts", + "tests/doc/parse.ts", + "tests/doc/YAML-1.2.spec.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "pick", + "symbol": "src::schema::yaml_1_1::pairs::resolvePairs", + "file": "src/schema/yaml-1.1/pairs.ts", + "truth": 4, + "truth_doctests": 4, + "predicted_gitnext": 0, + "predicted_coverage": 4, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/types.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::nodes::YAMLSeq::YAMLSeq::toJS", + "file": "src/nodes/YAMLSeq.ts", + "truth": 8, + "truth_doctests": 8, + "predicted_gitnext": 1, + "predicted_coverage": 8, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/foldFlowLines.ts", + "tests/properties.ts", + "tests/collection-access.ts", + "tests/doc/anchors.ts", + "tests/doc/stringify.ts", + "tests/doc/parse.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/types.ts" + ], + "score": { + "gitnext": { + "recall": 0.125, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::nodes::Alias::Alias::toJS", + "file": "src/nodes/Alias.ts", + "truth": 6, + "truth_doctests": 6, + "predicted_gitnext": 1, + "predicted_coverage": 6, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/node-to-js.ts", + "tests/cli.ts", + "tests/doc/anchors.ts", + "tests/doc/parse.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/types.ts" + ], + "score": { + "gitnext": { + "recall": 0.16666666666666666, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::doc::anchors::anchorIsValid", + "file": "src/doc/anchors.ts", + "truth": 8, + "truth_doctests": 8, + "predicted_gitnext": 0, + "predicted_coverage": 8, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/createNode.ts", + "tests/clone.ts", + "tests/collection-access.ts", + "tests/doc/anchors.ts", + "tests/doc/stringify.ts", + "tests/doc/parse.ts", + "tests/doc/YAML-1.2.spec.ts", + "tests/doc/types.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 8, + "top_hits": 8, + "top_n": 8, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::schema::core::float::couldBeFloat", + "file": "src/schema/core/float.ts", + "truth": 18, + "truth_doctests": 18, + "predicted_gitnext": 0, + "predicted_coverage": 18, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/createNode.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts", + "tests/cli.ts", + "tests/doc/foldFlowLines.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 18, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 18, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::schema::yaml_1_1::pairs::createPairs", + "file": "src/schema/yaml-1.1/pairs.ts", + "truth": 3, + "truth_doctests": 3, + "predicted_gitnext": 0, + "predicted_coverage": 3, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/collection-access.ts", + "tests/doc/stringify.ts", + "tests/doc/types.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 3, + "top_hits": 3, + "top_n": 3, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::doc::Document::Document::set", + "file": "src/doc/Document.ts", + "truth": 5, + "truth_doctests": 5, + "predicted_gitnext": 0, + "predicted_coverage": 5, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/clone.ts", + "tests/collection-access.ts", + "tests/doc/stringify.ts", + "tests/doc/parse.ts", + "tests/doc/types.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 5, + "top_hits": 5, + "top_n": 5, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::nodes::util_clone_map_or_set::cloneMapOrSet", + "file": "src/nodes/util-clone-map-or-set.ts", + "truth": 1, + "truth_doctests": 1, + "predicted_gitnext": 0, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/clone.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::parse::lexer::Lexer::indicators", + "file": "src/parse/lexer.ts", + "truth": 20, + "truth_doctests": 20, + "predicted_gitnext": 2, + "predicted_coverage": 20, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/lexer.ts", + "tests/cst.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts" + ], + "score": { + "gitnext": { + "recall": 0.1, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::stringify::stringify::getResolvedOptions", + "file": "src/stringify/stringify.ts", + "truth": 17, + "truth_doctests": 17, + "predicted_gitnext": 1, + "predicted_coverage": 17, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/rawJSON.ts", + "tests/doc/createNode.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/visit.ts", + "tests/compat.ts", + "tests/cli.ts", + "tests/doc/foldFlowLines.ts", + "tests/properties.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 1, + "top_hits": 0, + "top_n": 1, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 17, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9444444444444444, + "predicted": 18, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::stringify::stringifyNumber::stringifyNumber", + "file": "src/stringify/stringifyNumber.ts", + "truth": 11, + "truth_doctests": 11, + "predicted_gitnext": 0, + "predicted_coverage": 11, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/doc/createNode.ts", + "tests/visit.ts", + "tests/cli.ts", + "tests/properties.ts", + "tests/doc/comments.ts", + "tests/collection-access.ts", + "tests/doc/anchors.ts", + "tests/doc/stringify.ts", + "tests/doc/parse.ts", + "tests/doc/YAML-1.2.spec.ts" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 11, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 11, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::parse::cst_scalar::createScalarToken", + "file": "src/parse/cst-scalar.ts", + "skipped": "mutant does not compile", + "predicted_gitnext": 0, + "predicted_coverage": 1 + }, + { + "group": "random", + "symbol": "src::parse::lexer::lex", + "file": "src/parse/lexer.ts", + "truth": 20, + "truth_doctests": 20, + "predicted_gitnext": 3, + "predicted_coverage": 20, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/lexer.ts", + "tests/cst.ts", + "tests/doc/YAML-1.1.spec.ts", + "tests/line-counter.ts", + "tests/node-to-js.ts", + "tests/directives.ts", + "tests/clone.ts", + "tests/doc/errors.ts", + "tests/visit.ts", + "tests/compat.ts" + ], + "score": { + "gitnext": { + "recall": 0.1, + "precision": 0.6666666666666666, + "predicted": 3, + "top_hits": 2, + "top_n": 3, + "top_precision": 0.6666666666666666, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 20, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.9523809523809523, + "predicted": 21, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + } + ], + "summary": { + "pick": { + "gitnext": { + "recall": 0.019, + "precision": 0.159, + "top_precision": 0.159, + "caught": 0.238 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.987, + "top_precision": 1.0, + "caught": 1.0 + }, + "functions": 21 + }, + "random": { + "gitnext": { + "recall": 0.045, + "precision": 0.333, + "top_precision": 0.333, + "caught": 0.364 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.991, + "top_precision": 1.0, + "caught": 1.0 + }, + "functions": 11 + }, + "all": { + "gitnext": { + "recall": 0.028, + "precision": 0.219, + "top_precision": 0.219, + "caught": 0.281 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.988, + "top_precision": 1.0, + "caught": 1.0 + }, + "functions": 32 + } + }, + "cost": { + "run_one_by_one_s": 48.6, + "map_s": 48.6, + "whole_suite_coverage_s": 9.2, + "coverage_json_bytes": 24735036, + "test_files": 24, + "repeat": 3, + "plain_s": 7.8, + "tests": 24, + "map_pairs": 2919, + "map_functions": 284, + "map_sqlite_bytes": 40960, + "functions_with_body": 306, + "functions_never_run": 21, + "fail_alone_not_together": [], + "fail_together_not_alone": [], + "slowdown_runs": 6.2 + } +} \ No newline at end of file diff --git a/eval/results/learn-tests-yaml.md b/eval/results/learn-tests-yaml.md new file mode 100644 index 0000000..489bc4f --- /dev/null +++ b/eval/results/learn-tests-yaml.md @@ -0,0 +1,72 @@ +# learn-tests на yaml (typescript): покрытие по тестам против `tests-for` +yaml 528ef30d6ded, gitnext 92dc87d, seed 7. Истина — eval (тесты, падающие при throw в начале функции). pick — функции с ответом в кэше eval, random — случайные. + +| выборка | функций | источник | полнота | точность | из 10 падают | поймано | +|---|---:|---|---:|---:|---:|---:| +| pick (кэш eval) | 21 | gitnext | 2% | 16% | 16% | 24% | +| pick (кэш eval) | 21 | coverage | 100% | 100% | 100% | 100% | +| pick (кэш eval) | 21 | union | 100% | 99% | 100% | 100% | +| случайные | 11 | gitnext | 4% | 33% | 33% | 36% | +| случайные | 11 | coverage | 100% | 100% | 100% | 100% | +| случайные | 11 | union | 100% | 99% | 100% | 100% | +| все | 32 | gitnext | 3% | 22% | 22% | 28% | +| все | 32 | coverage | 100% | 100% | 100% | 100% | +| все | 32 | union | 100% | 99% | 100% | 100% | + +## По функциям + +| выборка | функция | падают | граф: полн / из 10 | покрытие: полн / точн / из 10 | мимо покрытия | +|---|---|---:|---|---|---| +| pick | `src::compose::compose_collection::composeCollection` | 17 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::compose::compose_doc::composeDoc` | 18 | 6% / 50% | 100% / 100% / 100% | | +| pick | `src::compose::compose_scalar::composeScalar` | 18 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::compose::composer::Composer::compose` | 17 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::compose::resolve_block_seq::resolveBlockSeq` | 13 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::compose::resolve_end::resolveEnd` | 19 | 5% / 50% | 100% / 100% / 100% | | +| pick | `src::compose::resolve_flow_scalar::resolveFlowScalar` | 0 | mutant does not compile | названо 19 | | +| pick | `src::compose::util_contains_newline::containsNewline` | 17 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::compose::util_flow_indent_check::flowIndentCheck` | 1 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::doc::Document::Document::setSchema` | 20 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::doc::NodeCreator::NodeCreator::setAnchors` | 20 | 5% / 100% | 100% / 100% / 100% | | +| pick | `src::doc::directives::Directives::atDocument` | 18 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::nodes::YAMLMap::YAMLMap::#stringifyFlowMap` | 8 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::nodes::YAMLSeq::YAMLSeq::#stringifyBlockSeq` | 12 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::nodes::YAMLSet::YAMLSet::#stringifyBlockSet` | 2 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::nodes::YAMLSet::YAMLSet::#stringifyFlowSet` | 1 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::nodes::toJS::ToJSContext::resolveAlias` | 6 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::nodes::toJS::ToJSContext::setAnchor` | 6 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::parse::cst::tokenType` | 19 | 11% / 67% | 100% / 100% / 100% | | +| pick | `src::parse::lexer::Lexer::flow` | 15 | 13% / 67% | 100% / 100% / 100% | | +| pick | `src::public_api::parseAllDocuments` | 4 | 0% / 0% | 100% / 100% / 100% | | +| pick | `src::schema::yaml_1_1::pairs::resolvePairs` | 4 | 0% / 0% | 100% / 100% / 100% | | +| random | `src::nodes::YAMLSeq::YAMLSeq::toJS` | 8 | 12% / 100% | 100% / 100% / 100% | | +| random | `src::nodes::Alias::Alias::toJS` | 6 | 17% / 100% | 100% / 100% / 100% | | +| random | `src::doc::anchors::anchorIsValid` | 8 | 0% / 0% | 100% / 100% / 100% | | +| random | `src::schema::core::float::couldBeFloat` | 18 | 0% / 0% | 100% / 100% / 100% | | +| random | `src::schema::yaml_1_1::pairs::createPairs` | 3 | 0% / 0% | 100% / 100% / 100% | | +| random | `src::doc::Document::Document::set` | 5 | 0% / 0% | 100% / 100% / 100% | | +| random | `src::nodes::util_clone_map_or_set::cloneMapOrSet` | 1 | 0% / 0% | 100% / 100% / 100% | | +| random | `src::parse::lexer::Lexer::indicators` | 20 | 10% / 100% | 100% / 100% / 100% | | +| random | `src::stringify::stringify::getResolvedOptions` | 17 | 0% / 0% | 100% / 100% / 100% | | +| random | `src::stringify::stringifyNumber::stringifyNumber` | 11 | 0% / 0% | 100% / 100% / 100% | | +| random | `src::parse::cst_scalar::createScalarToken` | 0 | mutant does not compile | названо 1 | | +| random | `src::parse::lexer::lex` | 20 | 10% / 67% | 100% / 100% / 100% | | + +## Цена + +- `run_one_by_one_s`: 48.6 +- `map_s`: 48.6 +- `whole_suite_coverage_s`: 9.2 +- `coverage_json_bytes`: 24735036 +- `test_files`: 24 +- `repeat`: 3 +- `plain_s`: 7.8 +- `tests`: 24 +- `map_pairs`: 2919 +- `map_functions`: 284 +- `map_sqlite_bytes`: 40960 +- `functions_with_body`: 306 +- `functions_never_run`: 21 +- `fail_alone_not_together`: [] +- `fail_together_not_alone`: [] +- `slowdown_runs`: 6.2 diff --git a/eval/results/learn-tests-zustand.causes.json b/eval/results/learn-tests-zustand.causes.json new file mode 100644 index 0000000..ee5929b --- /dev/null +++ b/eval/results/learn-tests-zustand.causes.json @@ -0,0 +1,1221 @@ +{ + "repo": "zustand", + "package": "zustand", + "test_files": 14, + "test_functions_by_file": { + "tests/basic.test.tsx": 37, + "tests/devtools.test.tsx": 31, + "tests/middlewareTypes.test.tsx": 27, + "tests/persistAsync.test.tsx": 26, + "tests/persistPromiseLike.test.ts": 4, + "tests/persistSync.test.tsx": 8, + "tests/shallow.test.tsx": 5, + "tests/ssr.test.tsx": 2, + "tests/test-utils.ts": 4, + "tests/types.test.tsx": 8, + "tests/vanilla/basic.test.ts": 1, + "tests/vanilla/shallow.test.tsx": 3, + "tests/vanilla/subscribe.test.tsx": 1 + }, + "functions": [ + { + "graph_with_test_modules": { + "sure_4": [ + "tests/devtools.test.tsx" + ], + "named_sure_4": 1, + "sure_8": [ + "tests/devtools.test.tsx" + ], + "named_sure_8": 1, + "sure_or_possible_4": [ + "tests/devtools.test.tsx" + ], + "named_sure_or_possible_4": 1, + "sure_or_possible_8": [ + "tests/devtools.test.tsx" + ], + "named_sure_or_possible_8": 1 + }, + "simulated_file_as_test": { + "sure": [ + "tests/devtools.test.tsx" + ], + "sure_or_possible": [ + "tests/devtools.test.tsx" + ], + "named_sure": 1, + "named_sure_or_possible": 1, + "ancestors_sure": 4, + "ancestors_all": 4 + }, + "symbol": "src::middleware::devtools::getParamNames", + "file": "src/middleware/devtools.ts", + "truth": 1, + "named_files": 1, + "hit": 1, + "named": [ + "tests/devtools.test.tsx" + ], + "named_how": [ + "its test file" + ], + "missed": [] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/devtools.test.tsx" + ], + "named_sure_4": 1, + "sure_8": [ + "tests/devtools.test.tsx" + ], + "named_sure_8": 1, + "sure_or_possible_4": [ + "tests/devtools.test.tsx" + ], + "named_sure_or_possible_4": 1, + "sure_or_possible_8": [ + "tests/devtools.test.tsx" + ], + "named_sure_or_possible_8": 1 + }, + "simulated_file_as_test": { + "sure": [ + "tests/devtools.test.tsx" + ], + "sure_or_possible": [ + "tests/devtools.test.tsx" + ], + "named_sure": 1, + "named_sure_or_possible": 1, + "ancestors_sure": 2, + "ancestors_all": 2 + }, + "symbol": "src::middleware::devtools::getTrackedConnectionState", + "file": "src/middleware/devtools.ts", + "truth": 1, + "named_files": 1, + "hit": 1, + "named": [ + "tests/devtools.test.tsx" + ], + "named_how": [ + "its test file" + ], + "missed": [] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/devtools.test.tsx" + ], + "named_sure_4": 1, + "sure_8": [ + "tests/devtools.test.tsx" + ], + "named_sure_8": 1, + "sure_or_possible_4": [ + "tests/devtools.test.tsx" + ], + "named_sure_or_possible_4": 1, + "sure_or_possible_8": [ + "tests/devtools.test.tsx" + ], + "named_sure_or_possible_8": 1 + }, + "simulated_file_as_test": { + "sure": [ + "tests/devtools.test.tsx" + ], + "sure_or_possible": [ + "tests/devtools.test.tsx" + ], + "named_sure": 1, + "named_sure_or_possible": 1, + "ancestors_sure": 3, + "ancestors_all": 3 + }, + "symbol": "src::middleware::devtools::maskToRegex", + "file": "src/middleware/devtools.ts", + "truth": 1, + "named_files": 1, + "hit": 1, + "named": [ + "tests/devtools.test.tsx" + ], + "named_how": [ + "its test file" + ], + "missed": [] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/devtools.test.tsx" + ], + "named_sure_4": 1, + "sure_8": [ + "tests/devtools.test.tsx" + ], + "named_sure_8": 1, + "sure_or_possible_4": [ + "tests/devtools.test.tsx" + ], + "named_sure_or_possible_4": 1, + "sure_or_possible_8": [ + "tests/devtools.test.tsx" + ], + "named_sure_or_possible_8": 1 + }, + "simulated_file_as_test": { + "sure": [ + "tests/devtools.test.tsx" + ], + "sure_or_possible": [ + "tests/devtools.test.tsx" + ], + "named_sure": 1, + "named_sure_or_possible": 1, + "ancestors_sure": 2, + "ancestors_all": 2 + }, + "symbol": "src::middleware::devtools::parseDropdownArgs", + "file": "src/middleware/devtools.ts", + "truth": 1, + "named_files": 1, + "hit": 1, + "named": [ + "tests/devtools.test.tsx" + ], + "named_how": [ + "its test file" + ], + "missed": [] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/devtools.test.tsx" + ], + "named_sure_4": 1, + "sure_8": [ + "tests/devtools.test.tsx" + ], + "named_sure_8": 1, + "sure_or_possible_4": [ + "tests/devtools.test.tsx" + ], + "named_sure_or_possible_4": 1, + "sure_or_possible_8": [ + "tests/devtools.test.tsx" + ], + "named_sure_or_possible_8": 1 + }, + "simulated_file_as_test": { + "sure": [ + "tests/devtools.test.tsx" + ], + "sure_or_possible": [ + "tests/devtools.test.tsx" + ], + "named_sure": 1, + "named_sure_or_possible": 1, + "ancestors_sure": 1, + "ancestors_all": 1 + }, + "symbol": "src::middleware::devtools::setStateFromDevtools", + "file": "src/middleware/devtools.ts", + "truth": 1, + "named_files": 1, + "hit": 1, + "named": [ + "tests/devtools.test.tsx" + ], + "named_how": [ + "its test file" + ], + "missed": [] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/persistAsync.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx" + ], + "named_sure_4": 3, + "sure_8": [ + "tests/persistAsync.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx" + ], + "named_sure_8": 3, + "sure_or_possible_4": [ + "tests/persistAsync.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx" + ], + "named_sure_or_possible_4": 3, + "sure_or_possible_8": [ + "tests/persistAsync.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx" + ], + "named_sure_or_possible_8": 3 + }, + "simulated_file_as_test": { + "sure": [ + "tests/persistAsync.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx" + ], + "sure_or_possible": [ + "tests/persistAsync.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx" + ], + "named_sure": 3, + "named_sure_or_possible": 3, + "ancestors_sure": 2, + "ancestors_all": 2 + }, + "symbol": "src::middleware::persist::createJSONStorage", + "file": "src/middleware/persist.ts", + "truth": 6, + "named_files": 2, + "hit": 2, + "named": [ + "tests/persistAsync.test.tsx", + "tests/persistSync.test.tsx" + ], + "named_how": [ + "direct" + ], + "missed": [ + { + "test": "tests/devtools.test.tsx", + "reach": "package subpath `zustand/middleware`; package subpath `zustand/vanilla`", + "test_symbols": 31 + }, + { + "test": "tests/middlewareTypes.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; package subpath `zustand/middleware/immer`; package subpath `zustand/vanilla`", + "test_symbols": 27 + }, + { + "test": "tests/persistPromiseLike.test.ts", + "reach": "package subpath `zustand/middleware`; package subpath `zustand/vanilla`", + "test_symbols": 4 + }, + { + "test": "tests/types.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`", + "test_symbols": 8 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [], + "named_sure_or_possible_4": 0, + "sure_or_possible_8": [], + "named_sure_or_possible_8": 0 + }, + "simulated_file_as_test": { + "sure": [], + "sure_or_possible": [], + "named_sure": 0, + "named_sure_or_possible": 0, + "ancestors_sure": 1, + "ancestors_all": 1 + }, + "symbol": "src::middleware::persist::hydrate", + "file": "src/middleware/persist.ts", + "truth": 6, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/devtools.test.tsx", + "reach": "package subpath `zustand/middleware`; package subpath `zustand/vanilla`", + "test_symbols": 31 + }, + { + "test": "tests/middlewareTypes.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; package subpath `zustand/middleware/immer`; package subpath `zustand/vanilla`", + "test_symbols": 27 + }, + { + "test": "tests/persistAsync.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; package subpath `zustand/vanilla`; helper `tests/test-utils`", + "test_symbols": 26 + }, + { + "test": "tests/persistPromiseLike.test.ts", + "reach": "package subpath `zustand/middleware`; package subpath `zustand/vanilla`", + "test_symbols": 4 + }, + { + "test": "tests/persistSync.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; helper `tests/test-utils`", + "test_symbols": 8 + }, + { + "test": "tests/types.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`", + "test_symbols": 8 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [], + "named_sure_or_possible_4": 0, + "sure_or_possible_8": [], + "named_sure_or_possible_8": 0 + }, + "simulated_file_as_test": { + "sure": [], + "sure_or_possible": [], + "named_sure": 1, + "named_sure_or_possible": 1, + "ancestors_sure": 1, + "ancestors_all": 1 + }, + "symbol": "src::middleware::persist::parse", + "file": "src/middleware/persist.ts", + "truth": 3, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/persistAsync.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; package subpath `zustand/vanilla`; helper `tests/test-utils`", + "test_symbols": 26 + }, + { + "test": "tests/persistPromiseLike.test.ts", + "reach": "package subpath `zustand/middleware`; package subpath `zustand/vanilla`", + "test_symbols": 4 + }, + { + "test": "tests/persistSync.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; helper `tests/test-utils`", + "test_symbols": 8 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [], + "named_sure_or_possible_4": 0, + "sure_or_possible_8": [], + "named_sure_or_possible_8": 0 + }, + "simulated_file_as_test": { + "sure": [], + "sure_or_possible": [], + "named_sure": 0, + "named_sure_or_possible": 0, + "ancestors_sure": 1, + "ancestors_all": 1 + }, + "symbol": "src::middleware::persist::persistImpl", + "file": "src/middleware/persist.ts", + "truth": 6, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/devtools.test.tsx", + "reach": "package subpath `zustand/middleware`; package subpath `zustand/vanilla`", + "test_symbols": 31 + }, + { + "test": "tests/middlewareTypes.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; package subpath `zustand/middleware/immer`; package subpath `zustand/vanilla`", + "test_symbols": 27 + }, + { + "test": "tests/persistAsync.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; package subpath `zustand/vanilla`; helper `tests/test-utils`", + "test_symbols": 26 + }, + { + "test": "tests/persistPromiseLike.test.ts", + "reach": "package subpath `zustand/middleware`; package subpath `zustand/vanilla`", + "test_symbols": 4 + }, + { + "test": "tests/persistSync.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; helper `tests/test-utils`", + "test_symbols": 8 + }, + { + "test": "tests/types.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`", + "test_symbols": 8 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [], + "named_sure_or_possible_4": 0, + "sure_or_possible_8": [], + "named_sure_or_possible_8": 0 + }, + "simulated_file_as_test": { + "sure": [ + "tests/persistPromiseLike.test.ts" + ], + "sure_or_possible": [ + "tests/persistPromiseLike.test.ts" + ], + "named_sure": 1, + "named_sure_or_possible": 1, + "ancestors_sure": 3, + "ancestors_all": 3 + }, + "symbol": "src::middleware::persist::toThenable", + "file": "src/middleware/persist.ts", + "truth": 6, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/devtools.test.tsx", + "reach": "package subpath `zustand/middleware`; package subpath `zustand/vanilla`", + "test_symbols": 31 + }, + { + "test": "tests/middlewareTypes.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; package subpath `zustand/middleware/immer`; package subpath `zustand/vanilla`", + "test_symbols": 27 + }, + { + "test": "tests/persistAsync.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; package subpath `zustand/vanilla`; helper `tests/test-utils`", + "test_symbols": 26 + }, + { + "test": "tests/persistPromiseLike.test.ts", + "reach": "package subpath `zustand/middleware`; package subpath `zustand/vanilla`", + "test_symbols": 4 + }, + { + "test": "tests/persistSync.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; helper `tests/test-utils`", + "test_symbols": 8 + }, + { + "test": "tests/types.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`", + "test_symbols": 8 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [], + "named_sure_4": 0, + "sure_8": [], + "named_sure_8": 0, + "sure_or_possible_4": [], + "named_sure_or_possible_4": 0, + "sure_or_possible_8": [], + "named_sure_or_possible_8": 0 + }, + "simulated_file_as_test": { + "sure": [], + "sure_or_possible": [], + "named_sure": 0, + "named_sure_or_possible": 0, + "ancestors_sure": 1, + "ancestors_all": 1 + }, + "symbol": "src::middleware::redux::reduxImpl", + "file": "src/middleware/redux.ts", + "truth": 2, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/devtools.test.tsx", + "reach": "package subpath `zustand/middleware`; package subpath `zustand/vanilla`", + "test_symbols": 31 + }, + { + "test": "tests/middlewareTypes.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; package subpath `zustand/middleware/immer`; package subpath `zustand/vanilla`", + "test_symbols": 27 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/basic.test.tsx", + "tests/immer.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistSync.test.tsx", + "tests/shallow.test.tsx", + "tests/ssr.test.tsx", + "tests/subscribe.test.tsx", + "tests/types.test.tsx" + ], + "named_sure_4": 9, + "sure_8": [ + "tests/basic.test.tsx", + "tests/immer.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistSync.test.tsx", + "tests/shallow.test.tsx", + "tests/ssr.test.tsx", + "tests/subscribe.test.tsx", + "tests/types.test.tsx" + ], + "named_sure_8": 9, + "sure_or_possible_4": [ + "tests/basic.test.tsx", + "tests/immer.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistSync.test.tsx", + "tests/shallow.test.tsx", + "tests/ssr.test.tsx", + "tests/subscribe.test.tsx", + "tests/types.test.tsx" + ], + "named_sure_or_possible_4": 9, + "sure_or_possible_8": [ + "tests/basic.test.tsx", + "tests/immer.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistSync.test.tsx", + "tests/shallow.test.tsx", + "tests/ssr.test.tsx", + "tests/subscribe.test.tsx", + "tests/types.test.tsx" + ], + "named_sure_or_possible_8": 9 + }, + "simulated_file_as_test": { + "sure": [ + "tests/basic.test.tsx", + "tests/immer.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistSync.test.tsx", + "tests/shallow.test.tsx", + "tests/ssr.test.tsx", + "tests/subscribe.test.tsx", + "tests/types.test.tsx" + ], + "sure_or_possible": [ + "tests/basic.test.tsx", + "tests/immer.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistSync.test.tsx", + "tests/shallow.test.tsx", + "tests/ssr.test.tsx", + "tests/subscribe.test.tsx", + "tests/types.test.tsx" + ], + "named_sure": 9, + "named_sure_or_possible": 9, + "ancestors_sure": 2, + "ancestors_all": 2 + }, + "symbol": "src::react::createImpl", + "file": "src/react.ts", + "truth": 9, + "named_files": 2, + "hit": 2, + "named": [ + "tests/persistAsync.test.tsx", + "tests/persistSync.test.tsx" + ], + "named_how": [ + "2 hops" + ], + "missed": [ + { + "test": "tests/basic.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/traditional`", + "test_symbols": 37 + }, + { + "test": "tests/immer.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware/immer`; package subpath `zustand/vanilla`", + "test_symbols": 0 + }, + { + "test": "tests/middlewareTypes.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; package subpath `zustand/middleware/immer`; package subpath `zustand/vanilla`", + "test_symbols": 27 + }, + { + "test": "tests/shallow.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/shallow`; package subpath `zustand/traditional`", + "test_symbols": 5 + }, + { + "test": "tests/ssr.test.tsx", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 2 + }, + { + "test": "tests/subscribe.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`", + "test_symbols": 0 + }, + { + "test": "tests/types.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`", + "test_symbols": 8 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/shallow.test.tsx" + ], + "named_sure_4": 2, + "sure_8": [ + "tests/shallow.test.tsx" + ], + "named_sure_8": 2, + "sure_or_possible_4": [ + "tests/shallow.test.tsx" + ], + "named_sure_or_possible_4": 2, + "sure_or_possible_8": [ + "tests/shallow.test.tsx" + ], + "named_sure_or_possible_8": 2 + }, + "simulated_file_as_test": { + "sure": [ + "tests/shallow.test.tsx" + ], + "sure_or_possible": [ + "tests/shallow.test.tsx" + ], + "named_sure": 2, + "named_sure_or_possible": 2, + "ancestors_sure": 1, + "ancestors_all": 1 + }, + "symbol": "src::react::shallow::useShallow", + "file": "src/react/shallow.ts", + "truth": 1, + "named_files": 2, + "hit": 1, + "named": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_how": [ + "direct", + "direct, named after it", + "its test file" + ], + "missed": [] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/basic.test.tsx", + "tests/shallow.test.tsx" + ], + "named_sure_4": 2, + "sure_8": [ + "tests/basic.test.tsx", + "tests/shallow.test.tsx" + ], + "named_sure_8": 2, + "sure_or_possible_4": [ + "tests/basic.test.tsx", + "tests/shallow.test.tsx" + ], + "named_sure_or_possible_4": 2, + "sure_or_possible_8": [ + "tests/basic.test.tsx", + "tests/shallow.test.tsx" + ], + "named_sure_or_possible_8": 2 + }, + "simulated_file_as_test": { + "sure": [ + "tests/basic.test.tsx", + "tests/shallow.test.tsx" + ], + "sure_or_possible": [ + "tests/basic.test.tsx", + "tests/shallow.test.tsx" + ], + "named_sure": 2, + "named_sure_or_possible": 2, + "ancestors_sure": 2, + "ancestors_all": 2 + }, + "symbol": "src::traditional::createWithEqualityFnImpl", + "file": "src/traditional.ts", + "truth": 2, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/basic.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/traditional`", + "test_symbols": 37 + }, + { + "test": "tests/shallow.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/shallow`; package subpath `zustand/traditional`", + "test_symbols": 5 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/basic.test.tsx", + "tests/devtools.test.tsx", + "tests/immer.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx", + "tests/shallow.test.tsx", + "tests/ssr.test.tsx", + "tests/subscribe.test.tsx", + "tests/types.test.tsx", + "tests/vanilla/basic.test.ts", + "tests/vanilla/subscribe.test.tsx" + ], + "named_sure_4": 13, + "sure_8": [ + "tests/basic.test.tsx", + "tests/devtools.test.tsx", + "tests/immer.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx", + "tests/shallow.test.tsx", + "tests/ssr.test.tsx", + "tests/subscribe.test.tsx", + "tests/types.test.tsx", + "tests/vanilla/basic.test.ts", + "tests/vanilla/subscribe.test.tsx" + ], + "named_sure_8": 13, + "sure_or_possible_4": [ + "tests/basic.test.tsx", + "tests/devtools.test.tsx", + "tests/immer.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx", + "tests/shallow.test.tsx", + "tests/ssr.test.tsx", + "tests/subscribe.test.tsx", + "tests/types.test.tsx", + "tests/vanilla/basic.test.ts", + "tests/vanilla/subscribe.test.tsx" + ], + "named_sure_or_possible_4": 13, + "sure_or_possible_8": [ + "tests/basic.test.tsx", + "tests/devtools.test.tsx", + "tests/immer.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx", + "tests/shallow.test.tsx", + "tests/ssr.test.tsx", + "tests/subscribe.test.tsx", + "tests/types.test.tsx", + "tests/vanilla/basic.test.ts", + "tests/vanilla/subscribe.test.tsx" + ], + "named_sure_or_possible_8": 13 + }, + "simulated_file_as_test": { + "sure": [ + "tests/basic.test.tsx", + "tests/devtools.test.tsx", + "tests/immer.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx", + "tests/shallow.test.tsx", + "tests/ssr.test.tsx", + "tests/subscribe.test.tsx", + "tests/types.test.tsx", + "tests/vanilla/basic.test.ts", + "tests/vanilla/subscribe.test.tsx" + ], + "sure_or_possible": [ + "tests/basic.test.tsx", + "tests/devtools.test.tsx", + "tests/immer.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx", + "tests/shallow.test.tsx", + "tests/ssr.test.tsx", + "tests/subscribe.test.tsx", + "tests/types.test.tsx", + "tests/vanilla/basic.test.ts", + "tests/vanilla/subscribe.test.tsx" + ], + "named_sure": 13, + "named_sure_or_possible": 13, + "ancestors_sure": 6, + "ancestors_all": 6 + }, + "symbol": "src::vanilla::createStoreImpl", + "file": "src/vanilla.ts", + "truth": 13, + "named_files": 4, + "hit": 4, + "named": [ + "tests/persistPromiseLike.test.ts", + "tests/devtools.test.tsx", + "tests/persistAsync.test.tsx", + "tests/persistSync.test.tsx" + ], + "named_how": [ + "2 hops", + "4 hops" + ], + "missed": [ + { + "test": "tests/basic.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/traditional`", + "test_symbols": 37 + }, + { + "test": "tests/immer.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware/immer`; package subpath `zustand/vanilla`", + "test_symbols": 0 + }, + { + "test": "tests/middlewareTypes.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; package subpath `zustand/middleware/immer`; package subpath `zustand/vanilla`", + "test_symbols": 27 + }, + { + "test": "tests/shallow.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/shallow`; package subpath `zustand/traditional`", + "test_symbols": 5 + }, + { + "test": "tests/ssr.test.tsx", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 2 + }, + { + "test": "tests/subscribe.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`", + "test_symbols": 0 + }, + { + "test": "tests/types.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`", + "test_symbols": 8 + }, + { + "test": "tests/vanilla/basic.test.ts", + "reach": "package subpath `zustand/vanilla`", + "test_symbols": 1 + }, + { + "test": "tests/vanilla/subscribe.test.tsx", + "reach": "package subpath `zustand/middleware`; package subpath `zustand/vanilla`", + "test_symbols": 1 + } + ] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_sure_4": 2, + "sure_8": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_sure_8": 2, + "sure_or_possible_4": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_sure_or_possible_4": 2, + "sure_or_possible_8": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_sure_or_possible_8": 2 + }, + "simulated_file_as_test": { + "sure": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "sure_or_possible": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_sure": 2, + "named_sure_or_possible": 2, + "ancestors_sure": 3, + "ancestors_all": 3 + }, + "symbol": "src::vanilla::shallow::compareEntries", + "file": "src/vanilla/shallow.ts", + "truth": 2, + "named_files": 2, + "hit": 2, + "named": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_how": [ + "3 hops, its test file", + "its test file" + ], + "missed": [] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/vanilla/shallow.test.tsx" + ], + "named_sure_4": 2, + "sure_8": [ + "tests/vanilla/shallow.test.tsx" + ], + "named_sure_8": 2, + "sure_or_possible_4": [ + "tests/vanilla/shallow.test.tsx" + ], + "named_sure_or_possible_4": 2, + "sure_or_possible_8": [ + "tests/vanilla/shallow.test.tsx" + ], + "named_sure_or_possible_8": 2 + }, + "simulated_file_as_test": { + "sure": [ + "tests/vanilla/shallow.test.tsx" + ], + "sure_or_possible": [ + "tests/vanilla/shallow.test.tsx" + ], + "named_sure": 2, + "named_sure_or_possible": 2, + "ancestors_sure": 3, + "ancestors_all": 3 + }, + "symbol": "src::vanilla::shallow::compareIterables", + "file": "src/vanilla/shallow.ts", + "truth": 1, + "named_files": 2, + "hit": 1, + "named": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_how": [ + "3 hops, its test file", + "its test file" + ], + "missed": [] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_sure_4": 2, + "sure_8": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_sure_8": 2, + "sure_or_possible_4": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_sure_or_possible_4": 2, + "sure_or_possible_8": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_sure_or_possible_8": 2 + }, + "simulated_file_as_test": { + "sure": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "sure_or_possible": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_sure": 2, + "named_sure_or_possible": 2, + "ancestors_sure": 2, + "ancestors_all": 2 + }, + "symbol": "src::vanilla::shallow::shallow", + "file": "src/vanilla/shallow.ts", + "truth": 2, + "named_files": 2, + "hit": 2, + "named": [ + "tests/shallow.test.tsx", + "tests/vanilla/shallow.test.tsx" + ], + "named_how": [ + "2 hops, named after it, its test file", + "its test file" + ], + "missed": [] + }, + { + "graph_with_test_modules": { + "sure_4": [ + "tests/basic.test.tsx", + "tests/vanilla/subscribe.test.tsx" + ], + "named_sure_4": 2, + "sure_8": [ + "tests/basic.test.tsx", + "tests/vanilla/subscribe.test.tsx" + ], + "named_sure_8": 2, + "sure_or_possible_4": [ + "tests/basic.test.tsx", + "tests/vanilla/subscribe.test.tsx" + ], + "named_sure_or_possible_4": 2, + "sure_or_possible_8": [ + "tests/basic.test.tsx", + "tests/vanilla/subscribe.test.tsx" + ], + "named_sure_or_possible_8": 2 + }, + "simulated_file_as_test": { + "sure": [ + "tests/basic.test.tsx", + "tests/persistAsync.test.tsx", + "tests/subscribe.test.tsx", + "tests/vanilla/basic.test.ts", + "tests/vanilla/subscribe.test.tsx" + ], + "sure_or_possible": [ + "tests/basic.test.tsx", + "tests/persistAsync.test.tsx", + "tests/subscribe.test.tsx", + "tests/vanilla/basic.test.ts", + "tests/vanilla/subscribe.test.tsx" + ], + "named_sure": 6, + "named_sure_or_possible": 6, + "ancestors_sure": 1, + "ancestors_all": 1 + }, + "symbol": "src::vanilla::subscribe", + "file": "src/vanilla.ts", + "truth": 7, + "named_files": 0, + "hit": 0, + "named": [], + "named_how": [], + "missed": [ + { + "test": "tests/basic.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/traditional`", + "test_symbols": 37 + }, + { + "test": "tests/persistAsync.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`; package subpath `zustand/vanilla`; helper `tests/test-utils`", + "test_symbols": 26 + }, + { + "test": "tests/shallow.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/shallow`; package subpath `zustand/traditional`", + "test_symbols": 5 + }, + { + "test": "tests/ssr.test.tsx", + "reach": "package name (vitest alias) → index re-export", + "test_symbols": 2 + }, + { + "test": "tests/subscribe.test.tsx", + "reach": "package name (vitest alias) → index re-export; package subpath `zustand/middleware`", + "test_symbols": 0 + }, + { + "test": "tests/vanilla/basic.test.ts", + "reach": "package subpath `zustand/vanilla`", + "test_symbols": 1 + }, + { + "test": "tests/vanilla/subscribe.test.tsx", + "reach": "package subpath `zustand/middleware`; package subpath `zustand/vanilla`", + "test_symbols": 1 + } + ] + } + ] +} \ No newline at end of file diff --git a/eval/results/learn-tests-zustand.causes.md b/eval/results/learn-tests-zustand.causes.md new file mode 100644 index 0000000..d0bbe33 --- /dev/null +++ b/eval/results/learn-tests-zustand.causes.md @@ -0,0 +1,27 @@ +# Почему `tests-for` не называет падающие файлы тестов: zustand + +Функций с промахом: 10 из 19; падающих файлов 60, названо верно 8, пропущено 52. Тестовых файлов 14, из них без единой именованной функции 1. + +Пара «функция, пропущенный файл» по первой подходящей причине: + +| причина | пар | функций | пример (функция → файл) | +|---|---:|---:|---| +| граф доходит до модуля тестового файла (вызов в `it(…, () => …)`), `tests-for` его отбрасывает: не функция (locate.rs, `is_callable`) — 4 перехода, уверенные рёбра | 21 | 5 | `createJSONStorage` → `tests/persistPromiseLike.test.ts` | +| то же, но через «возможное» ребро (`.method` у получателя неизвестного типа) — 4 перехода | 0 | 0 | | +| то же, но глубже 4 переходов (5–8) | 0 | 0 | | +| в графе нет ребра по пути, хотя тестовый файл вызывает функцию-предка по имени (текст) | 4 | 2 | `toThenable` → `tests/persistPromiseLike.test.ts` | +| ни граф, ни имя предка в тексте теста: экспорт под другим именем (`export const persist = persistImpl as …`), вызов через объект (`api.subscribe`), данные набора тестов | 27 | 7 | `createJSONStorage` → `tests/devtools.test.tsx` | + +Из пропущенных пар в файлах без именованных функций: 5; путь импорта (по парам): +- по имени пакета: 52 + +Оценка починки графа (по функциям, среднее; `named` — сколько файлов назвал бы): + +| вариант | полнота | точность | функций с ответом | +|---|---:|---:|---:| +| модули тестов, уверенные рёбра, 4 перехода | 67% | 93% | 14 из 19 | +| + возможные рёбра, 4 перехода | 67% | 93% | 14 из 19 | +| модули тестов, уверенные, 8 переходов | 67% | 93% | 14 из 19 | +| + возможные, 8 переходов | 67% | 93% | 14 из 19 | +| потолок графа: файл вызывает предка по имени (текст, 8 переходов) | 70% | 86% | 16 из 19 | +| сейчас (`tests-for`) | 52% | | | diff --git a/eval/results/learn-tests-zustand.json b/eval/results/learn-tests-zustand.json new file mode 100644 index 0000000..38f90ab --- /dev/null +++ b/eval/results/learn-tests-zustand.json @@ -0,0 +1,1023 @@ +{ + "repo": "zustand", + "lang": "typescript", + "commit": "9fed2eb2f3af", + "seed": 7, + "gitnext_commit": "92dc87d", + "functions": [ + { + "group": "pick", + "symbol": "src::middleware::persist::createJSONStorage", + "file": "src/middleware/persist.ts", + "truth": 6, + "truth_doctests": 6, + "predicted_gitnext": 2, + "predicted_coverage": 6, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx", + "tests/persistAsync.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/types.test.tsx", + "tests/devtools.test.tsx" + ], + "score": { + "gitnext": { + "recall": 0.3333333333333333, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::middleware::devtools::setStateFromDevtools", + "file": "src/middleware/devtools.ts", + "truth": 1, + "truth_doctests": 1, + "predicted_gitnext": 1, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/devtools.test.tsx" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::middleware::persist::persistImpl", + "file": "src/middleware/persist.ts", + "truth": 6, + "truth_doctests": 6, + "predicted_gitnext": 0, + "predicted_coverage": 6, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx", + "tests/persistAsync.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/types.test.tsx", + "tests/devtools.test.tsx" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::middleware::persist::parse", + "file": "src/middleware/persist.ts", + "truth": 3, + "truth_doctests": 3, + "predicted_gitnext": 0, + "predicted_coverage": 5, + "missed_by_coverage": [], + "covered_not_failing": [ + "tests/middlewareTypes.test.tsx", + "tests/types.test.tsx" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 2, + "top_coverage": [ + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx", + "tests/persistAsync.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/types.test.tsx" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.6, + "predicted": 5, + "top_hits": 3, + "top_n": 5, + "top_precision": 0.6, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.6, + "predicted": 5, + "top_hits": 3, + "top_n": 5, + "top_precision": 0.6, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::middleware::devtools::maskToRegex", + "file": "src/middleware/devtools.ts", + "truth": 1, + "truth_doctests": 1, + "predicted_gitnext": 1, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/devtools.test.tsx" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::vanilla::subscribe", + "file": "src/vanilla.ts", + "truth": 7, + "truth_doctests": 7, + "predicted_gitnext": 0, + "predicted_coverage": 7, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/vanilla/subscribe.test.tsx", + "tests/vanilla/basic.test.ts", + "tests/subscribe.test.tsx", + "tests/ssr.test.tsx", + "tests/basic.test.tsx", + "tests/persistAsync.test.tsx", + "tests/shallow.test.tsx" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 7, + "top_hits": 7, + "top_n": 7, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 7, + "top_hits": 7, + "top_n": 7, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::vanilla::shallow::shallow", + "file": "src/vanilla/shallow.ts", + "truth": 2, + "truth_doctests": 2, + "predicted_gitnext": 2, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/vanilla/shallow.test.tsx", + "tests/shallow.test.tsx" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::react::shallow::useShallow", + "file": "src/react/shallow.ts", + "truth": 1, + "truth_doctests": 1, + "predicted_gitnext": 2, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/shallow.test.tsx" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::middleware::devtools::parseDropdownArgs", + "file": "src/middleware/devtools.ts", + "truth": 1, + "truth_doctests": 1, + "predicted_gitnext": 1, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/devtools.test.tsx" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::react::createImpl", + "file": "src/react.ts", + "truth": 9, + "truth_doctests": 9, + "predicted_gitnext": 2, + "predicted_coverage": 9, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/immer.test.tsx", + "tests/subscribe.test.tsx", + "tests/ssr.test.tsx", + "tests/basic.test.tsx", + "tests/persistSync.test.tsx", + "tests/persistAsync.test.tsx", + "tests/shallow.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/types.test.tsx" + ], + "score": { + "gitnext": { + "recall": 0.2222222222222222, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 9, + "top_hits": 9, + "top_n": 9, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 9, + "top_hits": 9, + "top_n": 9, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::vanilla::createStoreImpl", + "file": "src/vanilla.ts", + "truth": 13, + "truth_doctests": 13, + "predicted_gitnext": 4, + "predicted_coverage": 13, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/vanilla/basic.test.ts", + "tests/vanilla/subscribe.test.tsx", + "tests/immer.test.tsx", + "tests/subscribe.test.tsx", + "tests/ssr.test.tsx", + "tests/basic.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx", + "tests/persistAsync.test.tsx", + "tests/shallow.test.tsx" + ], + "score": { + "gitnext": { + "recall": 0.3076923076923077, + "precision": 1.0, + "predicted": 4, + "top_hits": 4, + "top_n": 4, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 13, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 13, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::middleware::devtools::getTrackedConnectionState", + "file": "src/middleware/devtools.ts", + "truth": 1, + "truth_doctests": 1, + "predicted_gitnext": 1, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/devtools.test.tsx" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::vanilla::shallow::compareIterables", + "file": "src/vanilla/shallow.ts", + "truth": 1, + "truth_doctests": 1, + "predicted_gitnext": 2, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [ + "tests/shallow.test.tsx" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 1, + "top_coverage": [ + "tests/vanilla/shallow.test.tsx", + "tests/shallow.test.tsx" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.5, + "predicted": 2, + "top_hits": 1, + "top_n": 2, + "top_precision": 0.5, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::traditional::createWithEqualityFnImpl", + "file": "src/traditional.ts", + "truth": 2, + "truth_doctests": 2, + "predicted_gitnext": 0, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/basic.test.tsx", + "tests/shallow.test.tsx" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::middleware::devtools::getParamNames", + "file": "src/middleware/devtools.ts", + "truth": 1, + "truth_doctests": 1, + "predicted_gitnext": 1, + "predicted_coverage": 1, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/devtools.test.tsx" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 1, + "top_hits": 1, + "top_n": 1, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::middleware::persist::toSyncThenable", + "file": "src/middleware/persist.ts", + "skipped": "mutant does not compile", + "predicted_gitnext": 0, + "predicted_coverage": 0 + }, + { + "group": "random", + "symbol": "src::vanilla::shallow::hasIterableEntries", + "file": "src/vanilla/shallow.ts", + "skipped": "mutant does not compile", + "predicted_gitnext": 2, + "predicted_coverage": 2 + }, + { + "group": "random", + "symbol": "src::vanilla::shallow::compareEntries", + "file": "src/vanilla/shallow.ts", + "truth": 2, + "truth_doctests": 2, + "predicted_gitnext": 2, + "predicted_coverage": 2, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/vanilla/shallow.test.tsx", + "tests/shallow.test.tsx" + ], + "score": { + "gitnext": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 2, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::middleware::redux::reduxImpl", + "file": "src/middleware/redux.ts", + "truth": 2, + "truth_doctests": 2, + "predicted_gitnext": 0, + "predicted_coverage": 3, + "missed_by_coverage": [], + "covered_not_failing": [ + "tests/types.test.tsx" + ], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 1, + "top_coverage": [ + "tests/middlewareTypes.test.tsx", + "tests/types.test.tsx", + "tests/devtools.test.tsx" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 0.6666666666666666, + "predicted": 3, + "top_hits": 2, + "top_n": 3, + "top_precision": 0.6666666666666666, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.6666666666666666, + "predicted": 3, + "top_hits": 2, + "top_n": 3, + "top_precision": 0.6666666666666666, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::middleware::persist::toThenable", + "file": "src/middleware/persist.ts", + "truth": 6, + "truth_doctests": 6, + "predicted_gitnext": 0, + "predicted_coverage": 6, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx", + "tests/persistAsync.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/types.test.tsx", + "tests/devtools.test.tsx" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + } + } + }, + { + "group": "random", + "symbol": "src::middleware::persist::hydrate", + "file": "src/middleware/persist.ts", + "truth": 6, + "truth_doctests": 6, + "predicted_gitnext": 0, + "predicted_coverage": 6, + "missed_by_coverage": [], + "covered_not_failing": [], + "missed_by_coverage_n": 0, + "covered_not_failing_n": 0, + "top_coverage": [ + "tests/persistPromiseLike.test.ts", + "tests/persistSync.test.tsx", + "tests/persistAsync.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/types.test.tsx", + "tests/devtools.test.tsx" + ], + "score": { + "gitnext": { + "recall": 0.0, + "precision": 0.0, + "predicted": 0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "caught": 0.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "predicted": 6, + "top_hits": 6, + "top_n": 6, + "top_precision": 1.0, + "caught": 1.0 + } + } + } + ], + "summary": { + "pick": { + "gitnext": { + "recall": 0.333, + "precision": 1.0, + "top_precision": 1.0, + "caught": 1.0 + }, + "coverage": { + "recall": 1.0, + "precision": 1.0, + "top_precision": 1.0, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 1.0, + "top_precision": 1.0, + "caught": 1.0 + }, + "functions": 1 + }, + "random": { + "gitnext": { + "recall": 0.529, + "precision": 0.556, + "top_precision": 0.556, + "caught": 0.611 + }, + "coverage": { + "recall": 1.0, + "precision": 0.931, + "top_precision": 0.931, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.904, + "top_precision": 0.904, + "caught": 1.0 + }, + "functions": 18 + }, + "all": { + "gitnext": { + "recall": 0.519, + "precision": 0.579, + "top_precision": 0.579, + "caught": 0.632 + }, + "coverage": { + "recall": 1.0, + "precision": 0.935, + "top_precision": 0.935, + "caught": 1.0 + }, + "union": { + "recall": 1.0, + "precision": 0.909, + "top_precision": 0.909, + "caught": 1.0 + }, + "functions": 19 + } + }, + "cost": { + "run_one_by_one_s": 31.9, + "map_s": 31.9, + "whole_suite_coverage_s": 16.7, + "coverage_json_bytes": 1770510, + "test_files": 14, + "repeat": 3, + "plain_s": 14.1, + "tests": 14, + "map_pairs": 163, + "map_functions": 47, + "map_sqlite_bytes": 12288, + "functions_with_body": 55, + "functions_never_run": 7, + "fail_alone_not_together": [], + "fail_together_not_alone": [], + "slowdown_runs": 2.3 + } +} \ No newline at end of file diff --git a/eval/results/learn-tests-zustand.md b/eval/results/learn-tests-zustand.md new file mode 100644 index 0000000..77ffb8e --- /dev/null +++ b/eval/results/learn-tests-zustand.md @@ -0,0 +1,59 @@ +# learn-tests на zustand (typescript): покрытие по тестам против `tests-for` +zustand 9fed2eb2f3af, gitnext 92dc87d, seed 7. Истина — eval (тесты, падающие при throw в начале функции). pick — функции с ответом в кэше eval, random — случайные. + +| выборка | функций | источник | полнота | точность | из 10 падают | поймано | +|---|---:|---|---:|---:|---:|---:| +| pick (кэш eval) | 1 | gitnext | 33% | 100% | 100% | 100% | +| pick (кэш eval) | 1 | coverage | 100% | 100% | 100% | 100% | +| pick (кэш eval) | 1 | union | 100% | 100% | 100% | 100% | +| случайные | 18 | gitnext | 53% | 56% | 56% | 61% | +| случайные | 18 | coverage | 100% | 93% | 93% | 100% | +| случайные | 18 | union | 100% | 90% | 90% | 100% | +| все | 19 | gitnext | 52% | 58% | 58% | 63% | +| все | 19 | coverage | 100% | 94% | 94% | 100% | +| все | 19 | union | 100% | 91% | 91% | 100% | + +## По функциям + +| выборка | функция | падают | граф: полн / из 10 | покрытие: полн / точн / из 10 | мимо покрытия | +|---|---|---:|---|---|---| +| pick | `src::middleware::persist::createJSONStorage` | 6 | 33% / 100% | 100% / 100% / 100% | | +| random | `src::middleware::devtools::setStateFromDevtools` | 1 | 100% / 100% | 100% / 100% / 100% | | +| random | `src::middleware::persist::persistImpl` | 6 | 0% / 0% | 100% / 100% / 100% | | +| random | `src::middleware::persist::parse` | 3 | 0% / 0% | 100% / 60% / 60% | | +| random | `src::middleware::devtools::maskToRegex` | 1 | 100% / 100% | 100% / 100% / 100% | | +| random | `src::vanilla::subscribe` | 7 | 0% / 0% | 100% / 100% / 100% | | +| random | `src::vanilla::shallow::shallow` | 2 | 100% / 100% | 100% / 100% / 100% | | +| random | `src::react::shallow::useShallow` | 1 | 100% / 50% | 100% / 100% / 100% | | +| random | `src::middleware::devtools::parseDropdownArgs` | 1 | 100% / 100% | 100% / 100% / 100% | | +| random | `src::react::createImpl` | 9 | 22% / 100% | 100% / 100% / 100% | | +| random | `src::vanilla::createStoreImpl` | 13 | 31% / 100% | 100% / 100% / 100% | | +| random | `src::middleware::devtools::getTrackedConnectionState` | 1 | 100% / 100% | 100% / 100% / 100% | | +| random | `src::vanilla::shallow::compareIterables` | 1 | 100% / 50% | 100% / 50% / 50% | | +| random | `src::traditional::createWithEqualityFnImpl` | 2 | 0% / 0% | 100% / 100% / 100% | | +| random | `src::middleware::devtools::getParamNames` | 1 | 100% / 100% | 100% / 100% / 100% | | +| random | `src::middleware::persist::toSyncThenable` | 0 | mutant does not compile | названо 0 | | +| random | `src::vanilla::shallow::hasIterableEntries` | 0 | mutant does not compile | названо 2 | | +| random | `src::vanilla::shallow::compareEntries` | 2 | 100% / 100% | 100% / 100% / 100% | | +| random | `src::middleware::redux::reduxImpl` | 2 | 0% / 0% | 100% / 67% / 67% | | +| random | `src::middleware::persist::toThenable` | 6 | 0% / 0% | 100% / 100% / 100% | | +| random | `src::middleware::persist::hydrate` | 6 | 0% / 0% | 100% / 100% / 100% | | + +## Цена + +- `run_one_by_one_s`: 31.9 +- `map_s`: 31.9 +- `whole_suite_coverage_s`: 16.7 +- `coverage_json_bytes`: 1770510 +- `test_files`: 14 +- `repeat`: 3 +- `plain_s`: 14.1 +- `tests`: 14 +- `map_pairs`: 163 +- `map_functions`: 47 +- `map_sqlite_bytes`: 12288 +- `functions_with_body`: 55 +- `functions_never_run`: 7 +- `fail_alone_not_together`: [] +- `fail_together_not_alone`: [] +- `slowdown_runs`: 2.3 diff --git a/eval/results/run1-before.json b/eval/results/run1-before.json new file mode 100644 index 0000000..046f54f --- /dev/null +++ b/eval/results/run1-before.json @@ -0,0 +1,1060 @@ +[ + { + "repo": "cobra", + "lang": "go", + "commit": "adbc8813901b", + "index_seconds": 0.0, + "symbols": 288, + "files": 19, + "edges": 5106, + "sample": [ + "main::Command::NamePadding", + "main::CheckErr", + "main::Command::CommandPathPadding", + "main::Command::GenPowerShellCompletionWithDesc", + "main::Command::Print", + "main::Command::OutOrStderr", + "main::Command::PrintErrf", + "main::MinimumNArgs" + ], + "baseline_failing_tests": [ + "TestFailGenFishCompletionFile" + ], + "callers": [ + { + "symbol": "main::Command::NamePadding", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::CheckErr", + "truth": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString", + "main::WriteStringAndCheck" + ], + "found": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString", + "main::WriteStringAndCheck" + ], + "maybe": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::CommandPathPadding", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "truth": [ + "main::Command::InitDefaultCompletionCmd" + ], + "found": [ + "main::Command::InitDefaultCompletionCmd" + ], + "maybe": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Print", + "truth": [ + "main::Command::ParseFlags", + "main::Command::Printf", + "main::Command::Println" + ], + "found": [ + "main::Command::ParseFlags", + "main::Command::Printf", + "main::Command::Println", + "main::preExecHook" + ], + "maybe": [], + "recall": 1.0, + "precision": 0.75, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::OutOrStderr", + "truth": [ + "main::Command::Print", + "main::Command::UsageFunc" + ], + "found": [ + "main::Command::Print", + "main::Command::UsageFunc" + ], + "maybe": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::PrintErrf", + "truth": [ + "main::Command::ExecuteC" + ], + "found": [ + "main::Command::ExecuteC" + ], + "maybe": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::MinimumNArgs", + "truth": [ + "main::Command::initCompleteCmd" + ], + "found": [ + "main::Command::initCompleteCmd" + ], + "maybe": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "rename": [ + { + "symbol": "main::Command::NamePadding", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::CheckErr", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::CommandPathPadding", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Print", + "ok": false, + "compiled": false, + "tests_ok": null, + "old_name_left": "", + "detail": "# github.com/spf13/cobra/doc_test [github.com/spf13/cobra/doc.test]\ndoc/man_examples_test.go:48:6: undefined: fmt.PrintGnx\nok \tgithub.com/spf13/cobra\t0.003s [no tests to run]\nFAIL\tgithub.com/spf13/cobra/doc [build failed]\nFAIL\n" + }, + { + "symbol": "main::Command::OutOrStderr", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::PrintErrf", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::MinimumNArgs", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + } + ], + "tests": [ + { + "symbol": "main::Command::NamePadding", + "level": "name", + "truth": 1, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "missed": [ + "TestPluginWithSubCommands" + ] + }, + { + "symbol": "main::CheckErr", + "level": "name", + "truth": 2, + "predicted": 49, + "recall": 0.5, + "precision": 0.02040816326530612, + "missed": [ + "TestNoArgs_WithArgs" + ] + }, + { + "symbol": "main::Command::CommandPathPadding", + "level": "name", + "truth": 1, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "missed": [ + "TestUsageIsNotPrintedTwice" + ] + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "skipped": "no test fails when it throws", + "predicted": 13 + } + ], + "look": [ + { + "symbol": "main::Command::NamePadding", + "look_tokens": 123, + "file_tokens": 15286 + }, + { + "symbol": "main::CheckErr", + "look_tokens": 277, + "file_tokens": 1871 + }, + { + "symbol": "main::Command::CommandPathPadding", + "look_tokens": 142, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "look_tokens": 267, + "file_tokens": 3403 + }, + { + "symbol": "main::Command::Print", + "look_tokens": 188, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::OutOrStderr", + "look_tokens": 225, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::PrintErrf", + "look_tokens": 171, + "file_tokens": 15286 + }, + { + "symbol": "main::MinimumNArgs", + "look_tokens": 226, + "file_tokens": 1120 + } + ], + "seconds": 27, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.969, + "callers_checked": 8, + "rename_ok": 0.875, + "rename_checked": 8, + "tests_recall": 0.167, + "tests_precision": 0.007, + "tests_checked": 3, + "look_vs_file": 0.06 + } + }, + { + "repo": "click", + "lang": "python", + "commit": "8abb77a8432e", + "index_seconds": 0.4, + "symbols": 761, + "files": 32, + "edges": 8909, + "sample": [ + "click::types::Path::coerce_path_result", + "click::core::Option::get_help_extra", + "click::formatting::HelpFormatter::write_heading", + "click::formatting::HelpFormatter::indentation", + "click::globals::push_context", + "click::_textwrap::TextWrapper::extra_indent", + "click::termui::confirm", + "click::core::Command::format_usage" + ], + "baseline_failing_tests": [], + "callers": [], + "rename": [ + { + "symbol": "click::types::Path::coerce_path_result", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Option::get_help_extra", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "src/click/formatting.py:290: \"\"\"A context manager that increases the indentation.\"\"\"", + "detail": "" + }, + { + "symbol": "click::globals::push_context", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::_textwrap::TextWrapper::extra_indent", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::termui::confirm", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Command::format_usage", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + } + ], + "tests": [ + { + "symbol": "click::types::Path::coerce_path_result", + "level": "name", + "truth": 9, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "missed": [ + "test_dual_options_custom_type_sentinel_flag_value", + "test_envvar_container_type", + "test_other_command_invoke_with_defaults", + "test_path_allow_dash", + "test_path_dash_no_byteswarning", + "test_path_option", + "test_path_resolve_symlink", + "test_path_type" + ] + }, + { + "symbol": "click::core::Option::get_help_extra", + "level": "name", + "truth": 89, + "predicted": 11, + "recall": 0.12359550561797752, + "precision": 1.0, + "missed": [ + "test_aliased_command_canonical_name", + "test_argument_help", + "test_argument_help_deprecated_without_help_lists_all", + "test_argument_help_empty_string_lists_all", + "test_argument_help_lists_undocumented_arguments", + "test_argument_help_optional_metavar", + "test_argument_help_options_only_no_arguments_section", + "test_argument_help_undocumented_arguments_only_no_section" + ] + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "level": "name", + "truth": 76, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "missed": [ + "test_aliased_command_canonical_name", + "test_argument_help", + "test_argument_help_deprecated_without_help_lists_all", + "test_argument_help_empty_string_lists_all", + "test_argument_help_lists_undocumented_arguments", + "test_argument_help_optional_metavar", + "test_argument_help_options_only_no_arguments_section", + "test_argument_help_undocumented_arguments_only_no_section" + ] + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "level": "name", + "truth": 10, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "missed": [ + "test_basic_functionality", + "test_basic_group", + "test_chaining_help", + "test_deprecated_empty_help_no_leading_space", + "test_deprecated_help_text_is_not_translated", + "test_deprecated_in_help_messages", + "test_formatting_empty_help_lines", + "test_truncating_docstring" + ] + } + ], + "look": [ + { + "symbol": "click::types::Path::coerce_path_result", + "look_tokens": 216, + "file_tokens": 11834 + }, + { + "symbol": "click::core::Option::get_help_extra", + "look_tokens": 958, + "file_tokens": 39086 + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "look_tokens": 124, + "file_tokens": 2611 + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "look_tokens": 142, + "file_tokens": 2611 + }, + { + "symbol": "click::globals::push_context", + "look_tokens": 109, + "file_tokens": 481 + }, + { + "symbol": "click::_textwrap::TextWrapper::extra_indent", + "look_tokens": 289, + "file_tokens": 1568 + }, + { + "symbol": "click::termui::confirm", + "look_tokens": 550, + "file_tokens": 8971 + }, + { + "symbol": "click::core::Command::format_usage", + "look_tokens": 175, + "file_tokens": 39086 + } + ], + "seconds": 70, + "summary": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 0.031, + "tests_precision": 0.25, + "tests_checked": 4, + "look_vs_file": 0.078 + } + }, + { + "repo": "zustand", + "lang": "typescript", + "commit": "9fed2eb2f3af", + "index_seconds": 0.2, + "symbols": 175, + "files": 36, + "edges": 5251, + "sample": [ + "src::middleware::persist::createJSONStorage" + ], + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "truth": [ + "src::middleware", + "src::middleware::persist::hydrate", + "src::middleware::persist::persistImpl" + ], + "found": [ + "src::middleware::persist::persistImpl" + ], + "maybe": [], + "recall": 0.3333333333333333, + "precision": 1.0, + "recall_with_maybe": 0.3333333333333333 + } + ], + "rename": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + } + ], + "tests": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "skipped": "mutant does not compile" + } + ], + "look": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "look_tokens": 349, + "file_tokens": 3010 + } + ], + "seconds": 29, + "summary": { + "callers_recall": 0.333, + "callers_precision": 1.0, + "callers_checked": 1, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": null, + "tests_precision": null, + "tests_checked": 0, + "look_vs_file": 0.116 + } + }, + { + "repo": "jsoup", + "lang": "java", + "commit": "d90d57521d93", + "index_seconds": 1.7, + "symbols": 2661, + "files": 105, + "edges": 42157, + "sample": [ + "org::jsoup::internal::SoftPool::release", + "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::parser::TokenQueue::matchesWord", + "org::jsoup::internal::StringUtil::isAsciiLetter", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::nodes::DocumentType::publicId", + "org::jsoup::parser::ParseErrorList::tracking" + ], + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "truth": [ + "org::jsoup::internal::StringUtil::normaliseWhitespace" + ], + "found": [ + "org::jsoup::internal::StringUtil::normaliseWhitespace", + "org::jsoup::nodes::Element::appendNormalisedText" + ], + "maybe": [], + "recall": 1.0, + "precision": 0.5, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "truth": [ + "org::jsoup::parser::TokenQueue::matchesCssIdentifier" + ], + "found": [ + "org::jsoup::parser::TokenQueue::matchesCssIdentifier", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "maybe": [], + "recall": 1.0, + "precision": 0.5, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "truth": [ + "org::jsoup::parser::TokenQueue::isIdentStart" + ], + "found": [ + "org::jsoup::parser::CharacterReader::consumeLetterThenDigitSequence", + "org::jsoup::parser::CharacterReader::matchesAsciiAlpha", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::isIdentStart" + ], + "maybe": [], + "recall": 1.0, + "precision": 0.25, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "truth": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeWhitespace" + ], + "found": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeWhitespace", + "org::jsoup::select::QueryParser::consumeAttributeValue" + ], + "maybe": [], + "recall": 1.0, + "precision": 0.6666666666666666, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::ParseErrorList::tracking", + "skipped": "compiler reported no uses" + } + ], + "rename": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "ok": false, + "compiled": false, + "tests_ok": null, + "old_name_left": ".github/dependabot.yml:11: # Et tu, junit? Keep us on 5, as 6 has min JDK17 - https://docs.junit.org/6.0.0-RC3/release-notes/#release-notes-6.0.0-M1\nchange-archive.txt:585: jsoup 1.15.1 release.\nchange-archive.txt:1547: * Improved parse time, now 2.3x faster than previous release, with lower", + "detail": " method release_gnx()\n[ERROR] location: variable response of type io.netty.handler.codec.http.FullHttpResponse\n[ERROR] -> [Help 1]\n[ERROR] \n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\n[ERROR] \n[ERROR] For more information about the errors and possible solutions, please read the following articles:\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException\n" + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::ParseErrorList::tracking", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "change-archive.txt:29: * Improvement: better fidelity of source positions when tracking is enabled. And implicitly created or closed elements\nchange-archive.txt:33: * Improvement: when source tracking is enabled, the source position for attribute names and values is now available.\nchange-archive.t", + "detail": "" + } + ], + "tests": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "skipped": "no test fails when it throws", + "predicted": 19 + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "skipped": "no test fails when it throws", + "predicted": 98 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "skipped": "no test fails when it throws", + "predicted": 0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "skipped": "no test fails when it throws", + "predicted": 2 + } + ], + "look": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "look_tokens": 342, + "file_tokens": 600 + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "look_tokens": 620, + "file_tokens": 4377 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "look_tokens": 245, + "file_tokens": 1068 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "look_tokens": 146, + "file_tokens": 5312 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "look_tokens": 232, + "file_tokens": 4377 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "look_tokens": 178, + "file_tokens": 5312 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "look_tokens": 163, + "file_tokens": 964 + }, + { + "symbol": "org::jsoup::parser::ParseErrorList::tracking", + "look_tokens": 336, + "file_tokens": 311 + } + ], + "seconds": 172, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.479, + "callers_checked": 4, + "rename_ok": 0.875, + "rename_checked": 8, + "tests_recall": null, + "tests_precision": null, + "tests_checked": 0, + "look_vs_file": 0.288 + } + }, + { + "repo": "semver", + "lang": "rust", + "commit": "280ebcb6edac", + "index_seconds": 0.0, + "symbols": 113, + "files": 13, + "edges": 1186, + "sample": [ + "semver::identifier::Identifier::ptr_eq", + "semver::eval::matches_req", + "semver::identifier::Identifier::new_unchecked", + "semver::eval::matches_comparator", + "semver::identifier::Identifier::empty" + ], + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "truth": [ + "semver::identifier::Identifier::eq", + "semver::impls::BuildMetadata::cmp", + "semver::impls::Prerelease::cmp" + ], + "found": [ + "semver::identifier::Identifier::eq", + "semver::impls::BuildMetadata::cmp", + "semver::impls::Prerelease::cmp" + ], + "maybe": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::eval::matches_req", + "truth": [ + "semver::VersionReq::matches" + ], + "found": [ + "semver::VersionReq::matches" + ], + "maybe": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "truth": [ + "semver::identifier::Identifier::empty", + "semver::parse::build_identifier", + "semver::parse::prerelease_identifier" + ], + "found": [ + "semver::parse::build_identifier", + "semver::parse::prerelease_identifier" + ], + "maybe": [], + "recall": 0.6666666666666666, + "precision": 1.0, + "recall_with_maybe": 0.6666666666666666 + }, + { + "symbol": "semver::eval::matches_comparator", + "truth": [ + "semver::Comparator::matches" + ], + "found": [ + "semver::Comparator::matches" + ], + "maybe": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::empty", + "truth": [ + "semver::BuildMetadata::EMPTY", + "semver::Prerelease::EMPTY", + "semver::identifier::Identifier::is_empty", + "semver::identifier::Identifier::new_unchecked", + "semver::impls::Identifier::default" + ], + "found": [ + "semver::identifier::Identifier::is_empty", + "semver::identifier::Identifier::new_unchecked", + "semver::impls::Identifier::default" + ], + "maybe": [], + "recall": 0.6, + "precision": 1.0, + "recall_with_maybe": 0.6 + } + ], + "rename": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::eval::matches_req", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "ok": false, + "compiled": false, + "tests_ok": null, + "old_name_left": "", + "detail": "s an associated function `new_unchecked` with a similar name\n |\n 384 - return unsafe { NonZeroUsize::new_unchecked_gnx(len) };\n 384 + return unsafe { NonZeroUsize::new_unchecked(len) };\n |\n\nFor more information about this error, try `rustc --explain E0599`.\nerror: could not compile `semver` (lib) due to 6 previous errors\nwarning: build failed, waiting for other jobs to finish...\nerror: could not compile `semver` (lib test) due to 6 previous errors\n" + }, + { + "symbol": "semver::eval::matches_comparator", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::identifier::Identifier::empty", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + } + ], + "tests": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "level": "name", + "truth": 20, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "missed": [ + "test_basic", + "test_caret", + "test_cargo3202", + "test_eq", + "test_eq_hash", + "test_exact", + "test_ge", + "test_greater_than" + ] + }, + { + "symbol": "semver::eval::matches_req", + "level": "name", + "truth": 11, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "missed": [ + "test_any", + "test_basic", + "test_caret", + "test_cargo3202", + "test_exact", + "test_greater_than", + "test_less_than", + "test_multiple" + ] + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "level": "name", + "truth": 24, + "predicted": 6, + "recall": 0.041666666666666664, + "precision": 0.16666666666666666, + "missed": [ + "test_align", + "test_basic", + "test_caret", + "test_display", + "test_eq", + "test_exact", + "test_ge", + "test_greater_than" + ] + }, + { + "symbol": "semver::eval::matches_comparator", + "skipped": "no test fails when it throws", + "predicted": 0 + } + ], + "look": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "look_tokens": 107, + "file_tokens": 4536 + }, + { + "symbol": "semver::eval::matches_req", + "look_tokens": 229, + "file_tokens": 1035 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "look_tokens": 1062, + "file_tokens": 4536 + }, + { + "symbol": "semver::eval::matches_comparator", + "look_tokens": 129, + "file_tokens": 1035 + }, + { + "symbol": "semver::identifier::Identifier::empty", + "look_tokens": 222, + "file_tokens": 4536 + } + ], + "seconds": 38, + "summary": { + "callers_recall": 0.853, + "callers_precision": 1.0, + "callers_checked": 5, + "rename_ok": 0.8, + "rename_checked": 5, + "tests_recall": 0.014, + "tests_precision": 0.056, + "tests_checked": 3, + "look_vs_file": 0.131 + } + } +] \ No newline at end of file diff --git a/eval/results/run1-before.md b/eval/results/run1-before.md new file mode 100644 index 0000000..50fd7b5 --- /dev/null +++ b/eval/results/run1-before.md @@ -0,0 +1,7 @@ +| repo | lang | symbols | index s | callers recall | callers precision | rename ok | tests recall | tests precision | look / file | +|---|---|---:|---:|---:|---:|---:|---:|---:|---:| +| cobra | go | 288 | 0.0 | 100% (8) | 97% | 88% (8) | 17% (3) | 1% | 6% | +| click | python | 761 | 0.4 | — | — | 100% (8) | 3% (4) | 25% | 8% | +| zustand | typescript | 175 | 0.2 | 33% (1) | 100% | 100% (1) | — | — | 12% | +| jsoup | java | 2661 | 1.7 | 100% (4) | 48% | 88% (8) | — | — | 29% | +| semver | rust | 113 | 0.0 | 85% (5) | 100% | 80% (5) | 1% (3) | 6% | 13% | diff --git a/eval/results/run2.json b/eval/results/run2.json new file mode 100644 index 0000000..4cb0132 --- /dev/null +++ b/eval/results/run2.json @@ -0,0 +1,1082 @@ +[ + { + "repo": "cobra", + "lang": "go", + "commit": "adbc8813901b", + "index_seconds": 0.2, + "symbols": 288, + "files": 19, + "edges": 5106, + "sample": [ + "main::Command::NamePadding", + "main::CheckErr", + "main::Command::CommandPathPadding", + "main::Command::GenPowerShellCompletionWithDesc", + "main::Command::Print", + "main::Command::OutOrStderr", + "main::Command::PrintErrf", + "main::MinimumNArgs" + ], + "baseline_failing_tests": [ + "TestFailGenFishCompletionFile" + ], + "callers": [ + { + "symbol": "main::Command::NamePadding", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::CheckErr", + "truth": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString", + "main::WriteStringAndCheck" + ], + "found": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString", + "main::WriteStringAndCheck" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::CommandPathPadding", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "truth": [ + "main::Command::InitDefaultCompletionCmd" + ], + "found": [ + "main::Command::InitDefaultCompletionCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Print", + "truth": [ + "main::Command::ParseFlags", + "main::Command::Printf", + "main::Command::Println" + ], + "found": [ + "main::Command::ParseFlags", + "main::Command::Printf", + "main::Command::Println", + "main::preExecHook" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.75, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::OutOrStderr", + "truth": [ + "main::Command::Print", + "main::Command::UsageFunc" + ], + "found": [ + "main::Command::Print", + "main::Command::UsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::PrintErrf", + "truth": [ + "main::Command::ExecuteC" + ], + "found": [ + "main::Command::ExecuteC" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::MinimumNArgs", + "truth": [ + "main::Command::initCompleteCmd" + ], + "found": [ + "main::Command::initCompleteCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "rename": [ + { + "symbol": "main::Command::NamePadding", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::CheckErr", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::CommandPathPadding", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Print", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "doc/man_examples_test.go:48:\tfmt.Print(out.String())", + "detail": "" + }, + { + "symbol": "main::Command::OutOrStderr", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::PrintErrf", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::MinimumNArgs", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + } + ], + "tests": [ + { + "symbol": "main::Command::NamePadding", + "level": "name", + "truth": 1, + "predicted": 125, + "recall": 1.0, + "precision": 0.008, + "missed": [], + "recall_graph_only": 0.0 + }, + { + "symbol": "main::CheckErr", + "level": "name", + "truth": 2, + "predicted": 49, + "recall": 0.5, + "precision": 0.02040816326530612, + "missed": [ + "TestNoArgs_WithArgs" + ], + "recall_graph_only": 0.5 + }, + { + "symbol": "main::Command::CommandPathPadding", + "level": "name", + "truth": 1, + "predicted": 125, + "recall": 1.0, + "precision": 0.008, + "missed": [], + "recall_graph_only": 0.0 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "skipped": "no test fails when it throws", + "predicted": 13 + } + ], + "look": [ + { + "symbol": "main::Command::NamePadding", + "look_tokens": 167, + "file_tokens": 15286 + }, + { + "symbol": "main::CheckErr", + "look_tokens": 277, + "file_tokens": 1871 + }, + { + "symbol": "main::Command::CommandPathPadding", + "look_tokens": 187, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "look_tokens": 267, + "file_tokens": 3403 + }, + { + "symbol": "main::Command::Print", + "look_tokens": 206, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::OutOrStderr", + "look_tokens": 225, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::PrintErrf", + "look_tokens": 171, + "file_tokens": 15286 + }, + { + "symbol": "main::MinimumNArgs", + "look_tokens": 226, + "file_tokens": 1120 + } + ], + "seconds": 13, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.969, + "callers_checked": 8, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 0.833, + "tests_precision": 0.012, + "tests_checked": 3, + "look_vs_file": 0.061 + } + }, + { + "repo": "click", + "lang": "python", + "commit": "8abb77a8432e", + "index_seconds": 0.3, + "symbols": 761, + "files": 32, + "edges": 8909, + "sample": [ + "click::types::Path::coerce_path_result", + "click::core::Option::get_help_extra", + "click::formatting::HelpFormatter::write_heading", + "click::formatting::HelpFormatter::indentation", + "click::globals::push_context", + "click::_textwrap::TextWrapper::extra_indent", + "click::termui::confirm", + "click::core::Command::format_usage" + ], + "baseline_failing_tests": [], + "callers": [], + "rename": [ + { + "symbol": "click::types::Path::coerce_path_result", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Option::get_help_extra", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "tests/test_custom_classes.py:53: def write_heading(self, heading):\ntests/test_custom_classes.py:55: return super().write_heading(heading)", + "detail": "" + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "src/click/formatting.py:290: \"\"\"A context manager that increases the indentation.\"\"\"", + "detail": "" + }, + { + "symbol": "click::globals::push_context", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::_textwrap::TextWrapper::extra_indent", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::termui::confirm", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "tests/test_termui.py:1413: pytest.param(click.confirm, \"y\", \"Hello World!\", \" [y/N]: y\\n\", id=\"confirm_gnx\"),\ntests/test_utils/test_confirm.py:7: if click.confirm(\"Foo\"):\ntests/test_utils/test_confirm.py:26: if click.confirm(\"Foo\", default=True):\ntests/test_utils/test_echo.py:13", + "detail": "" + }, + { + "symbol": "click::core::Command::format_usage", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + } + ], + "tests": [ + { + "symbol": "click::types::Path::coerce_path_result", + "level": "name", + "truth": 9, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "missed": [ + "test_dual_options_custom_type_sentinel_flag_value", + "test_envvar_container_type", + "test_other_command_invoke_with_defaults", + "test_path_allow_dash", + "test_path_dash_no_byteswarning", + "test_path_option", + "test_path_resolve_symlink", + "test_path_type" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "click::core::Option::get_help_extra", + "level": "name", + "truth": 89, + "predicted": 11, + "recall": 0.12359550561797752, + "precision": 1.0, + "missed": [ + "test_aliased_command_canonical_name", + "test_argument_help", + "test_argument_help_deprecated_without_help_lists_all", + "test_argument_help_empty_string_lists_all", + "test_argument_help_lists_undocumented_arguments", + "test_argument_help_optional_metavar", + "test_argument_help_options_only_no_arguments_section", + "test_argument_help_undocumented_arguments_only_no_section" + ], + "recall_graph_only": 0.12359550561797752 + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "level": "name", + "truth": 76, + "predicted": 23, + "recall": 0.13157894736842105, + "precision": 0.43478260869565216, + "missed": [ + "test_aliased_command_canonical_name", + "test_argument_help", + "test_argument_help_deprecated_without_help_lists_all", + "test_argument_help_empty_string_lists_all", + "test_argument_help_lists_undocumented_arguments", + "test_argument_help_optional_metavar", + "test_argument_help_options_only_no_arguments_section", + "test_argument_help_undocumented_arguments_only_no_section" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "level": "name", + "truth": 10, + "predicted": 23, + "recall": 0.5, + "precision": 0.21739130434782608, + "missed": [ + "test_basic_group", + "test_chaining_help", + "test_deprecated_empty_help_no_leading_space", + "test_deprecated_help_text_is_not_translated", + "test_deprecated_in_help_messages" + ], + "recall_graph_only": 0.0 + } + ], + "look": [ + { + "symbol": "click::types::Path::coerce_path_result", + "look_tokens": 216, + "file_tokens": 11834 + }, + { + "symbol": "click::core::Option::get_help_extra", + "look_tokens": 958, + "file_tokens": 39086 + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "look_tokens": 206, + "file_tokens": 2611 + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "look_tokens": 224, + "file_tokens": 2611 + }, + { + "symbol": "click::globals::push_context", + "look_tokens": 109, + "file_tokens": 481 + }, + { + "symbol": "click::_textwrap::TextWrapper::extra_indent", + "look_tokens": 289, + "file_tokens": 1568 + }, + { + "symbol": "click::termui::confirm", + "look_tokens": 643, + "file_tokens": 8971 + }, + { + "symbol": "click::core::Command::format_usage", + "look_tokens": 175, + "file_tokens": 39086 + } + ], + "seconds": 63, + "summary": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 0.189, + "tests_precision": 0.413, + "tests_checked": 4, + "look_vs_file": 0.087 + } + }, + { + "repo": "zustand", + "lang": "typescript", + "commit": "9fed2eb2f3af", + "index_seconds": 0.1, + "symbols": 175, + "files": 36, + "edges": 5251, + "sample": [ + "src::middleware::persist::createJSONStorage" + ], + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "truth": [ + "src::middleware::persist::hydrate", + "src::middleware::persist::persistImpl" + ], + "found": [ + "src::middleware::persist::persistImpl" + ], + "maybe": [], + "import_files": [ + "src/middleware.ts" + ], + "recall": 0.5, + "precision": 1.0, + "recall_with_maybe": 0.5 + } + ], + "rename": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "ok": false, + "compiled": false, + "tests_ok": null, + "old_name_left": "src/middleware.ts:11: createJSONStorage,\ntests/persistAsync.test.tsx:7:import { createJSONStorage, persist } from 'zustand/middleware'\ntests/persistPromiseLike.test.ts:3:import { createJSONStorage, persist } from 'zustand/middleware'\ntests/persistSync.test.tsx:5:import { createJSONStorage, persist ", + "detail": "04: Cannot find name 'createJSONStorageGnx'.\ntests/persistSync.test.tsx(531,18): error TS2304: Cannot find name 'createJSONStorageGnx'.\ntests/persistSync.test.tsx(559,18): error TS2304: Cannot find name 'createJSONStorageGnx'.\ntests/persistSync.test.tsx(650,20): error TS2304: Cannot find name 'createJSONStorageGnx'.\ntests/persistSync.test.tsx(678,20): error TS2304: Cannot find name 'createJSONStorageGnx'.\ntests/persistSync.test.tsx(700,20): error TS2304: Cannot find name 'createJSONStorageGnx'.\n" + } + ], + "tests": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "skipped": "mutant does not compile" + } + ], + "look": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "look_tokens": 349, + "file_tokens": 3010 + } + ], + "seconds": 24, + "summary": { + "callers_recall": 0.5, + "callers_precision": 1.0, + "callers_checked": 1, + "rename_ok": 0.0, + "rename_checked": 1, + "tests_recall": null, + "tests_precision": null, + "tests_checked": 0, + "look_vs_file": 0.116 + } + }, + { + "repo": "jsoup", + "lang": "java", + "commit": "d90d57521d93", + "index_seconds": 2.3, + "symbols": 2661, + "files": 105, + "edges": 42157, + "sample": [ + "org::jsoup::internal::SoftPool::release", + "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::select::Evaluator::asPredicate", + "org::jsoup::parser::TokenQueue::matchesWord", + "org::jsoup::internal::StringUtil::isAsciiLetter", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::nodes::DocumentType::publicId" + ], + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "truth": [ + "org::jsoup::internal::StringUtil::normaliseWhitespace" + ], + "found": [ + "org::jsoup::internal::StringUtil::normaliseWhitespace", + "org::jsoup::nodes::Element::appendNormalisedText" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.5, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "truth": [ + "org::jsoup::parser::TokenQueue::matchesCssIdentifier" + ], + "found": [ + "org::jsoup::parser::TokenQueue::matchesCssIdentifier", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.5, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "truth": [ + "org::jsoup::parser::TokenQueue::isIdentStart" + ], + "found": [ + "org::jsoup::parser::CharacterReader::consumeLetterThenDigitSequence", + "org::jsoup::parser::CharacterReader::matchesAsciiAlpha", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::isIdentStart" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.25, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "truth": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeWhitespace" + ], + "found": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeWhitespace", + "org::jsoup::select::QueryParser::consumeAttributeValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.6666666666666666, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "skipped": "compiler reported no uses" + } + ], + "rename": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "ok": false, + "compiled": false, + "tests_ok": null, + "old_name_left": ".github/dependabot.yml:11: # Et tu, junit? Keep us on 5, as 6 has min JDK17 - https://docs.junit.org/6.0.0-RC3/release-notes/#release-notes-6.0.0-M1\nchange-archive.txt:585: jsoup 1.15.1 release.\nchange-archive.txt:1547: * Improved parse time, now 2.3x faster than previous release, with lower", + "detail": "on: variable NodeIterPool of type org.jsoup.internal.SoftPool>\n[ERROR] -> [Help 1]\n[ERROR] \n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\n[ERROR] \n[ERROR] For more information about the errors and possible solutions, please read the following articles:\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException\n" + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "ok": false, + "compiled": false, + "tests_ok": null, + "old_name_left": "src/test/java/org/jsoup/select/CompiledQueryTest.java:177: @Override public Predicate asPredicate(Element root) { return element -> false; }", + "detail": "/org/jsoup/select/CompiledQueryTest.java:[177,17] method does not override or implement a method from a supertype\n[ERROR] -> [Help 1]\n[ERROR] \n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\n[ERROR] \n[ERROR] For more information about the errors and possible solutions, please read the following articles:\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException\n" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "ok": false, + "compiled": false, + "tests_ok": null, + "old_name_left": "src/main/java/org/jsoup/parser/CharacterReader.java:552: return consumeMatching(StringUtil::isAsciiLetter);\nsrc/test/java/org/jsoup/internal/StringUtilTest.java:207: @Test void isAsciiLetter() {", + "detail": "symbol\n[ERROR] symbol: method isAsciiLetter(char)\n[ERROR] location: class org.jsoup.internal.StringUtil\n[ERROR] -> [Help 1]\n[ERROR] \n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\n[ERROR] \n[ERROR] For more information about the errors and possible solutions, please read the following articles:\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException\n" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "src/main/java/org/jsoup/nodes/DocumentType.java:29: public DocumentType(String name, String publicId, String systemId) {\nsrc/main/java/org/jsoup/nodes/DocumentType.java:31: Validate.notNull(publicId);\nsrc/main/java/org/jsoup/nodes/DocumentType.java:35: .add(PublicId, publicId)\ns", + "detail": "" + } + ], + "tests": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "skipped": "no test fails when it throws", + "predicted": 19 + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "skipped": "no test fails when it throws", + "predicted": 124 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "skipped": "no test fails when it throws", + "predicted": 0 + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "skipped": "no test fails when it throws", + "predicted": 26 + } + ], + "look": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "look_tokens": 363, + "file_tokens": 600 + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "look_tokens": 606, + "file_tokens": 4377 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "look_tokens": 245, + "file_tokens": 1068 + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "look_tokens": 396, + "file_tokens": 9555 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "look_tokens": 146, + "file_tokens": 5312 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "look_tokens": 297, + "file_tokens": 4377 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "look_tokens": 196, + "file_tokens": 5312 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "look_tokens": 186, + "file_tokens": 964 + } + ], + "seconds": 140, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.479, + "callers_checked": 4, + "rename_ok": 0.625, + "rename_checked": 8, + "tests_recall": null, + "tests_precision": null, + "tests_checked": 0, + "look_vs_file": 0.167 + } + }, + { + "repo": "semver", + "lang": "rust", + "commit": "280ebcb6edac", + "index_seconds": 0.0, + "symbols": 113, + "files": 13, + "edges": 1186, + "sample": [ + "semver::identifier::Identifier::ptr_eq", + "semver::eval::matches_req", + "semver::identifier::Identifier::new_unchecked", + "semver::eval::matches_comparator", + "semver::identifier::Identifier::empty" + ], + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "truth": [ + "semver::identifier::Identifier::eq", + "semver::impls::BuildMetadata::cmp", + "semver::impls::Prerelease::cmp" + ], + "found": [ + "semver::identifier::Identifier::eq", + "semver::impls::BuildMetadata::cmp", + "semver::impls::Prerelease::cmp" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::eval::matches_req", + "truth": [ + "semver::VersionReq::matches" + ], + "found": [ + "semver::VersionReq::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "truth": [ + "semver::identifier::Identifier::empty", + "semver::parse::build_identifier", + "semver::parse::prerelease_identifier" + ], + "found": [ + "semver::parse::build_identifier", + "semver::parse::prerelease_identifier" + ], + "maybe": [], + "import_files": [], + "recall": 0.6666666666666666, + "precision": 1.0, + "recall_with_maybe": 0.6666666666666666 + }, + { + "symbol": "semver::eval::matches_comparator", + "truth": [ + "semver::Comparator::matches" + ], + "found": [ + "semver::Comparator::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::empty", + "truth": [ + "semver::BuildMetadata::EMPTY", + "semver::Prerelease::EMPTY", + "semver::identifier::Identifier::is_empty", + "semver::identifier::Identifier::new_unchecked", + "semver::impls::Identifier::default" + ], + "found": [ + "semver::identifier::Identifier::is_empty", + "semver::identifier::Identifier::new_unchecked", + "semver::impls::Identifier::default" + ], + "maybe": [], + "import_files": [], + "recall": 0.6, + "precision": 1.0, + "recall_with_maybe": 0.6 + } + ], + "rename": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::eval::matches_req", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "src/identifier.rs:94: const HEAD: NonNull = unsafe { NonNull::new_unchecked(!0 as *mut u8) };\nsrc/identifier.rs:120: let size = bytes_for_varint(unsafe { NonZeroUsize::new_unchecked(len) }) + len;\nsrc/identifier.rs:292: unsafe { NonNull::new_unchecked(modified) }\nsrc/ide", + "detail": "" + }, + { + "symbol": "semver::eval::matches_comparator", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::identifier::Identifier::empty", + "ok": false, + "compiled": false, + "tests_ok": null, + "old_name_left": "src/identifier.rs:169: let empty = Self::empty_gnx();\nsrc/identifier.rs:170: let is_empty = self.head == empty.head && self.tail == empty.tail;\nsrc/identifier.rs:174: mem::forget(empty);\nsrc/lib.rs:537: identifier: Identifier::empty(),\nsrc/lib.rs:555: identifier: I", + "detail": " &str) -> Self {\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nhelp: there is a method `is_empty` with a similar name\n |\n555 | identifier: Identifier::is_empty(),\n | +++\n\nFor more information about this error, try `rustc --explain E0599`.\nerror: could not compile `semver` (lib) due to 2 previous errors\nwarning: build failed, waiting for other jobs to finish...\nerror: could not compile `semver` (lib test) due to 2 previous errors\n" + } + ], + "tests": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "level": "name", + "truth": 20, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "missed": [ + "test_basic", + "test_caret", + "test_cargo3202", + "test_eq", + "test_eq_hash", + "test_exact", + "test_ge", + "test_greater_than" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "semver::eval::matches_req", + "level": "name", + "truth": 11, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "missed": [ + "test_any", + "test_basic", + "test_caret", + "test_cargo3202", + "test_exact", + "test_greater_than", + "test_less_than", + "test_multiple" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "level": "name", + "truth": 24, + "predicted": 6, + "recall": 0.041666666666666664, + "precision": 0.16666666666666666, + "missed": [ + "test_align", + "test_basic", + "test_caret", + "test_display", + "test_eq", + "test_exact", + "test_ge", + "test_greater_than" + ], + "recall_graph_only": 0.041666666666666664 + }, + { + "symbol": "semver::eval::matches_comparator", + "skipped": "no test fails when it throws", + "predicted": 0 + } + ], + "look": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "look_tokens": 107, + "file_tokens": 4536 + }, + { + "symbol": "semver::eval::matches_req", + "look_tokens": 229, + "file_tokens": 1035 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "look_tokens": 1062, + "file_tokens": 4536 + }, + { + "symbol": "semver::eval::matches_comparator", + "look_tokens": 129, + "file_tokens": 1035 + }, + { + "symbol": "semver::identifier::Identifier::empty", + "look_tokens": 222, + "file_tokens": 4536 + } + ], + "seconds": 10, + "summary": { + "callers_recall": 0.853, + "callers_precision": 1.0, + "callers_checked": 5, + "rename_ok": 0.8, + "rename_checked": 5, + "tests_recall": 0.014, + "tests_precision": 0.056, + "tests_checked": 3, + "look_vs_file": 0.131 + } + } +] \ No newline at end of file diff --git a/eval/results/run4.json b/eval/results/run4.json new file mode 100644 index 0000000..93fadc9 --- /dev/null +++ b/eval/results/run4.json @@ -0,0 +1,1068 @@ +[ + { + "repo": "cobra", + "lang": "go", + "commit": "adbc8813901b", + "index_seconds": 0.2, + "symbols": 288, + "files": 19, + "edges": 5106, + "sample": [ + "main::Command::NamePadding", + "main::CheckErr", + "main::Command::CommandPathPadding", + "main::Command::GenPowerShellCompletionWithDesc", + "main::Command::Print", + "main::Command::OutOrStderr", + "main::Command::PrintErrf", + "main::MinimumNArgs" + ], + "baseline_failing_tests": [ + "TestFailGenFishCompletionFile" + ], + "callers": [ + { + "symbol": "main::Command::NamePadding", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::CheckErr", + "truth": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString", + "main::WriteStringAndCheck" + ], + "found": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString", + "main::WriteStringAndCheck" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::CommandPathPadding", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "truth": [ + "main::Command::InitDefaultCompletionCmd" + ], + "found": [ + "main::Command::InitDefaultCompletionCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Print", + "truth": [ + "main::Command::ParseFlags", + "main::Command::Printf", + "main::Command::Println" + ], + "found": [ + "main::Command::ParseFlags", + "main::Command::Printf", + "main::Command::Println", + "main::preExecHook" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.75, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::OutOrStderr", + "truth": [ + "main::Command::Print", + "main::Command::UsageFunc" + ], + "found": [ + "main::Command::Print", + "main::Command::UsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::PrintErrf", + "truth": [ + "main::Command::ExecuteC" + ], + "found": [ + "main::Command::ExecuteC" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::MinimumNArgs", + "truth": [ + "main::Command::initCompleteCmd" + ], + "found": [ + "main::Command::initCompleteCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "rename": [ + { + "symbol": "main::Command::NamePadding", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::CheckErr", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::CommandPathPadding", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Print", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "doc/man_examples_test.go:48:\tfmt.Print(out.String())", + "detail": "" + }, + { + "symbol": "main::Command::OutOrStderr", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::PrintErrf", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::MinimumNArgs", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + } + ], + "tests": [ + { + "symbol": "main::Command::NamePadding", + "level": "name", + "truth": 1, + "predicted": 125, + "recall": 1.0, + "precision": 0.008, + "missed": [], + "recall_graph_only": 0.0 + }, + { + "symbol": "main::CheckErr", + "level": "name", + "truth": 2, + "predicted": 244, + "recall": 1.0, + "precision": 0.00819672131147541, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "main::Command::CommandPathPadding", + "level": "name", + "truth": 1, + "predicted": 125, + "recall": 1.0, + "precision": 0.008, + "missed": [], + "recall_graph_only": 0.0 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "skipped": "no test fails when it throws", + "predicted": 208 + } + ], + "look": [ + { + "symbol": "main::Command::NamePadding", + "look_tokens": 167, + "file_tokens": 15286 + }, + { + "symbol": "main::CheckErr", + "look_tokens": 277, + "file_tokens": 1871 + }, + { + "symbol": "main::Command::CommandPathPadding", + "look_tokens": 187, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "look_tokens": 207, + "file_tokens": 3403 + }, + { + "symbol": "main::Command::Print", + "look_tokens": 206, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::OutOrStderr", + "look_tokens": 146, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::PrintErrf", + "look_tokens": 171, + "file_tokens": 15286 + }, + { + "symbol": "main::MinimumNArgs", + "look_tokens": 226, + "file_tokens": 1120 + } + ], + "seconds": 12, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.969, + "callers_checked": 8, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 1.0, + "tests_precision": 0.008, + "tests_checked": 3, + "look_vs_file": 0.059 + } + }, + { + "repo": "click", + "lang": "python", + "commit": "8abb77a8432e", + "index_seconds": 0.3, + "symbols": 761, + "files": 32, + "edges": 8909, + "sample": [ + "click::types::Path::coerce_path_result", + "click::core::Option::get_help_extra", + "click::formatting::HelpFormatter::write_heading", + "click::formatting::HelpFormatter::indentation", + "click::globals::push_context", + "click::_textwrap::TextWrapper::extra_indent", + "click::termui::confirm", + "click::core::Command::format_usage" + ], + "baseline_failing_tests": [], + "callers": [], + "rename": [ + { + "symbol": "click::types::Path::coerce_path_result", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Option::get_help_extra", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "tests/test_custom_classes.py:53: def write_heading(self, heading):\ntests/test_custom_classes.py:55: return super().write_heading(heading)", + "detail": "" + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "src/click/formatting.py:290: \"\"\"A context manager that increases the indentation.\"\"\"", + "detail": "" + }, + { + "symbol": "click::globals::push_context", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::_textwrap::TextWrapper::extra_indent", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::termui::confirm", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "tests/test_termui.py:1413: pytest.param(click.confirm, \"y\", \"Hello World!\", \" [y/N]: y\\n\", id=\"confirm_gnx\"),\ntests/test_utils/test_confirm.py:7: if click.confirm(\"Foo\"):\ntests/test_utils/test_confirm.py:26: if click.confirm(\"Foo\", default=True):\ntests/test_utils/test_echo.py:13", + "detail": "" + }, + { + "symbol": "click::core::Command::format_usage", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + } + ], + "tests": [ + { + "symbol": "click::types::Path::coerce_path_result", + "level": "name", + "truth": 9, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "missed": [ + "test_dual_options_custom_type_sentinel_flag_value", + "test_envvar_container_type", + "test_other_command_invoke_with_defaults", + "test_path_allow_dash", + "test_path_dash_no_byteswarning", + "test_path_option", + "test_path_resolve_symlink", + "test_path_type" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "click::core::Option::get_help_extra", + "level": "name", + "truth": 89, + "predicted": 11, + "recall": 0.12359550561797752, + "precision": 1.0, + "missed": [ + "test_aliased_command_canonical_name", + "test_argument_help", + "test_argument_help_deprecated_without_help_lists_all", + "test_argument_help_empty_string_lists_all", + "test_argument_help_lists_undocumented_arguments", + "test_argument_help_optional_metavar", + "test_argument_help_options_only_no_arguments_section", + "test_argument_help_undocumented_arguments_only_no_section" + ], + "recall_graph_only": 0.12359550561797752 + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "level": "name", + "truth": 76, + "predicted": 23, + "recall": 0.13157894736842105, + "precision": 0.43478260869565216, + "missed": [ + "test_aliased_command_canonical_name", + "test_argument_help", + "test_argument_help_deprecated_without_help_lists_all", + "test_argument_help_empty_string_lists_all", + "test_argument_help_lists_undocumented_arguments", + "test_argument_help_optional_metavar", + "test_argument_help_options_only_no_arguments_section", + "test_argument_help_undocumented_arguments_only_no_section" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "level": "name", + "truth": 10, + "predicted": 23, + "recall": 0.5, + "precision": 0.21739130434782608, + "missed": [ + "test_basic_group", + "test_chaining_help", + "test_deprecated_empty_help_no_leading_space", + "test_deprecated_help_text_is_not_translated", + "test_deprecated_in_help_messages" + ], + "recall_graph_only": 0.0 + } + ], + "look": [ + { + "symbol": "click::types::Path::coerce_path_result", + "look_tokens": 216, + "file_tokens": 11834 + }, + { + "symbol": "click::core::Option::get_help_extra", + "look_tokens": 958, + "file_tokens": 39086 + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "look_tokens": 206, + "file_tokens": 2611 + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "look_tokens": 224, + "file_tokens": 2611 + }, + { + "symbol": "click::globals::push_context", + "look_tokens": 109, + "file_tokens": 481 + }, + { + "symbol": "click::_textwrap::TextWrapper::extra_indent", + "look_tokens": 289, + "file_tokens": 1568 + }, + { + "symbol": "click::termui::confirm", + "look_tokens": 591, + "file_tokens": 8971 + }, + { + "symbol": "click::core::Command::format_usage", + "look_tokens": 175, + "file_tokens": 39086 + } + ], + "seconds": 63, + "summary": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 0.189, + "tests_precision": 0.413, + "tests_checked": 4, + "look_vs_file": 0.086 + } + }, + { + "repo": "zustand", + "lang": "typescript", + "commit": "9fed2eb2f3af", + "index_seconds": 0.1, + "symbols": 175, + "files": 36, + "edges": 5251, + "sample": [ + "src::middleware::persist::createJSONStorage" + ], + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "truth": [ + "src::middleware::persist::hydrate", + "src::middleware::persist::persistImpl" + ], + "found": [ + "src::middleware::persist::persistImpl" + ], + "maybe": [], + "import_files": [ + "src/middleware.ts" + ], + "recall": 0.5, + "precision": 1.0, + "recall_with_maybe": 0.5 + } + ], + "rename": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + } + ], + "tests": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "skipped": "mutant does not compile" + } + ], + "look": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "look_tokens": 349, + "file_tokens": 3010 + } + ], + "seconds": 24, + "summary": { + "callers_recall": 0.5, + "callers_precision": 1.0, + "callers_checked": 1, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": null, + "tests_precision": null, + "tests_checked": 0, + "look_vs_file": 0.116 + } + }, + { + "repo": "jsoup", + "lang": "java", + "commit": "d90d57521d93", + "index_seconds": 2.4, + "symbols": 2663, + "files": 105, + "edges": 42271, + "sample": [ + "org::jsoup::internal::SoftPool::release", + "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::select::Evaluator::asPredicate", + "org::jsoup::parser::TokenQueue::matchesWord", + "org::jsoup::internal::StringUtil::isAsciiLetter", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::nodes::DocumentType::publicId" + ], + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "truth": [ + "org::jsoup::internal::StringUtil::normaliseWhitespace" + ], + "found": [ + "org::jsoup::internal::StringUtil::normaliseWhitespace", + "org::jsoup::nodes::Element::appendNormalisedText" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.5, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "truth": [ + "org::jsoup::parser::TokenQueue::matchesCssIdentifier" + ], + "found": [ + "org::jsoup::parser::TokenQueue::matchesCssIdentifier", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.5, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "truth": [ + "org::jsoup::parser::TokenQueue::isIdentStart" + ], + "found": [ + "org::jsoup::parser::CharacterReader::consumeLetterSequence", + "org::jsoup::parser::CharacterReader::consumeLetterThenDigitSequence", + "org::jsoup::parser::CharacterReader::matchesAsciiAlpha", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::isIdentStart" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.2, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "truth": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeWhitespace" + ], + "found": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeWhitespace", + "org::jsoup::select::QueryParser::consumeAttributeValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.6666666666666666, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "skipped": "compiler reported no uses" + } + ], + "rename": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": ".github/dependabot.yml:11: # Et tu, junit? Keep us on 5, as 6 has min JDK17 - https://docs.junit.org/6.0.0-RC3/release-notes/#release-notes-6.0.0-M1\nchange-archive.txt:585: jsoup 1.15.1 release.\nchange-archive.txt:1547: * Improved parse time, now 2.3x faster than previous release, with lower", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "src/test/java/org/jsoup/internal/StringUtilTest.java:207: @Test void isAsciiLetter() {", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "src/main/java/org/jsoup/nodes/DocumentType.java:29: public DocumentType(String name, String publicId, String systemId) {\nsrc/main/java/org/jsoup/nodes/DocumentType.java:31: Validate.notNull(publicId);\nsrc/main/java/org/jsoup/nodes/DocumentType.java:35: .add(PublicId, publicId)\ns", + "detail": "" + } + ], + "tests": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "skipped": "no test fails when it throws", + "predicted": 515 + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "skipped": "no test fails when it throws", + "predicted": 124 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "skipped": "no test fails when it throws", + "predicted": 0 + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "skipped": "no test fails when it throws", + "predicted": 26 + } + ], + "look": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "look_tokens": 442, + "file_tokens": 600 + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "look_tokens": 606, + "file_tokens": 4377 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "look_tokens": 245, + "file_tokens": 1068 + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "look_tokens": 401, + "file_tokens": 9555 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "look_tokens": 154, + "file_tokens": 5312 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "look_tokens": 367, + "file_tokens": 4377 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "look_tokens": 390, + "file_tokens": 5312 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "look_tokens": 163, + "file_tokens": 964 + } + ], + "seconds": 150, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.467, + "callers_checked": 4, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": null, + "tests_precision": null, + "tests_checked": 0, + "look_vs_file": 0.188 + } + }, + { + "repo": "semver", + "lang": "rust", + "commit": "280ebcb6edac", + "index_seconds": 0.0, + "symbols": 113, + "files": 13, + "edges": 1186, + "sample": [ + "semver::identifier::Identifier::ptr_eq", + "semver::eval::matches_req", + "semver::identifier::Identifier::new_unchecked", + "semver::eval::matches_comparator", + "semver::identifier::Identifier::empty" + ], + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "truth": [ + "semver::identifier::Identifier::eq", + "semver::impls::BuildMetadata::cmp", + "semver::impls::Prerelease::cmp" + ], + "found": [ + "semver::identifier::Identifier::eq", + "semver::impls::BuildMetadata::cmp", + "semver::impls::Prerelease::cmp" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::eval::matches_req", + "truth": [ + "semver::VersionReq::matches" + ], + "found": [ + "semver::VersionReq::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "truth": [ + "semver::identifier::Identifier::empty", + "semver::parse::build_identifier", + "semver::parse::prerelease_identifier" + ], + "found": [ + "semver::parse::build_identifier", + "semver::parse::prerelease_identifier" + ], + "maybe": [], + "import_files": [], + "recall": 0.6666666666666666, + "precision": 1.0, + "recall_with_maybe": 0.6666666666666666 + }, + { + "symbol": "semver::eval::matches_comparator", + "truth": [ + "semver::Comparator::matches" + ], + "found": [ + "semver::Comparator::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::empty", + "truth": [ + "semver::BuildMetadata::EMPTY", + "semver::Prerelease::EMPTY", + "semver::identifier::Identifier::is_empty", + "semver::identifier::Identifier::new_unchecked", + "semver::impls::Identifier::default" + ], + "found": [ + "semver::identifier::Identifier::is_empty", + "semver::identifier::Identifier::new_unchecked", + "semver::impls::Identifier::default" + ], + "maybe": [], + "import_files": [], + "recall": 0.6, + "precision": 1.0, + "recall_with_maybe": 0.6 + } + ], + "rename": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::eval::matches_req", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "src/identifier.rs:94: const HEAD: NonNull = unsafe { NonNull::new_unchecked(!0 as *mut u8) };\nsrc/identifier.rs:120: let size = bytes_for_varint(unsafe { NonZeroUsize::new_unchecked(len) }) + len;\nsrc/identifier.rs:292: unsafe { NonNull::new_unchecked(modified) }\nsrc/ide", + "detail": "" + }, + { + "symbol": "semver::eval::matches_comparator", + "ok": true, + "compiled": true, + "tests_ok": null, + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::identifier::Identifier::empty", + "ok": false, + "compiled": false, + "tests_ok": null, + "old_name_left": "src/identifier.rs:169: let empty = Self::empty_gnx();\nsrc/identifier.rs:170: let is_empty = self.head == empty.head && self.tail == empty.tail;\nsrc/identifier.rs:174: mem::forget(empty);\nsrc/lib.rs:537: identifier: Identifier::empty(),\nsrc/lib.rs:555: identifier: I", + "detail": " &str) -> Self {\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nhelp: there is a method `is_empty` with a similar name\n |\n555 | identifier: Identifier::is_empty(),\n | +++\n\nFor more information about this error, try `rustc --explain E0599`.\nerror: could not compile `semver` (lib test) due to 2 previous errors\nwarning: build failed, waiting for other jobs to finish...\nerror: could not compile `semver` (lib) due to 2 previous errors\n" + } + ], + "tests": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "level": "name", + "truth": 20, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "missed": [ + "test_basic", + "test_caret", + "test_cargo3202", + "test_eq", + "test_eq_hash", + "test_exact", + "test_ge", + "test_greater_than" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "semver::eval::matches_req", + "level": "name", + "truth": 11, + "predicted": 13, + "recall": 1.0, + "precision": 0.8461538461538461, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "level": "name", + "truth": 24, + "predicted": 29, + "recall": 0.8333333333333334, + "precision": 0.6896551724137931, + "missed": [ + "test_align", + "test_comparator_parse", + "test_leading_digit_in_pre_and_build", + "test_wildcard_and_another" + ], + "recall_graph_only": 0.8333333333333334 + }, + { + "symbol": "semver::eval::matches_comparator", + "skipped": "no test fails when it throws", + "predicted": 0 + } + ], + "look": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "look_tokens": 107, + "file_tokens": 4536 + }, + { + "symbol": "semver::eval::matches_req", + "look_tokens": 305, + "file_tokens": 1035 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "look_tokens": 1070, + "file_tokens": 4536 + }, + { + "symbol": "semver::eval::matches_comparator", + "look_tokens": 125, + "file_tokens": 1035 + }, + { + "symbol": "semver::identifier::Identifier::empty", + "look_tokens": 206, + "file_tokens": 4536 + } + ], + "seconds": 10, + "summary": { + "callers_recall": 0.853, + "callers_precision": 1.0, + "callers_checked": 5, + "rename_ok": 0.8, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.512, + "tests_checked": 3, + "look_vs_file": 0.144 + } + } +] \ No newline at end of file diff --git a/eval/results/run5-before.json b/eval/results/run5-before.json new file mode 100644 index 0000000..5a94714 --- /dev/null +++ b/eval/results/run5-before.json @@ -0,0 +1,1611 @@ +[ + { + "repo": "cobra", + "lang": "go", + "commit": "adbc8813901b", + "index_seconds": 0.1, + "symbols": 288, + "files": 19, + "edges": 5106, + "sample": [ + "main::Command::NamePadding", + "main::CheckErr", + "main::Command::CommandPathPadding", + "main::Command::GenPowerShellCompletionWithDesc", + "main::Command::Print", + "main::Command::OutOrStderr", + "main::Command::PrintErrf", + "main::MinimumNArgs" + ], + "baseline_failing_tests": [ + "TestFailGenFishCompletionFile" + ], + "callers": [ + { + "symbol": "main::Command::NamePadding", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::CheckErr", + "truth": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString", + "main::WriteStringAndCheck" + ], + "found": [ + "main::Command::InitDefaultHelpCmd", + "main::Command::UsageString", + "main::WriteStringAndCheck" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::CommandPathPadding", + "truth": [ + "main::defaultUsageFunc" + ], + "found": [ + "main::defaultUsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "truth": [ + "main::Command::InitDefaultCompletionCmd" + ], + "found": [ + "main::Command::InitDefaultCompletionCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::Print", + "truth": [ + "main::Command::ParseFlags", + "main::Command::Printf", + "main::Command::Println" + ], + "found": [ + "main::Command::ParseFlags", + "main::Command::Printf", + "main::Command::Println", + "main::preExecHook" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 0.75, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::OutOrStderr", + "truth": [ + "main::Command::Print", + "main::Command::UsageFunc" + ], + "found": [ + "main::Command::Print", + "main::Command::UsageFunc" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::Command::PrintErrf", + "truth": [ + "main::Command::ExecuteC" + ], + "found": [ + "main::Command::ExecuteC" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "main::MinimumNArgs", + "truth": [ + "main::Command::initCompleteCmd" + ], + "found": [ + "main::Command::initCompleteCmd" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "sample_common": [ + "main::Command::MarkFlagRequired" + ], + "callers_common": [ + { + "symbol": "main::Command::MarkFlagRequired", + "truth": [ + "main::Command::enforceFlagGroupsForCompletion" + ], + "found": [ + "main::Command::enforceFlagGroupsForCompletion" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "rename": [ + { + "symbol": "main::Command::NamePadding", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::CheckErr", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::CommandPathPadding", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::Print", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "bash_completionsV2.go:179: # Print the activeHelp statements before we finish\nbash_completionsV2.go:184: # Print the activeHelp statements\nbash_completions_test.go:134:\t\tShort: \"Print anything to the screen\",\ncommand.go:1434:// Print is a convenience method to Print to the defined output, fall", + "detail": "" + }, + { + "symbol": "main::Command::OutOrStderr", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::Command::PrintErrf", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "main::MinimumNArgs", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + } + ], + "tests": [ + { + "symbol": "main::Command::NamePadding", + "level": "name", + "truth": 24, + "predicted": 125, + "recall": 0.875, + "precision": 0.168, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestDefaultCompletionCmd", + "TestNoArgs", + "TestValidateFlagGroups" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "main::CheckErr", + "level": "name", + "truth": 112, + "predicted": 244, + "recall": 0.9196428571428571, + "precision": 0.42213114754098363, + "top_hits": 5, + "top_n": 10, + "top_precision": 0.5, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "TestBashCompletionV2WithActiveHelp", + "TestCalledAs", + "TestCompleteCmdInZshScript", + "TestCompleteNoDesCmdInZshScript", + "TestGenFishCompletionFile", + "TestGenManTree", + "TestHelpFuncExecuted", + "TestPwshCompletionNoActiveHelp" + ], + "recall_graph_only": 0.9196428571428571 + }, + { + "symbol": "main::Command::CommandPathPadding", + "level": "name", + "truth": 8, + "predicted": 125, + "recall": 0.625, + "precision": 0.04, + "top_hits": 1, + "top_n": 10, + "top_precision": 0.1, + "top_best": 0.5, + "caught": 1.0, + "missed": [ + "TestDefaultCompletionCmd", + "TestNoArgs", + "TestValidateFlagGroups" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "level": "name", + "truth": 7, + "predicted": 208, + "recall": 0.8571428571428571, + "precision": 0.028846153846153848, + "top_hits": 2, + "top_n": 10, + "top_precision": 0.2, + "top_best": 0.6, + "caught": 1.0, + "missed": [ + "TestCalledAs" + ], + "recall_graph_only": 0.8571428571428571 + } + ], + "look": [ + { + "symbol": "main::Command::NamePadding", + "look_tokens": 167, + "file_tokens": 15286 + }, + { + "symbol": "main::CheckErr", + "look_tokens": 277, + "file_tokens": 1871 + }, + { + "symbol": "main::Command::CommandPathPadding", + "look_tokens": 187, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::GenPowerShellCompletionWithDesc", + "look_tokens": 207, + "file_tokens": 3403 + }, + { + "symbol": "main::Command::Print", + "look_tokens": 206, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::OutOrStderr", + "look_tokens": 146, + "file_tokens": 15286 + }, + { + "symbol": "main::Command::PrintErrf", + "look_tokens": 171, + "file_tokens": 15286 + }, + { + "symbol": "main::MinimumNArgs", + "look_tokens": 226, + "file_tokens": 1120 + } + ], + "seconds": 7, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.969, + "callers_checked": 8, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 0.819, + "tests_precision": 0.165, + "tests_top10_precision": 0.225, + "tests_top10_best": 0.775, + "tests_caught": 1.0, + "tests_checked": 4, + "look_vs_file": 0.059 + } + }, + { + "repo": "click", + "lang": "python", + "commit": "8abb77a8432e", + "index_seconds": 0.3, + "symbols": 761, + "files": 32, + "edges": 9055, + "sample": [ + "click::types::Path::coerce_path_result", + "click::core::Option::get_help_extra", + "click::formatting::HelpFormatter::write_heading", + "click::formatting::HelpFormatter::indentation", + "click::globals::push_context", + "click::_textwrap::TextWrapper::extra_indent", + "click::termui::confirm", + "click::core::Command::format_usage" + ], + "baseline_failing_tests": [], + "callers": [], + "sample_common": [], + "callers_common": [], + "rename": [ + { + "symbol": "click::types::Path::coerce_path_result", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::core::Option::get_help_extra", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/click/core.py:3099: Help text indentation is cleaned here instead of only in the\nsrc/click/formatting.py:151: \"\"\"Increases the indentation.\"\"\"\nsrc/click/formatting.py:155: \"\"\"Decreases the indentation.\"\"\"\nsrc/click/formatting.py:290: \"\"\"A context manager that increase", + "detail": "" + }, + { + "symbol": "click::globals::push_context", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::_textwrap::TextWrapper::extra_indent", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "click::termui::confirm", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/click/core.py:227: \"\"\"Used a prompt to confirm a default or provide a value.\"\"\"\nsrc/click/core.py:3063: :param confirmation_prompt: Prompt a second time to confirm the\nsrc/click/termui.py:191: :param confirmation_prompt: Prompt a second time to confirm the\ntests/test_termui.py:1413: ", + "detail": "" + }, + { + "symbol": "click::core::Command::format_usage", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + } + ], + "tests": [ + { + "symbol": "click::types::Path::coerce_path_result", + "level": "name", + "truth": 9, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "test_dual_options_custom_type_sentinel_flag_value", + "test_envvar_container_type", + "test_other_command_invoke_with_defaults", + "test_path_allow_dash", + "test_path_dash_no_byteswarning", + "test_path_option", + "test_path_resolve_symlink", + "test_path_type" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "click::core::Option::get_help_extra", + "level": "name", + "truth": 89, + "predicted": 11, + "recall": 0.12359550561797752, + "precision": 1.0, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "test_aliased_command_canonical_name", + "test_argument_help", + "test_argument_help_deprecated_without_help_lists_all", + "test_argument_help_empty_string_lists_all", + "test_argument_help_lists_undocumented_arguments", + "test_argument_help_optional_metavar", + "test_argument_help_options_only_no_arguments_section", + "test_argument_help_undocumented_arguments_only_no_section" + ], + "recall_graph_only": 0.12359550561797752 + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "level": "name", + "truth": 76, + "predicted": 24, + "recall": 0.13157894736842105, + "precision": 0.4166666666666667, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "test_aliased_command_canonical_name", + "test_argument_help", + "test_argument_help_deprecated_without_help_lists_all", + "test_argument_help_empty_string_lists_all", + "test_argument_help_lists_undocumented_arguments", + "test_argument_help_optional_metavar", + "test_argument_help_options_only_no_arguments_section", + "test_argument_help_undocumented_arguments_only_no_section" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "level": "name", + "truth": 10, + "predicted": 24, + "recall": 0.5, + "precision": 0.20833333333333334, + "top_hits": 4, + "top_n": 10, + "top_precision": 0.4, + "top_best": 0.5, + "caught": 1.0, + "missed": [ + "test_basic_group", + "test_chaining_help", + "test_deprecated_empty_help_no_leading_space", + "test_deprecated_help_text_is_not_translated", + "test_deprecated_in_help_messages" + ], + "recall_graph_only": 0.0 + } + ], + "look": [ + { + "symbol": "click::types::Path::coerce_path_result", + "look_tokens": 216, + "file_tokens": 11834 + }, + { + "symbol": "click::core::Option::get_help_extra", + "look_tokens": 958, + "file_tokens": 39086 + }, + { + "symbol": "click::formatting::HelpFormatter::write_heading", + "look_tokens": 224, + "file_tokens": 2611 + }, + { + "symbol": "click::formatting::HelpFormatter::indentation", + "look_tokens": 227, + "file_tokens": 2611 + }, + { + "symbol": "click::globals::push_context", + "look_tokens": 109, + "file_tokens": 481 + }, + { + "symbol": "click::_textwrap::TextWrapper::extra_indent", + "look_tokens": 289, + "file_tokens": 1568 + }, + { + "symbol": "click::termui::confirm", + "look_tokens": 629, + "file_tokens": 8971 + }, + { + "symbol": "click::core::Command::format_usage", + "look_tokens": 189, + "file_tokens": 39086 + } + ], + "seconds": 28, + "summary": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 0.189, + "tests_precision": 0.406, + "tests_top10_precision": 0.45, + "tests_top10_best": 0.625, + "tests_caught": 0.75, + "tests_checked": 4, + "look_vs_file": 0.088 + } + }, + { + "repo": "zustand", + "lang": "typescript", + "commit": "9fed2eb2f3af", + "index_seconds": 0.2, + "symbols": 175, + "files": 36, + "edges": 5251, + "sample": [ + "src::middleware::persist::createJSONStorage" + ], + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "truth": [ + "src::middleware::persist::persistImpl" + ], + "found": [ + "src::middleware::persist::persistImpl" + ], + "maybe": [], + "import_files": [ + "src/middleware.ts" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "sample_common": [], + "callers_common": [], + "rename": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + } + ], + "tests": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "level": "file", + "truth": 6, + "predicted": 2, + "recall": 0.3333333333333333, + "precision": 1.0, + "top_hits": 2, + "top_n": 2, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "tests/devtools.test.tsx", + "tests/middlewareTypes.test.tsx", + "tests/persistPromiseLike.test.ts", + "tests/types.test.tsx" + ] + } + ], + "look": [ + { + "symbol": "src::middleware::persist::createJSONStorage", + "look_tokens": 349, + "file_tokens": 3010 + } + ], + "seconds": 15, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 1, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": 0.333, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_top10_best": 1.0, + "tests_caught": 1.0, + "tests_checked": 1, + "look_vs_file": 0.116 + } + }, + { + "repo": "jsoup", + "lang": "java", + "commit": "d90d57521d93", + "index_seconds": 2.3, + "symbols": 2663, + "files": 105, + "edges": 42271, + "sample": [ + "org::jsoup::internal::SoftPool::release", + "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "org::jsoup::select::Evaluator::asPredicate", + "org::jsoup::parser::TokenQueue::matchesWord", + "org::jsoup::internal::StringUtil::isAsciiLetter", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::nodes::DocumentType::publicId" + ], + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "truth": [ + "org::jsoup::internal::ControllableInputStream::readToByteBuffer", + "org::jsoup::internal::ControllableInputStream::skip", + "org::jsoup::internal::SimpleBufferedInput::close", + "org::jsoup::internal::SimpleStreamReader::close", + "org::jsoup::internal::StringUtil::releaseBuilderVoid", + "org::jsoup::parser::CharacterReader::close", + "org::jsoup::select::HasEvaluator::Traversal::matchesAny" + ], + "found": [ + "org::jsoup::internal::ControllableInputStream::readToByteBuffer", + "org::jsoup::internal::ControllableInputStream::skip", + "org::jsoup::internal::SimpleBufferedInput::close", + "org::jsoup::internal::SimpleStreamReader::close", + "org::jsoup::internal::StringUtil::releaseBuilderVoid", + "org::jsoup::parser::CharacterReader::close", + "org::jsoup::select::HasEvaluator::Traversal::matchesAny" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "truth": [ + "org::jsoup::internal::StringUtil::normaliseWhitespace", + "org::jsoup::nodes::Element::appendNormalisedText" + ], + "found": [ + "org::jsoup::internal::StringUtil::normaliseWhitespace", + "org::jsoup::nodes::Element::appendNormalisedText" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "truth": [ + "org::jsoup::select::Evaluator::AttributeKeyPair::matchesValue" + ], + "found": [ + "org::jsoup::select::Evaluator::AttributeKeyPair::matchesValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "truth": [ + "org::jsoup::select::EvaluatorInternals::stream" + ], + "found": [ + "org::jsoup::select::EvaluatorInternals::stream" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "truth": [ + "org::jsoup::parser::TokenQueue::matchesCssIdentifier", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "found": [ + "org::jsoup::parser::TokenQueue::matchesCssIdentifier", + "org::jsoup::select::QueryParser::parseSimpleSequence" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "truth": [ + "org::jsoup::parser::CharacterReader::consumeLetterSequence", + "org::jsoup::parser::CharacterReader::consumeLetterThenDigitSequence", + "org::jsoup::parser::CharacterReader::matchesAsciiAlpha", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::isIdentStart" + ], + "found": [ + "org::jsoup::parser::CharacterReader::consumeLetterSequence", + "org::jsoup::parser::CharacterReader::consumeLetterThenDigitSequence", + "org::jsoup::parser::CharacterReader::matchesAsciiAlpha", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::isIdentStart" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "truth": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeWhitespace", + "org::jsoup::select::QueryParser::consumeAttributeValue" + ], + "found": [ + "org::jsoup::parser::TokenQueue::consumeCssValue", + "org::jsoup::parser::TokenQueue::consumeWhitespace", + "org::jsoup::select::QueryParser::consumeAttributeValue" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "truth": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendDocumentType", + "org::jsoup::parser::HtmlTreeBuilderState::process" + ], + "found": [ + "org::jsoup::helper::W3CDom::W3CBuilder::appendDocumentType", + "org::jsoup::parser::HtmlTreeBuilderState::process" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "sample_common": [ + "org::jsoup::parser::Tag::isSelfClosing", + "org::jsoup::nodes::Document::shallowClone", + "org::jsoup::internal::StringUtil::isWhitespace", + "org::jsoup::internal::ControllableInputStream::onProgress", + "org::jsoup::helper::Regex::compile", + "org::jsoup::nodes::Node::normalName", + "org::jsoup::nodes::LeafNode::attributes", + "org::jsoup::parser::Tag::getName" + ], + "callers_common": [ + { + "symbol": "org::jsoup::parser::Tag::isSelfClosing", + "truth": [ + "org::jsoup::nodes::Element::outerHtmlHead", + "org::jsoup::parser::HtmlTreeBuilder::insertElementFor", + "org::jsoup::parser::TreeBuilder::trackNodePosition" + ], + "found": [ + "org::jsoup::nodes::Element::outerHtmlHead", + "org::jsoup::parser::HtmlTreeBuilder::insertElementFor" + ], + "maybe": [ + "org::jsoup::parser::TreeBuilder::trackNodePosition" + ], + "import_files": [], + "recall": 0.6666666666666666, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Document::shallowClone", + "truth": [ + "org::jsoup::nodes::Node::doClone" + ], + "found": [ + "org::jsoup::nodes::Node::doClone" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isWhitespace", + "truth": [ + "org::jsoup::internal::CssMatching::matchesToken", + "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "org::jsoup::internal::StringUtil::isBlank", + "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "org::jsoup::nodes::Element::nextClassEnd", + "org::jsoup::nodes::Element::nextClassStart", + "org::jsoup::nodes::Entities::doEscape", + "org::jsoup::nodes::Printer::Pretty::textTrim", + "org::jsoup::parser::CharacterReader::consumeWhitespace", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::parser::Tokeniser::isWhitespaceReference", + "org::jsoup::parser::TokeniserState::isCustomEndTagNameChar", + "org::jsoup::parser::TokeniserState::read", + "org::jsoup::parser::TokeniserState::readDoctypeInternalSubset", + "org::jsoup::select::Evaluator::AttributeWithValueMatching::toString" + ], + "found": [ + "org::jsoup::internal::CssMatching::matchesToken", + "org::jsoup::internal::LegacyMatching::hasAttributeFlag", + "org::jsoup::internal::StringUtil::isBlank", + "org::jsoup::internal::StringUtil::trimAsciiWhitespace", + "org::jsoup::nodes::Element::nextClassEnd", + "org::jsoup::nodes::Element::nextClassStart", + "org::jsoup::nodes::Entities::doEscape", + "org::jsoup::nodes::Printer::Pretty::textTrim", + "org::jsoup::parser::CharacterReader::consumeWhitespace", + "org::jsoup::parser::Tag::validateTextTagName", + "org::jsoup::parser::TokenQueue::matchesWhitespace", + "org::jsoup::parser::Tokeniser::isWhitespaceReference", + "org::jsoup::parser::TokeniserState::isCustomEndTagNameChar", + "org::jsoup::parser::TokeniserState::read", + "org::jsoup::parser::TokeniserState::readDoctypeInternalSubset", + "org::jsoup::select::Evaluator::AttributeWithValueMatching::toString" + ], + "maybe": [], + "import_files": [ + "src/main/java/org/jsoup/select/Evaluator.java" + ], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::internal::ControllableInputStream::onProgress", + "truth": [ + "org::jsoup::helper::HttpConnection::Response::execute" + ], + "found": [], + "maybe": [ + "org::jsoup::helper::HttpConnection::Response::execute" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::helper::Regex::compile", + "truth": [ + "org::jsoup::nodes::Element::getElementsByAttributeValueMatching", + "org::jsoup::nodes::Element::getElementsMatchingOwnText", + "org::jsoup::nodes::Element::getElementsMatchingText", + "org::jsoup::select::LegacyQueryParser::rawAttribute", + "org::jsoup::select::QueryParser::consumeRegex", + "org::jsoup::select::QueryParser::matchesAttr" + ], + "found": [ + "org::jsoup::nodes::Element::getElementsByAttributeValueMatching", + "org::jsoup::nodes::Element::getElementsMatchingOwnText", + "org::jsoup::nodes::Element::getElementsMatchingText", + "org::jsoup::select::LegacyQueryParser::rawAttribute", + "org::jsoup::select::QueryParser::consumeRegex", + "org::jsoup::select::QueryParser::matchesAttr" + ], + "maybe": [ + "org::jsoup::helper", + "org::jsoup::helper::Re2jRegex::compile", + "org::jsoup::helper::W3CDom::selectXpath" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "org::jsoup::nodes::Node::normalName", + "truth": [ + "org::jsoup::nodes::Node::nameIs", + "org::jsoup::safety::Cleaner::CleaningVisitor::head", + "org::jsoup::safety::Cleaner::CleaningVisitor::tail", + "org::jsoup::select::Evaluator::sameType" + ], + "found": [ + "org::jsoup::safety::Cleaner::CleaningVisitor::tail", + "org::jsoup::select::Evaluator::sameType" + ], + "maybe": [ + "org::jsoup::parser::HtmlTreeBuilder::onStackNot", + "org::jsoup::parser::HtmlTreeBuilderState::exitTableBody", + "org::jsoup::parser::HtmlTreeBuilderState::inBodyStartTag", + "org::jsoup::parser::HtmlTreeBuilderState::process", + "org::jsoup::safety::Cleaner::CleaningVisitor::head" + ], + "import_files": [], + "recall": 0.5, + "precision": 1.0, + "recall_with_maybe": 0.75 + }, + { + "symbol": "org::jsoup::nodes::LeafNode::attributes", + "skipped": "compiler reported no uses" + }, + { + "symbol": "org::jsoup::parser::Tag::getName", + "truth": [ + "org::jsoup::nodes::Element::nodeName", + "org::jsoup::nodes::Element::tagName" + ], + "found": [ + "org::jsoup::nodes::Element::nodeName", + "org::jsoup::nodes::Element::tagName" + ], + "maybe": [ + "org::jsoup::helper", + "org::jsoup::helper::RequestAuthHandler::enable", + "org::jsoup::helper::W3CDom::asString", + "org::jsoup::select::QueryCompat::isInternalFrame" + ], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "rename": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": ".github/dependabot.yml:11: # Et tu, junit? Keep us on 5, as 6 has min JDK17 - https://docs.junit.org/6.0.0-RC3/release-notes/#release-notes-6.0.0-M1\nchange-archive.txt:585: jsoup 1.15.1 release.\nchange-archive.txt:1547: * Improved parse time, now 2.3x faster than previous release, with lower", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/test/java/org/jsoup/internal/StringUtilTest.java:207: @Test void isAsciiLetter() {", + "detail": "" + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/main/java/org/jsoup/nodes/DocumentType.java:29: public DocumentType(String name, String publicId, String systemId) {\nsrc/main/java/org/jsoup/nodes/DocumentType.java:31: Validate.notNull(publicId);\nsrc/main/java/org/jsoup/nodes/DocumentType.java:35: .add(PublicId, publicId)\ns", + "detail": "" + } + ], + "tests": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "level": "name", + "truth": 1755, + "predicted": 515, + "recall": 0.2723646723646724, + "precision": 0.9281553398058252, + "top_hits": 5, + "top_n": 10, + "top_precision": 0.5, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "DocumentsWithSameContentAreEqual", + "DocumentsWithSameContentAreVerifiable", + "NoErrorOnEofIfBodyOpen", + "aLoneOperandIsNotAnExplicitFlag", + "absAttr", + "absHandlesDotFromIndex", + "absHandlesRelativeQuery", + "absoluteAttributeLookupIgnoresKeyCase" + ], + "recall_graph_only": 0.2717948717948718 + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "level": "name", + "truth": 446, + "predicted": 124, + "recall": 0.24663677130044842, + "precision": 0.8870967741935484, + "top_hits": 10, + "top_n": 10, + "top_precision": 1.0, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "adjacentSiblings", + "adjacentSiblingsWithId", + "adoption", + "adoptionFallbackAtCapacityRetainsRecentEntries", + "adoptionReportsFormattingElementMissingFromStack", + "adoptionReportsFormattingElementOutsideScope", + "adoptionReportsNonCurrentFormattingElementAndContinues", + "after" + ], + "recall_graph_only": 0.24663677130044842 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "level": "name", + "truth": 7, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "aLoneOperandIsNotAnExplicitFlag", + "absoluteAttributeLookupIgnoresKeyCase", + "explicitCompilationCapturesTheWholeQuery", + "explicitFlagsOverrideDefaultsInBothModes", + "hyphenatedAttributeValueAtBufferBoundary", + "parsedAttributeValuesRoundTrip", + "qualifiedAttributeNamesUseTheSameLiteralAndRegexParsing" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "level": "name", + "truth": 957, + "predicted": 26, + "recall": 0.0219435736677116, + "precision": 0.8076923076923077, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "aLoneOperandIsNotAnExplicitFlag", + "absAttr", + "absHandlesDotFromIndex", + "absHandlesRelativeQuery", + "absoluteAttributeLookupIgnoresKeyCase", + "absoluteAttributesRespectAttributeNameCase", + "accessorsAreCaseInsensitive", + "accessorsDoNotVivifyAttributes" + ], + "recall_graph_only": 0.0219435736677116 + } + ], + "look": [ + { + "symbol": "org::jsoup::internal::SoftPool::release", + "look_tokens": 442, + "file_tokens": 600 + }, + { + "symbol": "org::jsoup::internal::StringUtil::appendNormalisedWhitespace", + "look_tokens": 606, + "file_tokens": 4377 + }, + { + "symbol": "org::jsoup::internal::LegacyMatching::cssAttributeMatches", + "look_tokens": 245, + "file_tokens": 1068 + }, + { + "symbol": "org::jsoup::select::Evaluator::asPredicate", + "look_tokens": 401, + "file_tokens": 9555 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWord", + "look_tokens": 195, + "file_tokens": 5312 + }, + { + "symbol": "org::jsoup::internal::StringUtil::isAsciiLetter", + "look_tokens": 367, + "file_tokens": 4377 + }, + { + "symbol": "org::jsoup::parser::TokenQueue::matchesWhitespace", + "look_tokens": 390, + "file_tokens": 5312 + }, + { + "symbol": "org::jsoup::nodes::DocumentType::publicId", + "look_tokens": 204, + "file_tokens": 964 + } + ], + "seconds": 146, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 8, + "common_recall": 0.738, + "common_precision": 1.0, + "common_recall_with_maybe": 0.964, + "common_checked": 7, + "rename_ok": 1.0, + "rename_checked": 8, + "tests_recall": 0.135, + "tests_precision": 0.656, + "tests_top10_precision": 0.6, + "tests_top10_best": 0.75, + "tests_caught": 0.75, + "tests_checked": 4, + "look_vs_file": 0.194 + } + }, + { + "repo": "semver", + "lang": "rust", + "commit": "280ebcb6edac", + "index_seconds": 0.1, + "symbols": 113, + "files": 13, + "edges": 1192, + "sample": [ + "semver::identifier::Identifier::ptr_eq", + "semver::eval::matches_req", + "semver::identifier::Identifier::new_unchecked", + "semver::eval::matches_comparator", + "semver::identifier::Identifier::empty" + ], + "baseline_failing_tests": [], + "callers": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "truth": [ + "semver::identifier::Identifier::eq", + "semver::impls::BuildMetadata::cmp", + "semver::impls::Prerelease::cmp" + ], + "found": [ + "semver::identifier::Identifier::eq", + "semver::impls::BuildMetadata::cmp", + "semver::impls::Prerelease::cmp" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::eval::matches_req", + "truth": [ + "semver::VersionReq::matches" + ], + "found": [ + "semver::VersionReq::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "truth": [ + "semver::parse::build_identifier", + "semver::parse::prerelease_identifier" + ], + "found": [ + "semver::parse::build_identifier", + "semver::parse::prerelease_identifier" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::eval::matches_comparator", + "truth": [ + "semver::Comparator::matches" + ], + "found": [ + "semver::Comparator::matches" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::empty", + "truth": [ + "semver::BuildMetadata::EMPTY", + "semver::Prerelease::EMPTY", + "semver::identifier::Identifier::is_empty", + "semver::identifier::Identifier::new_unchecked", + "semver::impls::Identifier::default" + ], + "found": [ + "semver::BuildMetadata::EMPTY", + "semver::Prerelease::EMPTY", + "semver::identifier::Identifier::is_empty", + "semver::identifier::Identifier::new_unchecked", + "semver::impls::Identifier::default" + ], + "maybe": [], + "import_files": [], + "recall": 1.0, + "precision": 1.0, + "recall_with_maybe": 1.0 + } + ], + "sample_common": [ + "semver::BuildMetadata::as_str", + "semver::identifier::Identifier::is_empty" + ], + "callers_common": [ + { + "symbol": "semver::BuildMetadata::as_str", + "truth": [ + "semver::display::BuildMetadata::fmt", + "semver::impls::BuildMetadata::cmp" + ], + "found": [], + "maybe": [ + "semver::Prerelease::as_str", + "semver::impls::BuildMetadata::cmp", + "semver::impls::BuildMetadata::deref", + "semver::impls::Prerelease::cmp", + "semver::impls::Prerelease::deref" + ], + "import_files": [], + "recall": 0.0, + "precision": null, + "recall_with_maybe": 0.5 + }, + { + "symbol": "semver::identifier::Identifier::is_empty", + "truth": [ + "semver::BuildMetadata::is_empty", + "semver::Prerelease::is_empty", + "semver::identifier::Identifier::as_str", + "semver::identifier::Identifier::is_empty_or_inline" + ], + "found": [ + "semver::identifier::Identifier::as_str", + "semver::identifier::Identifier::is_empty_or_inline" + ], + "maybe": [], + "import_files": [], + "recall": 0.5, + "precision": 1.0, + "recall_with_maybe": 0.5 + } + ], + "rename": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::eval::matches_req", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/identifier.rs:94: const HEAD: NonNull = unsafe { NonNull::new_unchecked(!0 as *mut u8) };\nsrc/identifier.rs:120: let size = bytes_for_varint(unsafe { NonZeroUsize::new_unchecked(len) }) + len;\nsrc/identifier.rs:292: unsafe { NonNull::new_unchecked(modified) }\nsrc/ide", + "detail": "" + }, + { + "symbol": "semver::eval::matches_comparator", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "", + "detail": "" + }, + { + "symbol": "semver::identifier::Identifier::empty", + "ok": true, + "compiled": true, + "tests_ok": null, + "tests_failed": [], + "old_name_left": "src/error.rs:35: ErrorKind::Empty => formatter.write_str(\"empty string, expected a semver version\"),\nsrc/error.rs:70: write!(formatter, \"empty identifier segment in {}\", pos)\nsrc/identifier.rs:169: let empty = Self::empty_gnx();\nsrc/identifier.rs:170: let is_e", + "detail": "" + } + ], + "tests": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "level": "name", + "truth": 20, + "predicted": 0, + "recall": 0.0, + "precision": 0.0, + "top_hits": 0, + "top_n": 0, + "top_precision": 0.0, + "top_best": 0.0, + "caught": 0.0, + "missed": [ + "test_basic", + "test_caret", + "test_cargo3202", + "test_eq", + "test_eq_hash", + "test_exact", + "test_ge", + "test_greater_than" + ], + "recall_graph_only": 0.0 + }, + { + "symbol": "semver::eval::matches_req", + "level": "name", + "truth": 11, + "predicted": 13, + "recall": 1.0, + "precision": 0.8461538461538461, + "top_hits": 8, + "top_n": 10, + "top_precision": 0.8, + "top_best": 1.0, + "caught": 1.0, + "missed": [], + "recall_graph_only": 1.0 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "level": "name", + "truth": 24, + "predicted": 29, + "recall": 0.8333333333333334, + "precision": 0.6896551724137931, + "top_hits": 9, + "top_n": 10, + "top_precision": 0.9, + "top_best": 1.0, + "caught": 1.0, + "missed": [ + "test_align", + "test_comparator_parse", + "test_leading_digit_in_pre_and_build", + "test_wildcard_and_another" + ], + "recall_graph_only": 0.8333333333333334 + }, + { + "symbol": "semver::eval::matches_comparator", + "skipped": "no test fails when it throws", + "predicted": 0 + } + ], + "look": [ + { + "symbol": "semver::identifier::Identifier::ptr_eq", + "look_tokens": 107, + "file_tokens": 4536 + }, + { + "symbol": "semver::eval::matches_req", + "look_tokens": 305, + "file_tokens": 1035 + }, + { + "symbol": "semver::identifier::Identifier::new_unchecked", + "look_tokens": 1070, + "file_tokens": 4536 + }, + { + "symbol": "semver::eval::matches_comparator", + "look_tokens": 125, + "file_tokens": 1035 + }, + { + "symbol": "semver::identifier::Identifier::empty", + "look_tokens": 222, + "file_tokens": 4536 + } + ], + "seconds": 3, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "common_recall": 0.25, + "common_precision": 1.0, + "common_recall_with_maybe": 0.5, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.512, + "tests_top10_precision": 0.567, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.145 + } + } +] \ No newline at end of file diff --git a/eval/results/run5-before.md b/eval/results/run5-before.md new file mode 100644 index 0000000..e0fb978 --- /dev/null +++ b/eval/results/run5-before.md @@ -0,0 +1,7 @@ +| repo | lang | symbols | index s | callers recall | callers precision | shared names: recall (+maybe) | shared names: precision | rename ok | tests recall | tests precision | top-10 fail (best possible) | caught by top-10 | look / file | +|---|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:| +| cobra | go | 288 | 0.1 | 100% (8) | 97% | 100% (100%) (1) | 100% | 100% (8) | 82% (4) | 16% | 22% (78%) | 100% | 6% | +| click | python | 761 | 0.3 | — | — | — | — | 100% (8) | 19% (4) | 41% | 45% (62%) | 75% | 9% | +| zustand | typescript | 175 | 0.2 | 100% (1) | 100% | — | — | 100% (1) | 33% (1) | 100% | 100% (100%) | 100% | 12% | +| jsoup | java | 2663 | 2.3 | 100% (8) | 100% | 74% (96%) (7) | 100% | 100% (8) | 14% (4) | 66% | 60% (75%) | 75% | 19% | +| semver | rust | 113 | 0.1 | 100% (5) | 100% | 25% (50%) (2) | 100% | 100% (5) | 61% (3) | 51% | 57% (67%) | 67% | 14% | diff --git a/eval/results/run6-before.json b/eval/results/run6-before.json new file mode 100644 index 0000000..38ced3c --- /dev/null +++ b/eval/results/run6-before.json @@ -0,0 +1,3619 @@ +{ + "config": "n20-m8-seeds7,8,9", + "seconds": 484, + "scopes": { + "all": { + "callers_recall": { + "mean": 0.996, + "functions": 232, + "boot_lo": 0.991, + "boot_hi": 1.0, + "boot_half": 0.004, + "seeds": [ + 0.995, + 0.993, + 0.993 + ], + "seed_sd": 0.001, + "threshold": 0.01 + }, + "callers_precision": { + "mean": 0.979, + "functions": 232, + "boot_lo": 0.966, + "boot_hi": 0.99, + "boot_half": 0.012, + "seeds": [ + 0.975, + 0.986, + 0.98 + ], + "seed_sd": 0.005, + "threshold": 0.02 + }, + "blind_recall": { + "mean": 0.992, + "functions": 163, + "boot_lo": 0.98, + "boot_hi": 1.0, + "boot_half": 0.01, + "seeds": [ + 1.0, + 0.985, + 0.996 + ], + "seed_sd": 0.008, + "threshold": 0.01 + }, + "common_recall": { + "mean": 0.71, + "functions": 105, + "boot_lo": 0.641, + "boot_hi": 0.778, + "boot_half": 0.068, + "seeds": [ + 0.708, + 0.721, + 0.707 + ], + "seed_sd": 0.008, + "threshold": 0.07 + }, + "common_recall_with_maybe": { + "mean": 0.946, + "functions": 105, + "boot_lo": 0.916, + "boot_hi": 0.973, + "boot_half": 0.029, + "seeds": [ + 0.94, + 0.936, + 0.952 + ], + "seed_sd": 0.009, + "threshold": 0.03 + }, + "common_precision": { + "mean": 0.994, + "functions": 79, + "boot_lo": 0.986, + "boot_hi": 1.0, + "boot_half": 0.007, + "seeds": [ + 1.0, + 0.995, + 0.993 + ], + "seed_sd": 0.003, + "threshold": 0.02 + }, + "rename_ok": { + "mean": 0.828, + "functions": 337, + "boot_lo": 0.795, + "boot_hi": 0.861, + "boot_half": 0.033, + "seeds": [ + 0.849, + 0.849, + 0.795 + ], + "seed_sd": 0.031, + "threshold": 0.04 + }, + "tests_recall": { + "mean": 0.449, + "functions": 166, + "boot_lo": 0.393, + "boot_hi": 0.504, + "boot_half": 0.056, + "seeds": [ + 0.417, + 0.499, + 0.502 + ], + "seed_sd": 0.048, + "threshold": 0.06 + }, + "tests_precision": { + "mean": 0.468, + "functions": 166, + "boot_lo": 0.416, + "boot_hi": 0.519, + "boot_half": 0.052, + "seeds": [ + 0.444, + 0.485, + 0.533 + ], + "seed_sd": 0.045, + "threshold": 0.06 + }, + "tests_top10_precision": { + "mean": 0.505, + "functions": 166, + "boot_lo": 0.452, + "boot_hi": 0.558, + "boot_half": 0.053, + "seeds": [ + 0.471, + 0.542, + 0.561 + ], + "seed_sd": 0.047, + "threshold": 0.06 + }, + "tests_top10_best": { + "mean": 0.601, + "functions": 166, + "boot_lo": 0.545, + "boot_hi": 0.655, + "boot_half": 0.055, + "seeds": [ + 0.551, + 0.634, + 0.651 + ], + "seed_sd": 0.054, + "threshold": 0.06 + }, + "tests_caught": { + "mean": 0.747, + "functions": 166, + "boot_lo": 0.693, + "boot_hi": 0.801, + "boot_half": 0.054, + "seeds": [ + 0.706, + 0.75, + 0.824 + ], + "seed_sd": 0.059, + "threshold": 0.06 + }, + "look_vs_file": { + "mean": 0.187, + "functions": 337, + "boot_lo": 0.165, + "boot_hi": 0.211, + "boot_half": 0.023, + "seeds": [ + 0.203, + 0.187, + 0.179 + ], + "seed_sd": 0.012, + "threshold": 0.03 + } + }, + "go": { + "callers_recall": { + "mean": 1.0, + "functions": 71, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.02 + }, + "callers_precision": { + "mean": 0.941, + "functions": 71, + "boot_lo": 0.9, + "boot_hi": 0.975, + "boot_half": 0.037, + "seeds": [ + 0.927, + 0.957, + 0.949 + ], + "seed_sd": 0.015, + "threshold": 0.04 + }, + "blind_recall": { + "mean": 1.0, + "functions": 40, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "common_recall": { + "mean": 0.727, + "functions": 11, + "boot_lo": 0.455, + "boot_hi": 0.909, + "boot_half": 0.227, + "seeds": [ + 0.727, + 0.727, + 0.727 + ], + "seed_sd": 0.0, + "threshold": 0.23 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 11, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.1 + }, + "common_precision": { + "mean": 1.0, + "functions": 8, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.13 + }, + "rename_ok": { + "mean": 0.901, + "functions": 81, + "boot_lo": 0.84, + "boot_hi": 0.951, + "boot_half": 0.056, + "seeds": [ + 0.925, + 0.975, + 0.85 + ], + "seed_sd": 0.063, + "threshold": 0.06 + }, + "tests_recall": { + "mean": 0.791, + "functions": 37, + "boot_lo": 0.699, + "boot_hi": 0.877, + "boot_half": 0.089, + "seeds": [ + 0.713, + 0.823, + 0.767 + ], + "seed_sd": 0.055, + "threshold": 0.09 + }, + "tests_precision": { + "mean": 0.471, + "functions": 37, + "boot_lo": 0.364, + "boot_hi": 0.572, + "boot_half": 0.104, + "seeds": [ + 0.563, + 0.423, + 0.508 + ], + "seed_sd": 0.07, + "threshold": 0.11 + }, + "tests_top10_precision": { + "mean": 0.54, + "functions": 37, + "boot_lo": 0.434, + "boot_hi": 0.643, + "boot_half": 0.105, + "seeds": [ + 0.593, + 0.505, + 0.579 + ], + "seed_sd": 0.047, + "threshold": 0.11 + }, + "tests_top10_best": { + "mean": 0.753, + "functions": 37, + "boot_lo": 0.655, + "boot_hi": 0.845, + "boot_half": 0.095, + "seeds": [ + 0.787, + 0.711, + 0.716 + ], + "seed_sd": 0.042, + "threshold": 0.1 + }, + "tests_caught": { + "mean": 0.838, + "functions": 37, + "boot_lo": 0.73, + "boot_hi": 0.919, + "boot_half": 0.095, + "seeds": [ + 0.75, + 0.75, + 1.0 + ], + "seed_sd": 0.144, + "threshold": 0.1 + }, + "look_vs_file": { + "mean": 0.13, + "functions": 81, + "boot_lo": 0.096, + "boot_hi": 0.166, + "boot_half": 0.035, + "seeds": [ + 0.15, + 0.163, + 0.129 + ], + "seed_sd": 0.017, + "threshold": 0.04 + } + }, + "python": { + "callers_recall": null, + "callers_precision": null, + "blind_recall": null, + "common_recall": null, + "common_recall_with_maybe": null, + "common_precision": null, + "rename_ok": { + "mean": 0.728, + "functions": 92, + "boot_lo": 0.652, + "boot_hi": 0.804, + "boot_half": 0.076, + "seeds": [ + 0.75, + 0.7, + 0.7 + ], + "seed_sd": 0.029, + "threshold": 0.08 + }, + "tests_recall": { + "mean": 0.305, + "functions": 42, + "boot_lo": 0.211, + "boot_hi": 0.404, + "boot_half": 0.097, + "seeds": [ + 0.231, + 0.326, + 0.458 + ], + "seed_sd": 0.114, + "threshold": 0.1 + }, + "tests_precision": { + "mean": 0.494, + "functions": 42, + "boot_lo": 0.389, + "boot_hi": 0.6, + "boot_half": 0.105, + "seeds": [ + 0.365, + 0.575, + 0.643 + ], + "seed_sd": 0.145, + "threshold": 0.11 + }, + "tests_top10_precision": { + "mean": 0.515, + "functions": 42, + "boot_lo": 0.406, + "boot_hi": 0.621, + "boot_half": 0.107, + "seeds": [ + 0.4, + 0.593, + 0.66 + ], + "seed_sd": 0.135, + "threshold": 0.11 + }, + "tests_top10_best": { + "mean": 0.576, + "functions": 42, + "boot_lo": 0.469, + "boot_hi": 0.686, + "boot_half": 0.109, + "seeds": [ + 0.444, + 0.661, + 0.729 + ], + "seed_sd": 0.149, + "threshold": 0.11 + }, + "tests_caught": { + "mean": 0.738, + "functions": 42, + "boot_lo": 0.619, + "boot_hi": 0.857, + "boot_half": 0.119, + "seeds": [ + 0.688, + 0.812, + 0.812 + ], + "seed_sd": 0.072, + "threshold": 0.12 + }, + "look_vs_file": { + "mean": 0.168, + "functions": 92, + "boot_lo": 0.135, + "boot_hi": 0.202, + "boot_half": 0.033, + "seeds": [ + 0.177, + 0.165, + 0.183 + ], + "seed_sd": 0.009, + "threshold": 0.04 + } + }, + "typescript": { + "callers_recall": { + "mean": 1.0, + "functions": 39, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 1.0, + "functions": 39, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 1.0, + "functions": 34, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "common_recall": { + "mean": 0.65, + "functions": 10, + "boot_lo": 0.4, + "boot_hi": 0.9, + "boot_half": 0.25, + "seeds": [ + 0.688, + 0.688, + 0.688 + ], + "seed_sd": 0.0, + "threshold": 0.25 + }, + "common_recall_with_maybe": { + "mean": 0.9, + "functions": 10, + "boot_lo": 0.8, + "boot_hi": 1.0, + "boot_half": 0.1, + "seeds": [ + 0.938, + 0.938, + 0.875 + ], + "seed_sd": 0.036, + "threshold": 0.1 + }, + "common_precision": { + "mean": 1.0, + "functions": 7, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.15 + }, + "rename_ok": { + "mean": 0.7, + "functions": 40, + "boot_lo": 0.575, + "boot_hi": 0.825, + "boot_half": 0.125, + "seeds": [ + 0.762, + 0.714, + 0.667 + ], + "seed_sd": 0.048, + "threshold": 0.13 + }, + "tests_recall": { + "mean": 0.033, + "functions": 22, + "boot_lo": 0.01, + "boot_hi": 0.063, + "boot_half": 0.027, + "seeds": [ + 0.043, + 0.054, + 0.058 + ], + "seed_sd": 0.008, + "threshold": 0.05 + }, + "tests_precision": { + "mean": 0.197, + "functions": 22, + "boot_lo": 0.091, + "boot_hi": 0.326, + "boot_half": 0.117, + "seeds": [ + 0.167, + 0.296, + 0.241 + ], + "seed_sd": 0.065, + "threshold": 0.12 + }, + "tests_top10_precision": { + "mean": 0.197, + "functions": 22, + "boot_lo": 0.091, + "boot_hi": 0.326, + "boot_half": 0.117, + "seeds": [ + 0.167, + 0.296, + 0.241 + ], + "seed_sd": 0.065, + "threshold": 0.12 + }, + "tests_top10_best": { + "mean": 0.197, + "functions": 22, + "boot_lo": 0.091, + "boot_hi": 0.326, + "boot_half": 0.117, + "seeds": [ + 0.167, + 0.296, + 0.241 + ], + "seed_sd": 0.065, + "threshold": 0.12 + }, + "tests_caught": { + "mean": 0.273, + "functions": 22, + "boot_lo": 0.136, + "boot_hi": 0.455, + "boot_half": 0.159, + "seeds": [ + 0.222, + 0.333, + 0.333 + ], + "seed_sd": 0.064, + "threshold": 0.16 + }, + "look_vs_file": { + "mean": 0.522, + "functions": 40, + "boot_lo": 0.416, + "boot_hi": 0.633, + "boot_half": 0.109, + "seeds": [ + 0.541, + 0.473, + 0.468 + ], + "seed_sd": 0.041, + "threshold": 0.11 + } + }, + "java": { + "callers_recall": { + "mean": 0.998, + "functions": 85, + "boot_lo": 0.993, + "boot_hi": 1.0, + "boot_half": 0.004, + "seeds": [ + 1.0, + 0.995, + 0.995 + ], + "seed_sd": 0.003, + "threshold": 0.02 + }, + "callers_precision": { + "mean": 0.993, + "functions": 85, + "boot_lo": 0.984, + "boot_hi": 1.0, + "boot_half": 0.008, + "seeds": [ + 0.99, + 0.995, + 0.985 + ], + "seed_sd": 0.005, + "threshold": 0.02 + }, + "blind_recall": { + "mean": 0.981, + "functions": 63, + "boot_lo": 0.949, + "boot_hi": 1.0, + "boot_half": 0.025, + "seeds": [ + 1.0, + 0.956, + 0.993 + ], + "seed_sd": 0.024, + "threshold": 0.03 + }, + "common_recall": { + "mean": 0.904, + "functions": 56, + "boot_lo": 0.845, + "boot_hi": 0.958, + "boot_half": 0.056, + "seeds": [ + 0.932, + 0.878, + 0.924 + ], + "seed_sd": 0.029, + "threshold": 0.06 + }, + "common_recall_with_maybe": { + "mean": 0.972, + "functions": 56, + "boot_lo": 0.938, + "boot_hi": 0.996, + "boot_half": 0.029, + "seeds": [ + 0.991, + 0.96, + 0.977 + ], + "seed_sd": 0.016, + "threshold": 0.03 + }, + "common_precision": { + "mean": 0.995, + "functions": 52, + "boot_lo": 0.984, + "boot_hi": 1.0, + "boot_half": 0.008, + "seeds": [ + 1.0, + 1.0, + 0.988 + ], + "seed_sd": 0.007, + "threshold": 0.02 + }, + "rename_ok": { + "mean": 0.965, + "functions": 86, + "boot_lo": 0.93, + "boot_hi": 0.988, + "boot_half": 0.029, + "seeds": [ + 0.925, + 0.975, + 0.975 + ], + "seed_sd": 0.029, + "threshold": 0.03 + }, + "tests_recall": { + "mean": 0.489, + "functions": 43, + "boot_lo": 0.376, + "boot_hi": 0.599, + "boot_half": 0.111, + "seeds": [ + 0.433, + 0.597, + 0.476 + ], + "seed_sd": 0.085, + "threshold": 0.12 + }, + "tests_precision": { + "mean": 0.608, + "functions": 43, + "boot_lo": 0.513, + "boot_hi": 0.705, + "boot_half": 0.096, + "seeds": [ + 0.594, + 0.52, + 0.706 + ], + "seed_sd": 0.094, + "threshold": 0.1 + }, + "tests_top10_precision": { + "mean": 0.673, + "functions": 43, + "boot_lo": 0.589, + "boot_hi": 0.759, + "boot_half": 0.085, + "seeds": [ + 0.639, + 0.656, + 0.733 + ], + "seed_sd": 0.05, + "threshold": 0.09 + }, + "tests_top10_best": { + "mean": 0.798, + "functions": 43, + "boot_lo": 0.718, + "boot_hi": 0.877, + "boot_half": 0.08, + "seeds": [ + 0.739, + 0.775, + 0.908 + ], + "seed_sd": 0.089, + "threshold": 0.08 + }, + "tests_caught": { + "mean": 0.953, + "functions": 43, + "boot_lo": 0.884, + "boot_hi": 1.0, + "boot_half": 0.058, + "seeds": [ + 0.938, + 0.938, + 1.0 + ], + "seed_sd": 0.036, + "threshold": 0.06 + }, + "look_vs_file": { + "mean": 0.133, + "functions": 86, + "boot_lo": 0.105, + "boot_hi": 0.164, + "boot_half": 0.029, + "seeds": [ + 0.137, + 0.123, + 0.121 + ], + "seed_sd": 0.009, + "threshold": 0.03 + } + }, + "rust": { + "callers_recall": { + "mean": 0.982, + "functions": 37, + "boot_lo": 0.951, + "boot_hi": 1.0, + "boot_half": 0.024, + "seeds": [ + 0.975, + 0.972, + 0.973 + ], + "seed_sd": 0.002, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 1.0, + "functions": 37, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 0.997, + "functions": 26, + "boot_lo": 0.991, + "boot_hi": 1.0, + "boot_half": 0.004, + "seeds": [ + 1.0, + 1.0, + 0.995 + ], + "seed_sd": 0.003, + "threshold": 0.04 + }, + "common_recall": { + "mean": 0.335, + "functions": 28, + "boot_lo": 0.207, + "boot_hi": 0.463, + "boot_half": 0.128, + "seeds": [ + 0.328, + 0.317, + 0.247 + ], + "seed_sd": 0.044, + "threshold": 0.13 + }, + "common_recall_with_maybe": { + "mean": 0.889, + "functions": 28, + "boot_lo": 0.814, + "boot_hi": 0.961, + "boot_half": 0.073, + "seeds": [ + 0.812, + 0.8, + 0.908 + ], + "seed_sd": 0.059, + "threshold": 0.08 + }, + "common_precision": { + "mean": 0.983, + "functions": 12, + "boot_lo": 0.95, + "boot_hi": 1.0, + "boot_half": 0.025, + "seeds": [ + 1.0, + 0.95, + 1.0 + ], + "seed_sd": 0.029, + "threshold": 0.09 + }, + "rename_ok": { + "mean": 0.737, + "functions": 38, + "boot_lo": 0.605, + "boot_hi": 0.842, + "boot_half": 0.118, + "seeds": [ + 0.84, + 0.8, + 0.68 + ], + "seed_sd": 0.083, + "threshold": 0.12 + }, + "tests_recall": { + "mean": 0.49, + "functions": 22, + "boot_lo": 0.353, + "boot_hi": 0.624, + "boot_half": 0.136, + "seeds": [ + 0.539, + 0.502, + 0.584 + ], + "seed_sd": 0.041, + "threshold": 0.14 + }, + "tests_precision": { + "mean": 0.407, + "functions": 22, + "boot_lo": 0.27, + "boot_hi": 0.542, + "boot_half": 0.136, + "seeds": [ + 0.395, + 0.546, + 0.397 + ], + "seed_sd": 0.087, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.411, + "functions": 22, + "boot_lo": 0.272, + "boot_hi": 0.548, + "boot_half": 0.138, + "seeds": [ + 0.403, + 0.555, + 0.405 + ], + "seed_sd": 0.087, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.411, + "functions": 22, + "boot_lo": 0.272, + "boot_hi": 0.548, + "boot_half": 0.138, + "seeds": [ + 0.403, + 0.555, + 0.405 + ], + "seed_sd": 0.087, + "threshold": 0.14 + }, + "tests_caught": { + "mean": 0.682, + "functions": 22, + "boot_lo": 0.5, + "boot_hi": 0.818, + "boot_half": 0.159, + "seeds": [ + 0.727, + 0.727, + 0.727 + ], + "seed_sd": 0.0, + "threshold": 0.16 + }, + "look_vs_file": { + "mean": 0.129, + "functions": 38, + "boot_lo": 0.083, + "boot_hi": 0.185, + "boot_half": 0.051, + "seeds": [ + 0.151, + 0.122, + 0.101 + ], + "seed_sd": 0.025, + "threshold": 0.06 + } + } + }, + "repos": [ + { + "repo": "cobra", + "lang": "go", + "commit": "adbc8813901b", + "symbols": 288, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 13, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.96, + "callers_checked": 45, + "blind_recall": 1.0, + "blind_checked": 31, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 0.87, + "rename_checked": 46, + "tests_recall": 0.89, + "tests_precision": 0.362, + "tests_top10_precision": 0.442, + "tests_top10_best": 0.785, + "tests_caught": 0.81, + "tests_checked": 21, + "look_vs_file": 0.069 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 0.95, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 12, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 0.9, + "rename_checked": 20, + "tests_recall": 0.839, + "tests_precision": 0.4, + "tests_top10_precision": 0.436, + "tests_top10_best": 0.824, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.053 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 15, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 1.0, + "rename_checked": 20, + "tests_recall": 0.991, + "tests_precision": 0.303, + "tests_top10_precision": 0.4, + "tests_top10_best": 0.738, + "tests_caught": 0.625, + "tests_checked": 8, + "look_vs_file": 0.097 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 0.958, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 10, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 0.8, + "rename_checked": 20, + "tests_recall": 0.763, + "tests_precision": 0.413, + "tests_top10_precision": 0.486, + "tests_top10_best": 0.749, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.048 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 45, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 0.96, + "functions": 45, + "boot_lo": 0.924, + "boot_hi": 0.994, + "boot_half": 0.035, + "seeds": [ + 0.95, + 1.0, + 0.958 + ], + "seed_sd": 0.027, + "threshold": 0.04 + }, + "blind_recall": { + "mean": 1.0, + "functions": 31, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_recall": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "common_precision": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "rename_ok": { + "mean": 0.87, + "functions": 46, + "boot_lo": 0.783, + "boot_hi": 0.935, + "boot_half": 0.076, + "seeds": [ + 0.9, + 1.0, + 0.8 + ], + "seed_sd": 0.1, + "threshold": 0.08 + }, + "tests_recall": { + "mean": 0.89, + "functions": 21, + "boot_lo": 0.794, + "boot_hi": 0.977, + "boot_half": 0.091, + "seeds": [ + 0.839, + 0.991, + 0.763 + ], + "seed_sd": 0.116, + "threshold": 0.1 + }, + "tests_precision": { + "mean": 0.362, + "functions": 21, + "boot_lo": 0.244, + "boot_hi": 0.486, + "boot_half": 0.121, + "seeds": [ + 0.4, + 0.303, + 0.413 + ], + "seed_sd": 0.06, + "threshold": 0.13 + }, + "tests_top10_precision": { + "mean": 0.442, + "functions": 21, + "boot_lo": 0.305, + "boot_hi": 0.576, + "boot_half": 0.135, + "seeds": [ + 0.436, + 0.4, + 0.486 + ], + "seed_sd": 0.043, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.785, + "functions": 21, + "boot_lo": 0.665, + "boot_hi": 0.895, + "boot_half": 0.115, + "seeds": [ + 0.824, + 0.738, + 0.749 + ], + "seed_sd": 0.047, + "threshold": 0.12 + }, + "tests_caught": { + "mean": 0.81, + "functions": 21, + "boot_lo": 0.667, + "boot_hi": 0.952, + "boot_half": 0.143, + "seeds": [ + 0.75, + 0.625, + 1.0 + ], + "seed_sd": 0.191, + "threshold": 0.15 + }, + "look_vs_file": { + "mean": 0.069, + "functions": 46, + "boot_lo": 0.042, + "boot_hi": 0.097, + "boot_half": 0.028, + "seeds": [ + 0.053, + 0.097, + 0.048 + ], + "seed_sd": 0.027, + "threshold": 0.03 + } + } + }, + { + "repo": "chi", + "lang": "go", + "commit": "c64ed7d6635f", + "symbols": 351, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 10, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.908, + "callers_checked": 26, + "blind_recall": 1.0, + "blind_checked": 9, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.943, + "rename_checked": 35, + "tests_recall": 0.661, + "tests_precision": 0.614, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.711, + "tests_caught": 0.875, + "tests_checked": 16, + "look_vs_file": 0.21 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 0.897, + "callers_checked": 15, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.587, + "tests_precision": 0.725, + "tests_top10_precision": 0.75, + "tests_top10_best": 0.75, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.248 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 0.896, + "callers_checked": 14, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.654, + "tests_precision": 0.544, + "tests_top10_precision": 0.609, + "tests_top10_best": 0.684, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.228 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 0.938, + "callers_checked": 15, + "blind_recall": 1.0, + "blind_checked": 3, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.9, + "rename_checked": 20, + "tests_recall": 0.77, + "tests_precision": 0.602, + "tests_top10_precision": 0.672, + "tests_top10_best": 0.684, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.21 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 26, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "callers_precision": { + "mean": 0.908, + "functions": 26, + "boot_lo": 0.82, + "boot_hi": 0.981, + "boot_half": 0.08, + "seeds": [ + 0.897, + 0.896, + 0.938 + ], + "seed_sd": 0.024, + "threshold": 0.09 + }, + "blind_recall": { + "mean": 1.0, + "functions": 9, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.12 + }, + "common_recall": { + "mean": 0.7, + "functions": 10, + "boot_lo": 0.5, + "boot_hi": 0.9, + "boot_half": 0.2, + "seeds": [ + 0.7, + 0.7, + 0.7 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 10, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.1 + }, + "common_precision": { + "mean": 1.0, + "functions": 7, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.15 + }, + "rename_ok": { + "mean": 0.943, + "functions": 35, + "boot_lo": 0.886, + "boot_hi": 1.0, + "boot_half": 0.057, + "seeds": [ + 0.95, + 0.95, + 0.9 + ], + "seed_sd": 0.029, + "threshold": 0.06 + }, + "tests_recall": { + "mean": 0.661, + "functions": 16, + "boot_lo": 0.508, + "boot_hi": 0.803, + "boot_half": 0.148, + "seeds": [ + 0.587, + 0.654, + 0.77 + ], + "seed_sd": 0.093, + "threshold": 0.15 + }, + "tests_precision": { + "mean": 0.614, + "functions": 16, + "boot_lo": 0.443, + "boot_hi": 0.777, + "boot_half": 0.167, + "seeds": [ + 0.725, + 0.544, + 0.602 + ], + "seed_sd": 0.093, + "threshold": 0.17 + }, + "tests_top10_precision": { + "mean": 0.667, + "functions": 16, + "boot_lo": 0.509, + "boot_hi": 0.823, + "boot_half": 0.157, + "seeds": [ + 0.75, + 0.609, + 0.672 + ], + "seed_sd": 0.07, + "threshold": 0.16 + }, + "tests_top10_best": { + "mean": 0.711, + "functions": 16, + "boot_lo": 0.55, + "boot_hi": 0.861, + "boot_half": 0.155, + "seeds": [ + 0.75, + 0.684, + 0.684 + ], + "seed_sd": 0.038, + "threshold": 0.16 + }, + "tests_caught": { + "mean": 0.875, + "functions": 16, + "boot_lo": 0.75, + "boot_hi": 1.0, + "boot_half": 0.125, + "seeds": [ + 0.75, + 0.875, + 1.0 + ], + "seed_sd": 0.125, + "threshold": 0.13 + }, + "look_vs_file": { + "mean": 0.21, + "functions": 35, + "boot_lo": 0.149, + "boot_hi": 0.282, + "boot_half": 0.066, + "seeds": [ + 0.248, + 0.228, + 0.21 + ], + "seed_sd": 0.019, + "threshold": 0.07 + } + } + }, + { + "repo": "click", + "lang": "python", + "commit": "8abb77a8432e", + "symbols": 761, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 18, + "summary": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.66, + "rename_checked": 50, + "tests_recall": 0.212, + "tests_precision": 0.384, + "tests_top10_precision": 0.405, + "tests_top10_best": 0.5, + "tests_caught": 0.696, + "tests_checked": 23, + "look_vs_file": 0.083 + }, + "summary_seeds": { + "7": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.7, + "rename_checked": 20, + "tests_recall": 0.152, + "tests_precision": 0.224, + "tests_top10_precision": 0.275, + "tests_top10_best": 0.362, + "tests_caught": 0.625, + "tests_checked": 8, + "look_vs_file": 0.092 + }, + "8": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.65, + "rename_checked": 20, + "tests_recall": 0.238, + "tests_precision": 0.445, + "tests_top10_precision": 0.448, + "tests_top10_best": 0.535, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.056 + }, + "9": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.65, + "rename_checked": 20, + "tests_recall": 0.298, + "tests_precision": 0.539, + "tests_top10_precision": 0.545, + "tests_top10_best": 0.645, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.084 + } + }, + "noise": { + "callers_recall": null, + "callers_precision": null, + "blind_recall": null, + "common_recall": null, + "common_recall_with_maybe": null, + "common_precision": null, + "rename_ok": { + "mean": 0.66, + "functions": 50, + "boot_lo": 0.54, + "boot_hi": 0.76, + "boot_half": 0.11, + "seeds": [ + 0.7, + 0.65, + 0.65 + ], + "seed_sd": 0.029, + "threshold": 0.11 + }, + "tests_recall": { + "mean": 0.212, + "functions": 23, + "boot_lo": 0.117, + "boot_hi": 0.321, + "boot_half": 0.102, + "seeds": [ + 0.152, + 0.238, + 0.298 + ], + "seed_sd": 0.073, + "threshold": 0.11 + }, + "tests_precision": { + "mean": 0.384, + "functions": 23, + "boot_lo": 0.247, + "boot_hi": 0.525, + "boot_half": 0.139, + "seeds": [ + 0.224, + 0.445, + 0.539 + ], + "seed_sd": 0.162, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.405, + "functions": 23, + "boot_lo": 0.267, + "boot_hi": 0.547, + "boot_half": 0.14, + "seeds": [ + 0.275, + 0.448, + 0.545 + ], + "seed_sd": 0.137, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.5, + "functions": 23, + "boot_lo": 0.355, + "boot_hi": 0.651, + "boot_half": 0.148, + "seeds": [ + 0.362, + 0.535, + 0.645 + ], + "seed_sd": 0.142, + "threshold": 0.15 + }, + "tests_caught": { + "mean": 0.696, + "functions": 23, + "boot_lo": 0.522, + "boot_hi": 0.87, + "boot_half": 0.174, + "seeds": [ + 0.625, + 0.75, + 0.75 + ], + "seed_sd": 0.072, + "threshold": 0.18 + }, + "look_vs_file": { + "mean": 0.083, + "functions": 50, + "boot_lo": 0.065, + "boot_hi": 0.102, + "boot_half": 0.018, + "seeds": [ + 0.092, + 0.056, + 0.084 + ], + "seed_sd": 0.019, + "threshold": 0.02 + } + } + }, + { + "repo": "sqlparse", + "lang": "python", + "commit": "09dbe1eec31e", + "symbols": 287, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 7, + "summary": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.81, + "rename_checked": 42, + "tests_recall": 0.417, + "tests_precision": 0.626, + "tests_top10_precision": 0.648, + "tests_top10_best": 0.669, + "tests_caught": 0.789, + "tests_checked": 19, + "look_vs_file": 0.268 + }, + "summary_seeds": { + "7": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.8, + "rename_checked": 20, + "tests_recall": 0.31, + "tests_precision": 0.507, + "tests_top10_precision": 0.525, + "tests_top10_best": 0.525, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.261 + }, + "8": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.75, + "rename_checked": 20, + "tests_recall": 0.415, + "tests_precision": 0.704, + "tests_top10_precision": 0.738, + "tests_top10_best": 0.787, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.274 + }, + "9": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.75, + "rename_checked": 20, + "tests_recall": 0.618, + "tests_precision": 0.747, + "tests_top10_precision": 0.775, + "tests_top10_best": 0.812, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.282 + } + }, + "noise": { + "callers_recall": null, + "callers_precision": null, + "blind_recall": null, + "common_recall": null, + "common_recall_with_maybe": null, + "common_precision": null, + "rename_ok": { + "mean": 0.81, + "functions": 42, + "boot_lo": 0.714, + "boot_hi": 0.905, + "boot_half": 0.095, + "seeds": [ + 0.8, + 0.75, + 0.75 + ], + "seed_sd": 0.029, + "threshold": 0.1 + }, + "tests_recall": { + "mean": 0.417, + "functions": 19, + "boot_lo": 0.264, + "boot_hi": 0.575, + "boot_half": 0.156, + "seeds": [ + 0.31, + 0.415, + 0.618 + ], + "seed_sd": 0.157, + "threshold": 0.16 + }, + "tests_precision": { + "mean": 0.626, + "functions": 19, + "boot_lo": 0.474, + "boot_hi": 0.767, + "boot_half": 0.147, + "seeds": [ + 0.507, + 0.704, + 0.747 + ], + "seed_sd": 0.128, + "threshold": 0.15 + }, + "tests_top10_precision": { + "mean": 0.648, + "functions": 19, + "boot_lo": 0.489, + "boot_hi": 0.791, + "boot_half": 0.151, + "seeds": [ + 0.525, + 0.738, + 0.775 + ], + "seed_sd": 0.135, + "threshold": 0.16 + }, + "tests_top10_best": { + "mean": 0.669, + "functions": 19, + "boot_lo": 0.507, + "boot_hi": 0.821, + "boot_half": 0.157, + "seeds": [ + 0.525, + 0.787, + 0.812 + ], + "seed_sd": 0.159, + "threshold": 0.16 + }, + "tests_caught": { + "mean": 0.789, + "functions": 19, + "boot_lo": 0.632, + "boot_hi": 0.947, + "boot_half": 0.158, + "seeds": [ + 0.75, + 0.875, + 0.875 + ], + "seed_sd": 0.072, + "threshold": 0.16 + }, + "look_vs_file": { + "mean": 0.268, + "functions": 42, + "boot_lo": 0.211, + "boot_hi": 0.328, + "boot_half": 0.058, + "seeds": [ + 0.261, + 0.274, + 0.282 + ], + "seed_sd": 0.011, + "threshold": 0.06 + } + } + }, + { + "repo": "zustand", + "lang": "typescript", + "commit": "9fed2eb2f3af", + "symbols": 175, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 1, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 1, + "blind_recall": 1.0, + "blind_checked": 1, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": 0.333, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_top10_best": 1.0, + "tests_caught": 1.0, + "tests_checked": 1, + "look_vs_file": 0.116 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 1, + "blind_recall": 1.0, + "blind_checked": 1, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": 0.333, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_top10_best": 1.0, + "tests_caught": 1.0, + "tests_checked": 1, + "look_vs_file": 0.116 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 1, + "blind_recall": 1.0, + "blind_checked": 1, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": 0.333, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_top10_best": 1.0, + "tests_caught": 1.0, + "tests_checked": 1, + "look_vs_file": 0.116 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 1, + "blind_recall": 1.0, + "blind_checked": 1, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": 0.333, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_top10_best": 1.0, + "tests_caught": 1.0, + "tests_checked": 1, + "look_vs_file": 0.116 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "callers_precision": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "blind_recall": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "common_recall": null, + "common_recall_with_maybe": null, + "common_precision": null, + "rename_ok": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "tests_recall": { + "mean": 0.333, + "functions": 1, + "boot_lo": 0.333, + "boot_hi": 0.333, + "boot_half": 0.0, + "seeds": [ + 0.333, + 0.333, + 0.333 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "tests_precision": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "tests_top10_precision": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "tests_top10_best": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "tests_caught": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "look_vs_file": { + "mean": 0.116, + "functions": 1, + "boot_lo": 0.116, + "boot_hi": 0.116, + "boot_half": 0.0, + "seeds": [ + 0.116, + 0.116, + 0.116 + ], + "seed_sd": 0.0, + "threshold": 0.0 + } + } + }, + { + "repo": "yaml", + "lang": "typescript", + "commit": "528ef30d6ded", + "symbols": 440, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 9, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 38, + "blind_recall": 1.0, + "blind_checked": 33, + "common_recall": 0.65, + "common_precision": 1.0, + "common_recall_with_maybe": 0.9, + "common_checked": 10, + "rename_ok": 0.692, + "rename_checked": 39, + "tests_recall": 0.019, + "tests_precision": 0.159, + "tests_top10_precision": 0.159, + "tests_top10_best": 0.159, + "tests_caught": 0.238, + "tests_checked": 21, + "look_vs_file": 0.532 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 17, + "common_recall": 0.688, + "common_precision": 1.0, + "common_recall_with_maybe": 0.938, + "common_checked": 8, + "rename_ok": 0.75, + "rename_checked": 20, + "tests_recall": 0.007, + "tests_precision": 0.062, + "tests_top10_precision": 0.062, + "tests_top10_best": 0.062, + "tests_caught": 0.125, + "tests_checked": 8, + "look_vs_file": 0.562 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 16, + "common_recall": 0.688, + "common_precision": 1.0, + "common_recall_with_maybe": 0.938, + "common_checked": 8, + "rename_ok": 0.7, + "rename_checked": 20, + "tests_recall": 0.019, + "tests_precision": 0.208, + "tests_top10_precision": 0.208, + "tests_top10_best": 0.208, + "tests_caught": 0.25, + "tests_checked": 8, + "look_vs_file": 0.491 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 15, + "common_recall": 0.688, + "common_precision": 1.0, + "common_recall_with_maybe": 0.875, + "common_checked": 8, + "rename_ok": 0.65, + "rename_checked": 20, + "tests_recall": 0.024, + "tests_precision": 0.146, + "tests_top10_precision": 0.146, + "tests_top10_best": 0.146, + "tests_caught": 0.25, + "tests_checked": 8, + "look_vs_file": 0.486 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 38, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 1.0, + "functions": 38, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 1.0, + "functions": 33, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_recall": { + "mean": 0.65, + "functions": 10, + "boot_lo": 0.4, + "boot_hi": 0.9, + "boot_half": 0.25, + "seeds": [ + 0.688, + 0.688, + 0.688 + ], + "seed_sd": 0.0, + "threshold": 0.25 + }, + "common_recall_with_maybe": { + "mean": 0.9, + "functions": 10, + "boot_lo": 0.8, + "boot_hi": 1.0, + "boot_half": 0.1, + "seeds": [ + 0.938, + 0.938, + 0.875 + ], + "seed_sd": 0.036, + "threshold": 0.1 + }, + "common_precision": { + "mean": 1.0, + "functions": 7, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.15 + }, + "rename_ok": { + "mean": 0.692, + "functions": 39, + "boot_lo": 0.564, + "boot_hi": 0.821, + "boot_half": 0.128, + "seeds": [ + 0.75, + 0.7, + 0.65 + ], + "seed_sd": 0.05, + "threshold": 0.13 + }, + "tests_recall": { + "mean": 0.019, + "functions": 21, + "boot_lo": 0.005, + "boot_hi": 0.033, + "boot_half": 0.014, + "seeds": [ + 0.007, + 0.019, + 0.024 + ], + "seed_sd": 0.009, + "threshold": 0.05 + }, + "tests_precision": { + "mean": 0.159, + "functions": 21, + "boot_lo": 0.056, + "boot_hi": 0.27, + "boot_half": 0.107, + "seeds": [ + 0.062, + 0.208, + 0.146 + ], + "seed_sd": 0.073, + "threshold": 0.11 + }, + "tests_top10_precision": { + "mean": 0.159, + "functions": 21, + "boot_lo": 0.056, + "boot_hi": 0.27, + "boot_half": 0.107, + "seeds": [ + 0.062, + 0.208, + 0.146 + ], + "seed_sd": 0.073, + "threshold": 0.11 + }, + "tests_top10_best": { + "mean": 0.159, + "functions": 21, + "boot_lo": 0.056, + "boot_hi": 0.27, + "boot_half": 0.107, + "seeds": [ + 0.062, + 0.208, + 0.146 + ], + "seed_sd": 0.073, + "threshold": 0.11 + }, + "tests_caught": { + "mean": 0.238, + "functions": 21, + "boot_lo": 0.095, + "boot_hi": 0.381, + "boot_half": 0.143, + "seeds": [ + 0.125, + 0.25, + 0.25 + ], + "seed_sd": 0.072, + "threshold": 0.15 + }, + "look_vs_file": { + "mean": 0.532, + "functions": 39, + "boot_lo": 0.429, + "boot_hi": 0.645, + "boot_half": 0.108, + "seeds": [ + 0.562, + 0.491, + 0.486 + ], + "seed_sd": 0.043, + "threshold": 0.11 + } + } + }, + { + "repo": "jsoup", + "lang": "java", + "commit": "d90d57521d93", + "symbols": 2663, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 381, + "summary": { + "callers_recall": 0.996, + "callers_precision": 0.988, + "callers_checked": 49, + "blind_recall": 0.966, + "blind_checked": 35, + "common_recall": 0.866, + "common_precision": 0.992, + "common_recall_with_maybe": 0.961, + "common_checked": 40, + "rename_ok": 0.959, + "rename_checked": 49, + "tests_recall": 0.264, + "tests_precision": 0.697, + "tests_top10_precision": 0.692, + "tests_top10_best": 0.773, + "tests_caught": 0.905, + "tests_checked": 21, + "look_vs_file": 0.159 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 0.98, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 10, + "common_recall": 0.885, + "common_precision": 1.0, + "common_recall_with_maybe": 0.984, + "common_checked": 16, + "rename_ok": 0.9, + "rename_checked": 20, + "tests_recall": 0.112, + "tests_precision": 0.653, + "tests_top10_precision": 0.629, + "tests_top10_best": 0.741, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.19 + }, + "8": { + "callers_recall": 0.99, + "callers_precision": 0.99, + "callers_checked": 20, + "blind_recall": 0.92, + "blind_checked": 15, + "common_recall": 0.794, + "common_precision": 1.0, + "common_recall_with_maybe": 0.932, + "common_checked": 16, + "rename_ok": 1.0, + "rename_checked": 20, + "tests_recall": 0.424, + "tests_precision": 0.65, + "tests_top10_precision": 0.662, + "tests_top10_best": 0.7, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.145 + }, + "9": { + "callers_recall": 0.99, + "callers_precision": 0.97, + "callers_checked": 20, + "blind_recall": 0.987, + "blind_checked": 15, + "common_recall": 0.865, + "common_precision": 0.978, + "common_recall_with_maybe": 0.96, + "common_checked": 14, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.293, + "tests_precision": 0.826, + "tests_top10_precision": 0.816, + "tests_top10_best": 0.891, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.122 + } + }, + "noise": { + "callers_recall": { + "mean": 0.996, + "functions": 49, + "boot_lo": 0.988, + "boot_hi": 1.0, + "boot_half": 0.006, + "seeds": [ + 1.0, + 0.99, + 0.99 + ], + "seed_sd": 0.006, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 0.988, + "functions": 49, + "boot_lo": 0.971, + "boot_hi": 1.0, + "boot_half": 0.014, + "seeds": [ + 0.98, + 0.99, + 0.97 + ], + "seed_sd": 0.01, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 0.966, + "functions": 35, + "boot_lo": 0.909, + "boot_hi": 1.0, + "boot_half": 0.046, + "seeds": [ + 1.0, + 0.92, + 0.987 + ], + "seed_sd": 0.043, + "threshold": 0.05 + }, + "common_recall": { + "mean": 0.866, + "functions": 40, + "boot_lo": 0.785, + "boot_hi": 0.942, + "boot_half": 0.078, + "seeds": [ + 0.885, + 0.794, + 0.865 + ], + "seed_sd": 0.048, + "threshold": 0.08 + }, + "common_recall_with_maybe": { + "mean": 0.961, + "functions": 40, + "boot_lo": 0.912, + "boot_hi": 0.994, + "boot_half": 0.041, + "seeds": [ + 0.984, + 0.932, + 0.96 + ], + "seed_sd": 0.026, + "threshold": 0.05 + }, + "common_precision": { + "mean": 0.992, + "functions": 36, + "boot_lo": 0.976, + "boot_hi": 1.0, + "boot_half": 0.012, + "seeds": [ + 1.0, + 1.0, + 0.978 + ], + "seed_sd": 0.013, + "threshold": 0.03 + }, + "rename_ok": { + "mean": 0.959, + "functions": 49, + "boot_lo": 0.898, + "boot_hi": 1.0, + "boot_half": 0.051, + "seeds": [ + 0.9, + 1.0, + 0.95 + ], + "seed_sd": 0.05, + "threshold": 0.06 + }, + "tests_recall": { + "mean": 0.264, + "functions": 21, + "boot_lo": 0.142, + "boot_hi": 0.396, + "boot_half": 0.127, + "seeds": [ + 0.112, + 0.424, + 0.293 + ], + "seed_sd": 0.157, + "threshold": 0.13 + }, + "tests_precision": { + "mean": 0.697, + "functions": 21, + "boot_lo": 0.561, + "boot_hi": 0.823, + "boot_half": 0.131, + "seeds": [ + 0.653, + 0.65, + 0.826 + ], + "seed_sd": 0.101, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.692, + "functions": 21, + "boot_lo": 0.554, + "boot_hi": 0.82, + "boot_half": 0.133, + "seeds": [ + 0.629, + 0.662, + 0.816 + ], + "seed_sd": 0.1, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.773, + "functions": 21, + "boot_lo": 0.641, + "boot_hi": 0.89, + "boot_half": 0.125, + "seeds": [ + 0.741, + 0.7, + 0.891 + ], + "seed_sd": 0.101, + "threshold": 0.13 + }, + "tests_caught": { + "mean": 0.905, + "functions": 21, + "boot_lo": 0.762, + "boot_hi": 1.0, + "boot_half": 0.119, + "seeds": [ + 0.875, + 0.875, + 1.0 + ], + "seed_sd": 0.072, + "threshold": 0.12 + }, + "look_vs_file": { + "mean": 0.159, + "functions": 49, + "boot_lo": 0.114, + "boot_hi": 0.211, + "boot_half": 0.048, + "seeds": [ + 0.19, + 0.145, + 0.122 + ], + "seed_sd": 0.035, + "threshold": 0.05 + } + } + }, + { + "repo": "json-java", + "lang": "java", + "commit": "2cd0a8c2112a", + "symbols": 542, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 24, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 36, + "blind_recall": 1.0, + "blind_checked": 28, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 16, + "rename_ok": 0.973, + "rename_checked": 37, + "tests_recall": 0.703, + "tests_precision": 0.524, + "tests_top10_precision": 0.655, + "tests_top10_best": 0.823, + "tests_caught": 1.0, + "tests_checked": 22, + "look_vs_file": 0.098 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 14, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 11, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.755, + "tests_precision": 0.534, + "tests_top10_precision": 0.65, + "tests_top10_best": 0.738, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.085 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 12, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 11, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.77, + "tests_precision": 0.39, + "tests_top10_precision": 0.65, + "tests_top10_best": 0.85, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.101 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 13, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 11, + "rename_ok": 1.0, + "rename_checked": 20, + "tests_recall": 0.659, + "tests_precision": 0.586, + "tests_top10_precision": 0.65, + "tests_top10_best": 0.925, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.119 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 36, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 1.0, + "functions": 36, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 1.0, + "functions": 28, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_recall": { + "mean": 1.0, + "functions": 16, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.07 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 16, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.07 + }, + "common_precision": { + "mean": 1.0, + "functions": 16, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.07 + }, + "rename_ok": { + "mean": 0.973, + "functions": 37, + "boot_lo": 0.919, + "boot_hi": 1.0, + "boot_half": 0.041, + "seeds": [ + 0.95, + 0.95, + 1.0 + ], + "seed_sd": 0.029, + "threshold": 0.05 + }, + "tests_recall": { + "mean": 0.703, + "functions": 22, + "boot_lo": 0.554, + "boot_hi": 0.843, + "boot_half": 0.145, + "seeds": [ + 0.755, + 0.77, + 0.659 + ], + "seed_sd": 0.06, + "threshold": 0.15 + }, + "tests_precision": { + "mean": 0.524, + "functions": 22, + "boot_lo": 0.381, + "boot_hi": 0.659, + "boot_half": 0.139, + "seeds": [ + 0.534, + 0.39, + 0.586 + ], + "seed_sd": 0.102, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.655, + "functions": 22, + "boot_lo": 0.541, + "boot_hi": 0.759, + "boot_half": 0.109, + "seeds": [ + 0.65, + 0.65, + 0.65 + ], + "seed_sd": 0.0, + "threshold": 0.11 + }, + "tests_top10_best": { + "mean": 0.823, + "functions": 22, + "boot_lo": 0.709, + "boot_hi": 0.918, + "boot_half": 0.105, + "seeds": [ + 0.738, + 0.85, + 0.925 + ], + "seed_sd": 0.094, + "threshold": 0.11 + }, + "tests_caught": { + "mean": 1.0, + "functions": 22, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.05 + }, + "look_vs_file": { + "mean": 0.098, + "functions": 37, + "boot_lo": 0.078, + "boot_hi": 0.117, + "boot_half": 0.019, + "seeds": [ + 0.085, + 0.101, + 0.119 + ], + "seed_sd": 0.017, + "threshold": 0.02 + } + } + }, + { + "repo": "semver", + "lang": "rust", + "commit": "280ebcb6edac", + "symbols": 113, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 1, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 0.25, + "common_precision": 1.0, + "common_recall_with_maybe": 0.5, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.146 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 0.25, + "common_precision": 1.0, + "common_recall_with_maybe": 0.5, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.146 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 0.25, + "common_precision": 1.0, + "common_recall_with_maybe": 0.5, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.146 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 0.25, + "common_precision": 1.0, + "common_recall_with_maybe": 0.5, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.146 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 5, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "callers_precision": { + "mean": 1.0, + "functions": 5, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "blind_recall": { + "mean": 1.0, + "functions": 5, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "common_recall": { + "mean": 0.25, + "functions": 2, + "boot_lo": 0.0, + "boot_hi": 0.5, + "boot_half": 0.25, + "seeds": [ + 0.25, + 0.25, + 0.25 + ], + "seed_sd": 0.0, + "threshold": 0.5 + }, + "common_recall_with_maybe": { + "mean": 0.5, + "functions": 2, + "boot_lo": 0.5, + "boot_hi": 0.5, + "boot_half": 0.0, + "seeds": [ + 0.5, + 0.5, + 0.5 + ], + "seed_sd": 0.0, + "threshold": 0.5 + }, + "common_precision": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "rename_ok": { + "mean": 1.0, + "functions": 5, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "tests_recall": { + "mean": 0.611, + "functions": 3, + "boot_lo": 0.278, + "boot_hi": 0.944, + "boot_half": 0.333, + "seeds": [ + 0.611, + 0.611, + 0.611 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "tests_precision": { + "mean": 0.636, + "functions": 3, + "boot_lo": 0.303, + "boot_hi": 0.97, + "boot_half": 0.333, + "seeds": [ + 0.636, + 0.636, + 0.636 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "tests_top10_precision": { + "mean": 0.667, + "functions": 3, + "boot_lo": 0.333, + "boot_hi": 1.0, + "boot_half": 0.333, + "seeds": [ + 0.667, + 0.667, + 0.667 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "tests_top10_best": { + "mean": 0.667, + "functions": 3, + "boot_lo": 0.333, + "boot_hi": 1.0, + "boot_half": 0.333, + "seeds": [ + 0.667, + 0.667, + 0.667 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "tests_caught": { + "mean": 0.667, + "functions": 3, + "boot_lo": 0.333, + "boot_hi": 1.0, + "boot_half": 0.333, + "seeds": [ + 0.667, + 0.667, + 0.667 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "look_vs_file": { + "mean": 0.146, + "functions": 5, + "boot_lo": 0.072, + "boot_hi": 0.228, + "boot_half": 0.078, + "seeds": [ + 0.146, + 0.146, + 0.146 + ], + "seed_sd": 0.0, + "threshold": 0.08 + } + } + }, + { + "repo": "indexmap", + "lang": "rust", + "commit": "41a870887c4c", + "symbols": 1026, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 19, + "summary": { + "callers_recall": 0.979, + "callers_precision": 1.0, + "callers_checked": 32, + "blind_recall": 0.996, + "blind_checked": 21, + "common_recall": 0.342, + "common_precision": 0.982, + "common_recall_with_maybe": 0.919, + "common_checked": 26, + "rename_ok": 0.697, + "rename_checked": 33, + "tests_recall": 0.471, + "tests_precision": 0.371, + "tests_top10_precision": 0.371, + "tests_top10_best": 0.371, + "tests_caught": 0.684, + "tests_checked": 19, + "look_vs_file": 0.127 + }, + "summary_seeds": { + "7": { + "callers_recall": 0.968, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 9, + "common_recall": 0.339, + "common_precision": 1.0, + "common_recall_with_maybe": 0.857, + "common_checked": 14, + "rename_ok": 0.8, + "rename_checked": 20, + "tests_recall": 0.512, + "tests_precision": 0.304, + "tests_top10_precision": 0.304, + "tests_top10_best": 0.304, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.152 + }, + "8": { + "callers_recall": 0.964, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 9, + "common_recall": 0.333, + "common_precision": 0.933, + "common_recall_with_maybe": 0.875, + "common_checked": 8, + "rename_ok": 0.75, + "rename_checked": 20, + "tests_recall": 0.461, + "tests_precision": 0.512, + "tests_top10_precision": 0.512, + "tests_top10_best": 0.512, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.116 + }, + "9": { + "callers_recall": 0.966, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 0.991, + "blind_checked": 9, + "common_recall": 0.247, + "common_precision": 1.0, + "common_recall_with_maybe": 0.99, + "common_checked": 10, + "rename_ok": 0.6, + "rename_checked": 20, + "tests_recall": 0.574, + "tests_precision": 0.307, + "tests_top10_precision": 0.307, + "tests_top10_best": 0.307, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.09 + } + }, + "noise": { + "callers_recall": { + "mean": 0.979, + "functions": 32, + "boot_lo": 0.941, + "boot_hi": 1.0, + "boot_half": 0.029, + "seeds": [ + 0.968, + 0.964, + 0.966 + ], + "seed_sd": 0.002, + "threshold": 0.04 + }, + "callers_precision": { + "mean": 1.0, + "functions": 32, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "blind_recall": { + "mean": 0.996, + "functions": 21, + "boot_lo": 0.989, + "boot_hi": 1.0, + "boot_half": 0.005, + "seeds": [ + 1.0, + 1.0, + 0.991 + ], + "seed_sd": 0.005, + "threshold": 0.05 + }, + "common_recall": { + "mean": 0.342, + "functions": 26, + "boot_lo": 0.207, + "boot_hi": 0.474, + "boot_half": 0.134, + "seeds": [ + 0.339, + 0.333, + 0.247 + ], + "seed_sd": 0.052, + "threshold": 0.14 + }, + "common_recall_with_maybe": { + "mean": 0.919, + "functions": 26, + "boot_lo": 0.842, + "boot_hi": 0.981, + "boot_half": 0.069, + "seeds": [ + 0.857, + 0.875, + 0.99 + ], + "seed_sd": 0.072, + "threshold": 0.07 + }, + "common_precision": { + "mean": 0.982, + "functions": 11, + "boot_lo": 0.945, + "boot_hi": 1.0, + "boot_half": 0.027, + "seeds": [ + 1.0, + 0.933, + 1.0 + ], + "seed_sd": 0.038, + "threshold": 0.1 + }, + "rename_ok": { + "mean": 0.697, + "functions": 33, + "boot_lo": 0.576, + "boot_hi": 0.818, + "boot_half": 0.121, + "seeds": [ + 0.8, + 0.75, + 0.6 + ], + "seed_sd": 0.104, + "threshold": 0.13 + }, + "tests_recall": { + "mean": 0.471, + "functions": 19, + "boot_lo": 0.334, + "boot_hi": 0.609, + "boot_half": 0.138, + "seeds": [ + 0.512, + 0.461, + 0.574 + ], + "seed_sd": 0.056, + "threshold": 0.14 + }, + "tests_precision": { + "mean": 0.371, + "functions": 19, + "boot_lo": 0.234, + "boot_hi": 0.507, + "boot_half": 0.137, + "seeds": [ + 0.304, + 0.512, + 0.307 + ], + "seed_sd": 0.119, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.371, + "functions": 19, + "boot_lo": 0.234, + "boot_hi": 0.507, + "boot_half": 0.137, + "seeds": [ + 0.304, + 0.512, + 0.307 + ], + "seed_sd": 0.119, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.371, + "functions": 19, + "boot_lo": 0.234, + "boot_hi": 0.507, + "boot_half": 0.137, + "seeds": [ + 0.304, + 0.512, + 0.307 + ], + "seed_sd": 0.119, + "threshold": 0.14 + }, + "tests_caught": { + "mean": 0.684, + "functions": 19, + "boot_lo": 0.526, + "boot_hi": 0.842, + "boot_half": 0.158, + "seeds": [ + 0.75, + 0.75, + 0.75 + ], + "seed_sd": 0.0, + "threshold": 0.16 + }, + "look_vs_file": { + "mean": 0.127, + "functions": 33, + "boot_lo": 0.075, + "boot_hi": 0.188, + "boot_half": 0.057, + "seeds": [ + 0.152, + 0.116, + 0.09 + ], + "seed_sd": 0.031, + "threshold": 0.06 + } + } + } + ] +} diff --git a/eval/results/run6-seeds.json b/eval/results/run6-seeds.json new file mode 100644 index 0000000..cd322bf --- /dev/null +++ b/eval/results/run6-seeds.json @@ -0,0 +1,3619 @@ +{ + "config": "n20-m8-seeds7,8,9", + "seconds": 191, + "scopes": { + "all": { + "callers_recall": { + "mean": 0.998, + "functions": 232, + "boot_lo": 0.996, + "boot_hi": 1.0, + "boot_half": 0.002, + "seeds": [ + 0.998, + 0.996, + 0.996 + ], + "seed_sd": 0.001, + "threshold": 0.01 + }, + "callers_precision": { + "mean": 0.986, + "functions": 232, + "boot_lo": 0.975, + "boot_hi": 0.995, + "boot_half": 0.01, + "seeds": [ + 0.981, + 0.998, + 0.981 + ], + "seed_sd": 0.01, + "threshold": 0.01 + }, + "blind_recall": { + "mean": 0.992, + "functions": 163, + "boot_lo": 0.98, + "boot_hi": 1.0, + "boot_half": 0.01, + "seeds": [ + 1.0, + 0.985, + 0.996 + ], + "seed_sd": 0.008, + "threshold": 0.01 + }, + "common_recall": { + "mean": 0.832, + "functions": 108, + "boot_lo": 0.778, + "boot_hi": 0.886, + "boot_half": 0.054, + "seeds": [ + 0.85, + 0.828, + 0.8 + ], + "seed_sd": 0.025, + "threshold": 0.06 + }, + "common_recall_with_maybe": { + "mean": 0.976, + "functions": 108, + "boot_lo": 0.956, + "boot_hi": 0.993, + "boot_half": 0.019, + "seeds": [ + 0.988, + 0.972, + 0.973 + ], + "seed_sd": 0.009, + "threshold": 0.02 + }, + "common_precision": { + "mean": 0.995, + "functions": 93, + "boot_lo": 0.988, + "boot_hi": 1.0, + "boot_half": 0.006, + "seeds": [ + 1.0, + 0.996, + 0.994 + ], + "seed_sd": 0.003, + "threshold": 0.02 + }, + "rename_ok": { + "mean": 0.828, + "functions": 337, + "boot_lo": 0.795, + "boot_hi": 0.861, + "boot_half": 0.033, + "seeds": [ + 0.849, + 0.849, + 0.795 + ], + "seed_sd": 0.031, + "threshold": 0.04 + }, + "tests_recall": { + "mean": 0.454, + "functions": 166, + "boot_lo": 0.399, + "boot_hi": 0.509, + "boot_half": 0.055, + "seeds": [ + 0.417, + 0.507, + 0.507 + ], + "seed_sd": 0.052, + "threshold": 0.06 + }, + "tests_precision": { + "mean": 0.471, + "functions": 166, + "boot_lo": 0.419, + "boot_hi": 0.522, + "boot_half": 0.051, + "seeds": [ + 0.444, + 0.492, + 0.534 + ], + "seed_sd": 0.045, + "threshold": 0.06 + }, + "tests_top10_precision": { + "mean": 0.509, + "functions": 166, + "boot_lo": 0.456, + "boot_hi": 0.561, + "boot_half": 0.052, + "seeds": [ + 0.471, + 0.549, + 0.563 + ], + "seed_sd": 0.049, + "threshold": 0.06 + }, + "tests_top10_best": { + "mean": 0.605, + "functions": 166, + "boot_lo": 0.55, + "boot_hi": 0.657, + "boot_half": 0.053, + "seeds": [ + 0.551, + 0.642, + 0.652 + ], + "seed_sd": 0.056, + "threshold": 0.06 + }, + "tests_caught": { + "mean": 0.753, + "functions": 166, + "boot_lo": 0.699, + "boot_hi": 0.807, + "boot_half": 0.054, + "seeds": [ + 0.706, + 0.765, + 0.824 + ], + "seed_sd": 0.059, + "threshold": 0.06 + }, + "look_vs_file": { + "mean": 0.193, + "functions": 337, + "boot_lo": 0.171, + "boot_hi": 0.217, + "boot_half": 0.023, + "seeds": [ + 0.21, + 0.192, + 0.184 + ], + "seed_sd": 0.013, + "threshold": 0.03 + } + }, + "go": { + "callers_recall": { + "mean": 1.0, + "functions": 71, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.02 + }, + "callers_precision": { + "mean": 0.963, + "functions": 71, + "boot_lo": 0.929, + "boot_hi": 0.989, + "boot_half": 0.03, + "seeds": [ + 0.947, + 1.0, + 0.951 + ], + "seed_sd": 0.029, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 1.0, + "functions": 40, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "common_recall": { + "mean": 0.727, + "functions": 11, + "boot_lo": 0.455, + "boot_hi": 0.909, + "boot_half": 0.227, + "seeds": [ + 0.727, + 0.727, + 0.727 + ], + "seed_sd": 0.0, + "threshold": 0.23 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 11, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.1 + }, + "common_precision": { + "mean": 1.0, + "functions": 8, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.13 + }, + "rename_ok": { + "mean": 0.901, + "functions": 81, + "boot_lo": 0.84, + "boot_hi": 0.951, + "boot_half": 0.056, + "seeds": [ + 0.925, + 0.975, + 0.85 + ], + "seed_sd": 0.063, + "threshold": 0.06 + }, + "tests_recall": { + "mean": 0.791, + "functions": 37, + "boot_lo": 0.699, + "boot_hi": 0.877, + "boot_half": 0.089, + "seeds": [ + 0.713, + 0.823, + 0.767 + ], + "seed_sd": 0.055, + "threshold": 0.09 + }, + "tests_precision": { + "mean": 0.471, + "functions": 37, + "boot_lo": 0.364, + "boot_hi": 0.572, + "boot_half": 0.104, + "seeds": [ + 0.563, + 0.423, + 0.508 + ], + "seed_sd": 0.07, + "threshold": 0.11 + }, + "tests_top10_precision": { + "mean": 0.54, + "functions": 37, + "boot_lo": 0.434, + "boot_hi": 0.643, + "boot_half": 0.105, + "seeds": [ + 0.593, + 0.505, + 0.579 + ], + "seed_sd": 0.047, + "threshold": 0.11 + }, + "tests_top10_best": { + "mean": 0.753, + "functions": 37, + "boot_lo": 0.655, + "boot_hi": 0.845, + "boot_half": 0.095, + "seeds": [ + 0.787, + 0.711, + 0.716 + ], + "seed_sd": 0.042, + "threshold": 0.1 + }, + "tests_caught": { + "mean": 0.838, + "functions": 37, + "boot_lo": 0.73, + "boot_hi": 0.919, + "boot_half": 0.095, + "seeds": [ + 0.75, + 0.75, + 1.0 + ], + "seed_sd": 0.144, + "threshold": 0.1 + }, + "look_vs_file": { + "mean": 0.135, + "functions": 81, + "boot_lo": 0.1, + "boot_hi": 0.172, + "boot_half": 0.036, + "seeds": [ + 0.156, + 0.169, + 0.135 + ], + "seed_sd": 0.017, + "threshold": 0.04 + } + }, + "python": { + "callers_recall": null, + "callers_precision": null, + "blind_recall": null, + "common_recall": null, + "common_recall_with_maybe": null, + "common_precision": null, + "rename_ok": { + "mean": 0.728, + "functions": 92, + "boot_lo": 0.652, + "boot_hi": 0.804, + "boot_half": 0.076, + "seeds": [ + 0.75, + 0.7, + 0.7 + ], + "seed_sd": 0.029, + "threshold": 0.08 + }, + "tests_recall": { + "mean": 0.305, + "functions": 42, + "boot_lo": 0.211, + "boot_hi": 0.404, + "boot_half": 0.097, + "seeds": [ + 0.231, + 0.326, + 0.458 + ], + "seed_sd": 0.114, + "threshold": 0.1 + }, + "tests_precision": { + "mean": 0.494, + "functions": 42, + "boot_lo": 0.389, + "boot_hi": 0.6, + "boot_half": 0.105, + "seeds": [ + 0.365, + 0.575, + 0.643 + ], + "seed_sd": 0.145, + "threshold": 0.11 + }, + "tests_top10_precision": { + "mean": 0.515, + "functions": 42, + "boot_lo": 0.406, + "boot_hi": 0.621, + "boot_half": 0.107, + "seeds": [ + 0.4, + 0.593, + 0.66 + ], + "seed_sd": 0.135, + "threshold": 0.11 + }, + "tests_top10_best": { + "mean": 0.576, + "functions": 42, + "boot_lo": 0.469, + "boot_hi": 0.686, + "boot_half": 0.109, + "seeds": [ + 0.444, + 0.661, + 0.729 + ], + "seed_sd": 0.149, + "threshold": 0.11 + }, + "tests_caught": { + "mean": 0.738, + "functions": 42, + "boot_lo": 0.619, + "boot_hi": 0.857, + "boot_half": 0.119, + "seeds": [ + 0.688, + 0.812, + 0.812 + ], + "seed_sd": 0.072, + "threshold": 0.12 + }, + "look_vs_file": { + "mean": 0.17, + "functions": 92, + "boot_lo": 0.138, + "boot_hi": 0.205, + "boot_half": 0.034, + "seeds": [ + 0.18, + 0.167, + 0.186 + ], + "seed_sd": 0.01, + "threshold": 0.04 + } + }, + "typescript": { + "callers_recall": { + "mean": 1.0, + "functions": 39, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 1.0, + "functions": 39, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 1.0, + "functions": 34, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "common_recall": { + "mean": 0.65, + "functions": 10, + "boot_lo": 0.4, + "boot_hi": 0.9, + "boot_half": 0.25, + "seeds": [ + 0.688, + 0.688, + 0.688 + ], + "seed_sd": 0.0, + "threshold": 0.25 + }, + "common_recall_with_maybe": { + "mean": 0.9, + "functions": 10, + "boot_lo": 0.8, + "boot_hi": 1.0, + "boot_half": 0.1, + "seeds": [ + 0.938, + 0.938, + 0.875 + ], + "seed_sd": 0.036, + "threshold": 0.1 + }, + "common_precision": { + "mean": 1.0, + "functions": 7, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.15 + }, + "rename_ok": { + "mean": 0.7, + "functions": 40, + "boot_lo": 0.575, + "boot_hi": 0.825, + "boot_half": 0.125, + "seeds": [ + 0.762, + 0.714, + 0.667 + ], + "seed_sd": 0.048, + "threshold": 0.13 + }, + "tests_recall": { + "mean": 0.033, + "functions": 22, + "boot_lo": 0.01, + "boot_hi": 0.063, + "boot_half": 0.027, + "seeds": [ + 0.043, + 0.054, + 0.058 + ], + "seed_sd": 0.008, + "threshold": 0.05 + }, + "tests_precision": { + "mean": 0.197, + "functions": 22, + "boot_lo": 0.091, + "boot_hi": 0.326, + "boot_half": 0.117, + "seeds": [ + 0.167, + 0.296, + 0.241 + ], + "seed_sd": 0.065, + "threshold": 0.12 + }, + "tests_top10_precision": { + "mean": 0.197, + "functions": 22, + "boot_lo": 0.091, + "boot_hi": 0.326, + "boot_half": 0.117, + "seeds": [ + 0.167, + 0.296, + 0.241 + ], + "seed_sd": 0.065, + "threshold": 0.12 + }, + "tests_top10_best": { + "mean": 0.197, + "functions": 22, + "boot_lo": 0.091, + "boot_hi": 0.326, + "boot_half": 0.117, + "seeds": [ + 0.167, + 0.296, + 0.241 + ], + "seed_sd": 0.065, + "threshold": 0.12 + }, + "tests_caught": { + "mean": 0.273, + "functions": 22, + "boot_lo": 0.136, + "boot_hi": 0.455, + "boot_half": 0.159, + "seeds": [ + 0.222, + 0.333, + 0.333 + ], + "seed_sd": 0.064, + "threshold": 0.16 + }, + "look_vs_file": { + "mean": 0.535, + "functions": 40, + "boot_lo": 0.425, + "boot_hi": 0.65, + "boot_half": 0.112, + "seeds": [ + 0.56, + 0.483, + 0.476 + ], + "seed_sd": 0.046, + "threshold": 0.12 + } + }, + "java": { + "callers_recall": { + "mean": 0.998, + "functions": 85, + "boot_lo": 0.993, + "boot_hi": 1.0, + "boot_half": 0.004, + "seeds": [ + 1.0, + 0.995, + 0.995 + ], + "seed_sd": 0.003, + "threshold": 0.02 + }, + "callers_precision": { + "mean": 0.993, + "functions": 85, + "boot_lo": 0.984, + "boot_hi": 1.0, + "boot_half": 0.008, + "seeds": [ + 0.99, + 0.995, + 0.985 + ], + "seed_sd": 0.005, + "threshold": 0.02 + }, + "blind_recall": { + "mean": 0.981, + "functions": 63, + "boot_lo": 0.949, + "boot_hi": 1.0, + "boot_half": 0.025, + "seeds": [ + 1.0, + 0.956, + 0.993 + ], + "seed_sd": 0.024, + "threshold": 0.03 + }, + "common_recall": { + "mean": 0.904, + "functions": 56, + "boot_lo": 0.845, + "boot_hi": 0.958, + "boot_half": 0.056, + "seeds": [ + 0.932, + 0.878, + 0.924 + ], + "seed_sd": 0.029, + "threshold": 0.06 + }, + "common_recall_with_maybe": { + "mean": 0.972, + "functions": 56, + "boot_lo": 0.938, + "boot_hi": 0.996, + "boot_half": 0.029, + "seeds": [ + 0.991, + 0.96, + 0.977 + ], + "seed_sd": 0.016, + "threshold": 0.03 + }, + "common_precision": { + "mean": 0.995, + "functions": 52, + "boot_lo": 0.984, + "boot_hi": 1.0, + "boot_half": 0.008, + "seeds": [ + 1.0, + 1.0, + 0.988 + ], + "seed_sd": 0.007, + "threshold": 0.02 + }, + "rename_ok": { + "mean": 0.965, + "functions": 86, + "boot_lo": 0.93, + "boot_hi": 0.988, + "boot_half": 0.029, + "seeds": [ + 0.925, + 0.975, + 0.975 + ], + "seed_sd": 0.029, + "threshold": 0.03 + }, + "tests_recall": { + "mean": 0.489, + "functions": 43, + "boot_lo": 0.376, + "boot_hi": 0.599, + "boot_half": 0.111, + "seeds": [ + 0.433, + 0.597, + 0.476 + ], + "seed_sd": 0.085, + "threshold": 0.12 + }, + "tests_precision": { + "mean": 0.608, + "functions": 43, + "boot_lo": 0.513, + "boot_hi": 0.705, + "boot_half": 0.096, + "seeds": [ + 0.594, + 0.52, + 0.706 + ], + "seed_sd": 0.094, + "threshold": 0.1 + }, + "tests_top10_precision": { + "mean": 0.673, + "functions": 43, + "boot_lo": 0.589, + "boot_hi": 0.759, + "boot_half": 0.085, + "seeds": [ + 0.639, + 0.656, + 0.733 + ], + "seed_sd": 0.05, + "threshold": 0.09 + }, + "tests_top10_best": { + "mean": 0.798, + "functions": 43, + "boot_lo": 0.718, + "boot_hi": 0.877, + "boot_half": 0.08, + "seeds": [ + 0.739, + 0.775, + 0.908 + ], + "seed_sd": 0.089, + "threshold": 0.08 + }, + "tests_caught": { + "mean": 0.953, + "functions": 43, + "boot_lo": 0.884, + "boot_hi": 1.0, + "boot_half": 0.058, + "seeds": [ + 0.938, + 0.938, + 1.0 + ], + "seed_sd": 0.036, + "threshold": 0.06 + }, + "look_vs_file": { + "mean": 0.138, + "functions": 86, + "boot_lo": 0.109, + "boot_hi": 0.17, + "boot_half": 0.031, + "seeds": [ + 0.143, + 0.129, + 0.125 + ], + "seed_sd": 0.01, + "threshold": 0.04 + } + }, + "rust": { + "callers_recall": { + "mean": 0.993, + "functions": 37, + "boot_lo": 0.982, + "boot_hi": 1.0, + "boot_half": 0.009, + "seeds": [ + 0.992, + 0.988, + 0.989 + ], + "seed_sd": 0.002, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 1.0, + "functions": 37, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 0.997, + "functions": 26, + "boot_lo": 0.991, + "boot_hi": 1.0, + "boot_half": 0.004, + "seeds": [ + 1.0, + 1.0, + 0.995 + ], + "seed_sd": 0.003, + "threshold": 0.04 + }, + "common_recall": { + "mean": 0.798, + "functions": 31, + "boot_lo": 0.685, + "boot_hi": 0.903, + "boot_half": 0.109, + "seeds": [ + 0.875, + 0.909, + 0.692 + ], + "seed_sd": 0.117, + "threshold": 0.11 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 31, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_precision": { + "mean": 0.992, + "functions": 26, + "boot_lo": 0.977, + "boot_hi": 1.0, + "boot_half": 0.012, + "seeds": [ + 1.0, + 0.98, + 1.0 + ], + "seed_sd": 0.012, + "threshold": 0.04 + }, + "rename_ok": { + "mean": 0.737, + "functions": 38, + "boot_lo": 0.605, + "boot_hi": 0.842, + "boot_half": 0.118, + "seeds": [ + 0.84, + 0.8, + 0.68 + ], + "seed_sd": 0.083, + "threshold": 0.12 + }, + "tests_recall": { + "mean": 0.528, + "functions": 22, + "boot_lo": 0.392, + "boot_hi": 0.667, + "boot_half": 0.137, + "seeds": [ + 0.539, + 0.548, + 0.614 + ], + "seed_sd": 0.041, + "threshold": 0.14 + }, + "tests_precision": { + "mean": 0.434, + "functions": 22, + "boot_lo": 0.304, + "boot_hi": 0.572, + "boot_half": 0.134, + "seeds": [ + 0.395, + 0.592, + 0.405 + ], + "seed_sd": 0.111, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.438, + "functions": 22, + "boot_lo": 0.305, + "boot_hi": 0.576, + "boot_half": 0.136, + "seeds": [ + 0.403, + 0.6, + 0.413 + ], + "seed_sd": 0.111, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.438, + "functions": 22, + "boot_lo": 0.305, + "boot_hi": 0.576, + "boot_half": 0.136, + "seeds": [ + 0.403, + 0.6, + 0.413 + ], + "seed_sd": 0.111, + "threshold": 0.14 + }, + "tests_caught": { + "mean": 0.727, + "functions": 22, + "boot_lo": 0.591, + "boot_hi": 0.864, + "boot_half": 0.136, + "seeds": [ + 0.727, + 0.818, + 0.727 + ], + "seed_sd": 0.052, + "threshold": 0.14 + }, + "look_vs_file": { + "mean": 0.136, + "functions": 38, + "boot_lo": 0.087, + "boot_hi": 0.193, + "boot_half": 0.053, + "seeds": [ + 0.157, + 0.126, + 0.106 + ], + "seed_sd": 0.026, + "threshold": 0.06 + } + } + }, + "repos": [ + { + "repo": "cobra", + "lang": "go", + "commit": "adbc8813901b", + "symbols": 288, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 12, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.96, + "callers_checked": 45, + "blind_recall": 1.0, + "blind_checked": 31, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 0.87, + "rename_checked": 46, + "tests_recall": 0.89, + "tests_precision": 0.362, + "tests_top10_precision": 0.442, + "tests_top10_best": 0.785, + "tests_caught": 0.81, + "tests_checked": 21, + "look_vs_file": 0.071 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 0.95, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 12, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 0.9, + "rename_checked": 20, + "tests_recall": 0.839, + "tests_precision": 0.4, + "tests_top10_precision": 0.436, + "tests_top10_best": 0.824, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.055 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 15, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 1.0, + "rename_checked": 20, + "tests_recall": 0.991, + "tests_precision": 0.303, + "tests_top10_precision": 0.4, + "tests_top10_best": 0.738, + "tests_caught": 0.625, + "tests_checked": 8, + "look_vs_file": 0.1 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 0.958, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 10, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 0.8, + "rename_checked": 20, + "tests_recall": 0.763, + "tests_precision": 0.413, + "tests_top10_precision": 0.486, + "tests_top10_best": 0.749, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.049 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 45, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 0.96, + "functions": 45, + "boot_lo": 0.924, + "boot_hi": 0.994, + "boot_half": 0.035, + "seeds": [ + 0.95, + 1.0, + 0.958 + ], + "seed_sd": 0.027, + "threshold": 0.04 + }, + "blind_recall": { + "mean": 1.0, + "functions": 31, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_recall": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "common_precision": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "rename_ok": { + "mean": 0.87, + "functions": 46, + "boot_lo": 0.783, + "boot_hi": 0.935, + "boot_half": 0.076, + "seeds": [ + 0.9, + 1.0, + 0.8 + ], + "seed_sd": 0.1, + "threshold": 0.08 + }, + "tests_recall": { + "mean": 0.89, + "functions": 21, + "boot_lo": 0.794, + "boot_hi": 0.977, + "boot_half": 0.091, + "seeds": [ + 0.839, + 0.991, + 0.763 + ], + "seed_sd": 0.116, + "threshold": 0.1 + }, + "tests_precision": { + "mean": 0.362, + "functions": 21, + "boot_lo": 0.244, + "boot_hi": 0.486, + "boot_half": 0.121, + "seeds": [ + 0.4, + 0.303, + 0.413 + ], + "seed_sd": 0.06, + "threshold": 0.13 + }, + "tests_top10_precision": { + "mean": 0.442, + "functions": 21, + "boot_lo": 0.305, + "boot_hi": 0.576, + "boot_half": 0.135, + "seeds": [ + 0.436, + 0.4, + 0.486 + ], + "seed_sd": 0.043, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.785, + "functions": 21, + "boot_lo": 0.665, + "boot_hi": 0.895, + "boot_half": 0.115, + "seeds": [ + 0.824, + 0.738, + 0.749 + ], + "seed_sd": 0.047, + "threshold": 0.12 + }, + "tests_caught": { + "mean": 0.81, + "functions": 21, + "boot_lo": 0.667, + "boot_hi": 0.952, + "boot_half": 0.143, + "seeds": [ + 0.75, + 0.625, + 1.0 + ], + "seed_sd": 0.191, + "threshold": 0.15 + }, + "look_vs_file": { + "mean": 0.071, + "functions": 46, + "boot_lo": 0.043, + "boot_hi": 0.1, + "boot_half": 0.029, + "seeds": [ + 0.055, + 0.1, + 0.049 + ], + "seed_sd": 0.028, + "threshold": 0.03 + } + } + }, + { + "repo": "chi", + "lang": "go", + "commit": "c64ed7d6635f", + "symbols": 351, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 7, + "summary": { + "callers_recall": 1.0, + "callers_precision": 0.967, + "callers_checked": 26, + "blind_recall": 1.0, + "blind_checked": 9, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.943, + "rename_checked": 35, + "tests_recall": 0.661, + "tests_precision": 0.614, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.711, + "tests_caught": 0.875, + "tests_checked": 16, + "look_vs_file": 0.219 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 0.943, + "callers_checked": 15, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.587, + "tests_precision": 0.725, + "tests_top10_precision": 0.75, + "tests_top10_best": 0.75, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.258 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 14, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.654, + "tests_precision": 0.544, + "tests_top10_precision": 0.609, + "tests_top10_best": 0.684, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.238 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 0.943, + "callers_checked": 15, + "blind_recall": 1.0, + "blind_checked": 3, + "common_recall": 0.7, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.9, + "rename_checked": 20, + "tests_recall": 0.77, + "tests_precision": 0.602, + "tests_top10_precision": 0.672, + "tests_top10_best": 0.684, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.22 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 26, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "callers_precision": { + "mean": 0.967, + "functions": 26, + "boot_lo": 0.901, + "boot_hi": 1.0, + "boot_half": 0.049, + "seeds": [ + 0.943, + 1.0, + 0.943 + ], + "seed_sd": 0.033, + "threshold": 0.05 + }, + "blind_recall": { + "mean": 1.0, + "functions": 9, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.12 + }, + "common_recall": { + "mean": 0.7, + "functions": 10, + "boot_lo": 0.5, + "boot_hi": 0.9, + "boot_half": 0.2, + "seeds": [ + 0.7, + 0.7, + 0.7 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 10, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.1 + }, + "common_precision": { + "mean": 1.0, + "functions": 7, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.15 + }, + "rename_ok": { + "mean": 0.943, + "functions": 35, + "boot_lo": 0.886, + "boot_hi": 1.0, + "boot_half": 0.057, + "seeds": [ + 0.95, + 0.95, + 0.9 + ], + "seed_sd": 0.029, + "threshold": 0.06 + }, + "tests_recall": { + "mean": 0.661, + "functions": 16, + "boot_lo": 0.508, + "boot_hi": 0.803, + "boot_half": 0.148, + "seeds": [ + 0.587, + 0.654, + 0.77 + ], + "seed_sd": 0.093, + "threshold": 0.15 + }, + "tests_precision": { + "mean": 0.614, + "functions": 16, + "boot_lo": 0.443, + "boot_hi": 0.777, + "boot_half": 0.167, + "seeds": [ + 0.725, + 0.544, + 0.602 + ], + "seed_sd": 0.093, + "threshold": 0.17 + }, + "tests_top10_precision": { + "mean": 0.667, + "functions": 16, + "boot_lo": 0.509, + "boot_hi": 0.823, + "boot_half": 0.157, + "seeds": [ + 0.75, + 0.609, + 0.672 + ], + "seed_sd": 0.07, + "threshold": 0.16 + }, + "tests_top10_best": { + "mean": 0.711, + "functions": 16, + "boot_lo": 0.55, + "boot_hi": 0.861, + "boot_half": 0.155, + "seeds": [ + 0.75, + 0.684, + 0.684 + ], + "seed_sd": 0.038, + "threshold": 0.16 + }, + "tests_caught": { + "mean": 0.875, + "functions": 16, + "boot_lo": 0.75, + "boot_hi": 1.0, + "boot_half": 0.125, + "seeds": [ + 0.75, + 0.875, + 1.0 + ], + "seed_sd": 0.125, + "threshold": 0.13 + }, + "look_vs_file": { + "mean": 0.219, + "functions": 35, + "boot_lo": 0.156, + "boot_hi": 0.294, + "boot_half": 0.069, + "seeds": [ + 0.258, + 0.238, + 0.22 + ], + "seed_sd": 0.019, + "threshold": 0.07 + } + } + }, + { + "repo": "click", + "lang": "python", + "commit": "8abb77a8432e", + "symbols": 761, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 15, + "summary": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.66, + "rename_checked": 50, + "tests_recall": 0.212, + "tests_precision": 0.384, + "tests_top10_precision": 0.405, + "tests_top10_best": 0.5, + "tests_caught": 0.696, + "tests_checked": 23, + "look_vs_file": 0.084 + }, + "summary_seeds": { + "7": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.7, + "rename_checked": 20, + "tests_recall": 0.152, + "tests_precision": 0.224, + "tests_top10_precision": 0.275, + "tests_top10_best": 0.362, + "tests_caught": 0.625, + "tests_checked": 8, + "look_vs_file": 0.093 + }, + "8": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.65, + "rename_checked": 20, + "tests_recall": 0.238, + "tests_precision": 0.445, + "tests_top10_precision": 0.448, + "tests_top10_best": 0.535, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.057 + }, + "9": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.65, + "rename_checked": 20, + "tests_recall": 0.298, + "tests_precision": 0.539, + "tests_top10_precision": 0.545, + "tests_top10_best": 0.645, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.085 + } + }, + "noise": { + "callers_recall": null, + "callers_precision": null, + "blind_recall": null, + "common_recall": null, + "common_recall_with_maybe": null, + "common_precision": null, + "rename_ok": { + "mean": 0.66, + "functions": 50, + "boot_lo": 0.54, + "boot_hi": 0.76, + "boot_half": 0.11, + "seeds": [ + 0.7, + 0.65, + 0.65 + ], + "seed_sd": 0.029, + "threshold": 0.11 + }, + "tests_recall": { + "mean": 0.212, + "functions": 23, + "boot_lo": 0.117, + "boot_hi": 0.321, + "boot_half": 0.102, + "seeds": [ + 0.152, + 0.238, + 0.298 + ], + "seed_sd": 0.073, + "threshold": 0.11 + }, + "tests_precision": { + "mean": 0.384, + "functions": 23, + "boot_lo": 0.247, + "boot_hi": 0.525, + "boot_half": 0.139, + "seeds": [ + 0.224, + 0.445, + 0.539 + ], + "seed_sd": 0.162, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.405, + "functions": 23, + "boot_lo": 0.267, + "boot_hi": 0.547, + "boot_half": 0.14, + "seeds": [ + 0.275, + 0.448, + 0.545 + ], + "seed_sd": 0.137, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.5, + "functions": 23, + "boot_lo": 0.355, + "boot_hi": 0.651, + "boot_half": 0.148, + "seeds": [ + 0.362, + 0.535, + 0.645 + ], + "seed_sd": 0.142, + "threshold": 0.15 + }, + "tests_caught": { + "mean": 0.696, + "functions": 23, + "boot_lo": 0.522, + "boot_hi": 0.87, + "boot_half": 0.174, + "seeds": [ + 0.625, + 0.75, + 0.75 + ], + "seed_sd": 0.072, + "threshold": 0.18 + }, + "look_vs_file": { + "mean": 0.084, + "functions": 50, + "boot_lo": 0.066, + "boot_hi": 0.103, + "boot_half": 0.019, + "seeds": [ + 0.093, + 0.057, + 0.085 + ], + "seed_sd": 0.019, + "threshold": 0.02 + } + } + }, + { + "repo": "sqlparse", + "lang": "python", + "commit": "09dbe1eec31e", + "symbols": 287, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 6, + "summary": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.81, + "rename_checked": 42, + "tests_recall": 0.417, + "tests_precision": 0.626, + "tests_top10_precision": 0.648, + "tests_top10_best": 0.669, + "tests_caught": 0.789, + "tests_checked": 19, + "look_vs_file": 0.273 + }, + "summary_seeds": { + "7": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.8, + "rename_checked": 20, + "tests_recall": 0.31, + "tests_precision": 0.507, + "tests_top10_precision": 0.525, + "tests_top10_best": 0.525, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.266 + }, + "8": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.75, + "rename_checked": 20, + "tests_recall": 0.415, + "tests_precision": 0.704, + "tests_top10_precision": 0.738, + "tests_top10_best": 0.787, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.277 + }, + "9": { + "callers_recall": null, + "callers_precision": null, + "callers_checked": 0, + "blind_recall": null, + "blind_checked": 0, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 0.75, + "rename_checked": 20, + "tests_recall": 0.618, + "tests_precision": 0.747, + "tests_top10_precision": 0.775, + "tests_top10_best": 0.812, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.287 + } + }, + "noise": { + "callers_recall": null, + "callers_precision": null, + "blind_recall": null, + "common_recall": null, + "common_recall_with_maybe": null, + "common_precision": null, + "rename_ok": { + "mean": 0.81, + "functions": 42, + "boot_lo": 0.714, + "boot_hi": 0.905, + "boot_half": 0.095, + "seeds": [ + 0.8, + 0.75, + 0.75 + ], + "seed_sd": 0.029, + "threshold": 0.1 + }, + "tests_recall": { + "mean": 0.417, + "functions": 19, + "boot_lo": 0.264, + "boot_hi": 0.575, + "boot_half": 0.156, + "seeds": [ + 0.31, + 0.415, + 0.618 + ], + "seed_sd": 0.157, + "threshold": 0.16 + }, + "tests_precision": { + "mean": 0.626, + "functions": 19, + "boot_lo": 0.474, + "boot_hi": 0.767, + "boot_half": 0.147, + "seeds": [ + 0.507, + 0.704, + 0.747 + ], + "seed_sd": 0.128, + "threshold": 0.15 + }, + "tests_top10_precision": { + "mean": 0.648, + "functions": 19, + "boot_lo": 0.489, + "boot_hi": 0.791, + "boot_half": 0.151, + "seeds": [ + 0.525, + 0.738, + 0.775 + ], + "seed_sd": 0.135, + "threshold": 0.16 + }, + "tests_top10_best": { + "mean": 0.669, + "functions": 19, + "boot_lo": 0.507, + "boot_hi": 0.821, + "boot_half": 0.157, + "seeds": [ + 0.525, + 0.787, + 0.812 + ], + "seed_sd": 0.159, + "threshold": 0.16 + }, + "tests_caught": { + "mean": 0.789, + "functions": 19, + "boot_lo": 0.632, + "boot_hi": 0.947, + "boot_half": 0.158, + "seeds": [ + 0.75, + 0.875, + 0.875 + ], + "seed_sd": 0.072, + "threshold": 0.16 + }, + "look_vs_file": { + "mean": 0.273, + "functions": 42, + "boot_lo": 0.215, + "boot_hi": 0.333, + "boot_half": 0.059, + "seeds": [ + 0.266, + 0.277, + 0.287 + ], + "seed_sd": 0.01, + "threshold": 0.06 + } + } + }, + { + "repo": "zustand", + "lang": "typescript", + "commit": "9fed2eb2f3af", + "symbols": 175, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 1, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 1, + "blind_recall": 1.0, + "blind_checked": 1, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": 0.333, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_top10_best": 1.0, + "tests_caught": 1.0, + "tests_checked": 1, + "look_vs_file": 0.121 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 1, + "blind_recall": 1.0, + "blind_checked": 1, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": 0.333, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_top10_best": 1.0, + "tests_caught": 1.0, + "tests_checked": 1, + "look_vs_file": 0.121 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 1, + "blind_recall": 1.0, + "blind_checked": 1, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": 0.333, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_top10_best": 1.0, + "tests_caught": 1.0, + "tests_checked": 1, + "look_vs_file": 0.121 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 1, + "blind_recall": 1.0, + "blind_checked": 1, + "common_recall": null, + "common_precision": null, + "common_recall_with_maybe": null, + "common_checked": 0, + "rename_ok": 1.0, + "rename_checked": 1, + "tests_recall": 0.333, + "tests_precision": 1.0, + "tests_top10_precision": 1.0, + "tests_top10_best": 1.0, + "tests_caught": 1.0, + "tests_checked": 1, + "look_vs_file": 0.121 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "callers_precision": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "blind_recall": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "common_recall": null, + "common_recall_with_maybe": null, + "common_precision": null, + "rename_ok": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "tests_recall": { + "mean": 0.333, + "functions": 1, + "boot_lo": 0.333, + "boot_hi": 0.333, + "boot_half": 0.0, + "seeds": [ + 0.333, + 0.333, + 0.333 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "tests_precision": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "tests_top10_precision": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "tests_top10_best": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "tests_caught": { + "mean": 1.0, + "functions": 1, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 1.0 + }, + "look_vs_file": { + "mean": 0.121, + "functions": 1, + "boot_lo": 0.121, + "boot_hi": 0.121, + "boot_half": 0.0, + "seeds": [ + 0.121, + 0.121, + 0.121 + ], + "seed_sd": 0.0, + "threshold": 0.0 + } + } + }, + { + "repo": "yaml", + "lang": "typescript", + "commit": "528ef30d6ded", + "symbols": 440, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 7, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 38, + "blind_recall": 1.0, + "blind_checked": 33, + "common_recall": 0.65, + "common_precision": 1.0, + "common_recall_with_maybe": 0.9, + "common_checked": 10, + "rename_ok": 0.692, + "rename_checked": 39, + "tests_recall": 0.019, + "tests_precision": 0.159, + "tests_top10_precision": 0.159, + "tests_top10_best": 0.159, + "tests_caught": 0.238, + "tests_checked": 21, + "look_vs_file": 0.546 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 17, + "common_recall": 0.688, + "common_precision": 1.0, + "common_recall_with_maybe": 0.938, + "common_checked": 8, + "rename_ok": 0.75, + "rename_checked": 20, + "tests_recall": 0.007, + "tests_precision": 0.062, + "tests_top10_precision": 0.062, + "tests_top10_best": 0.062, + "tests_caught": 0.125, + "tests_checked": 8, + "look_vs_file": 0.581 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 16, + "common_recall": 0.688, + "common_precision": 1.0, + "common_recall_with_maybe": 0.938, + "common_checked": 8, + "rename_ok": 0.7, + "rename_checked": 20, + "tests_recall": 0.019, + "tests_precision": 0.208, + "tests_top10_precision": 0.208, + "tests_top10_best": 0.208, + "tests_caught": 0.25, + "tests_checked": 8, + "look_vs_file": 0.502 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 15, + "common_recall": 0.688, + "common_precision": 1.0, + "common_recall_with_maybe": 0.875, + "common_checked": 8, + "rename_ok": 0.65, + "rename_checked": 20, + "tests_recall": 0.024, + "tests_precision": 0.146, + "tests_top10_precision": 0.146, + "tests_top10_best": 0.146, + "tests_caught": 0.25, + "tests_checked": 8, + "look_vs_file": 0.494 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 38, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 1.0, + "functions": 38, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 1.0, + "functions": 33, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_recall": { + "mean": 0.65, + "functions": 10, + "boot_lo": 0.4, + "boot_hi": 0.9, + "boot_half": 0.25, + "seeds": [ + 0.688, + 0.688, + 0.688 + ], + "seed_sd": 0.0, + "threshold": 0.25 + }, + "common_recall_with_maybe": { + "mean": 0.9, + "functions": 10, + "boot_lo": 0.8, + "boot_hi": 1.0, + "boot_half": 0.1, + "seeds": [ + 0.938, + 0.938, + 0.875 + ], + "seed_sd": 0.036, + "threshold": 0.1 + }, + "common_precision": { + "mean": 1.0, + "functions": 7, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.15 + }, + "rename_ok": { + "mean": 0.692, + "functions": 39, + "boot_lo": 0.564, + "boot_hi": 0.821, + "boot_half": 0.128, + "seeds": [ + 0.75, + 0.7, + 0.65 + ], + "seed_sd": 0.05, + "threshold": 0.13 + }, + "tests_recall": { + "mean": 0.019, + "functions": 21, + "boot_lo": 0.005, + "boot_hi": 0.033, + "boot_half": 0.014, + "seeds": [ + 0.007, + 0.019, + 0.024 + ], + "seed_sd": 0.009, + "threshold": 0.05 + }, + "tests_precision": { + "mean": 0.159, + "functions": 21, + "boot_lo": 0.056, + "boot_hi": 0.27, + "boot_half": 0.107, + "seeds": [ + 0.062, + 0.208, + 0.146 + ], + "seed_sd": 0.073, + "threshold": 0.11 + }, + "tests_top10_precision": { + "mean": 0.159, + "functions": 21, + "boot_lo": 0.056, + "boot_hi": 0.27, + "boot_half": 0.107, + "seeds": [ + 0.062, + 0.208, + 0.146 + ], + "seed_sd": 0.073, + "threshold": 0.11 + }, + "tests_top10_best": { + "mean": 0.159, + "functions": 21, + "boot_lo": 0.056, + "boot_hi": 0.27, + "boot_half": 0.107, + "seeds": [ + 0.062, + 0.208, + 0.146 + ], + "seed_sd": 0.073, + "threshold": 0.11 + }, + "tests_caught": { + "mean": 0.238, + "functions": 21, + "boot_lo": 0.095, + "boot_hi": 0.381, + "boot_half": 0.143, + "seeds": [ + 0.125, + 0.25, + 0.25 + ], + "seed_sd": 0.072, + "threshold": 0.15 + }, + "look_vs_file": { + "mean": 0.546, + "functions": 39, + "boot_lo": 0.44, + "boot_hi": 0.663, + "boot_half": 0.112, + "seeds": [ + 0.581, + 0.502, + 0.494 + ], + "seed_sd": 0.049, + "threshold": 0.12 + } + } + }, + { + "repo": "jsoup", + "lang": "java", + "commit": "d90d57521d93", + "symbols": 2663, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 117, + "summary": { + "callers_recall": 0.996, + "callers_precision": 0.988, + "callers_checked": 49, + "blind_recall": 0.966, + "blind_checked": 35, + "common_recall": 0.866, + "common_precision": 0.992, + "common_recall_with_maybe": 0.961, + "common_checked": 40, + "rename_ok": 0.959, + "rename_checked": 49, + "tests_recall": 0.264, + "tests_precision": 0.697, + "tests_top10_precision": 0.692, + "tests_top10_best": 0.773, + "tests_caught": 0.905, + "tests_checked": 21, + "look_vs_file": 0.166 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 0.98, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 10, + "common_recall": 0.885, + "common_precision": 1.0, + "common_recall_with_maybe": 0.984, + "common_checked": 16, + "rename_ok": 0.9, + "rename_checked": 20, + "tests_recall": 0.112, + "tests_precision": 0.653, + "tests_top10_precision": 0.629, + "tests_top10_best": 0.741, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.199 + }, + "8": { + "callers_recall": 0.99, + "callers_precision": 0.99, + "callers_checked": 20, + "blind_recall": 0.92, + "blind_checked": 15, + "common_recall": 0.794, + "common_precision": 1.0, + "common_recall_with_maybe": 0.932, + "common_checked": 16, + "rename_ok": 1.0, + "rename_checked": 20, + "tests_recall": 0.424, + "tests_precision": 0.65, + "tests_top10_precision": 0.662, + "tests_top10_best": 0.7, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.152 + }, + "9": { + "callers_recall": 0.99, + "callers_precision": 0.97, + "callers_checked": 20, + "blind_recall": 0.987, + "blind_checked": 15, + "common_recall": 0.865, + "common_precision": 0.978, + "common_recall_with_maybe": 0.96, + "common_checked": 14, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.293, + "tests_precision": 0.826, + "tests_top10_precision": 0.816, + "tests_top10_best": 0.891, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.127 + } + }, + "noise": { + "callers_recall": { + "mean": 0.996, + "functions": 49, + "boot_lo": 0.988, + "boot_hi": 1.0, + "boot_half": 0.006, + "seeds": [ + 1.0, + 0.99, + 0.99 + ], + "seed_sd": 0.006, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 0.988, + "functions": 49, + "boot_lo": 0.971, + "boot_hi": 1.0, + "boot_half": 0.014, + "seeds": [ + 0.98, + 0.99, + 0.97 + ], + "seed_sd": 0.01, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 0.966, + "functions": 35, + "boot_lo": 0.909, + "boot_hi": 1.0, + "boot_half": 0.046, + "seeds": [ + 1.0, + 0.92, + 0.987 + ], + "seed_sd": 0.043, + "threshold": 0.05 + }, + "common_recall": { + "mean": 0.866, + "functions": 40, + "boot_lo": 0.785, + "boot_hi": 0.942, + "boot_half": 0.078, + "seeds": [ + 0.885, + 0.794, + 0.865 + ], + "seed_sd": 0.048, + "threshold": 0.08 + }, + "common_recall_with_maybe": { + "mean": 0.961, + "functions": 40, + "boot_lo": 0.912, + "boot_hi": 0.994, + "boot_half": 0.041, + "seeds": [ + 0.984, + 0.932, + 0.96 + ], + "seed_sd": 0.026, + "threshold": 0.05 + }, + "common_precision": { + "mean": 0.992, + "functions": 36, + "boot_lo": 0.976, + "boot_hi": 1.0, + "boot_half": 0.012, + "seeds": [ + 1.0, + 1.0, + 0.978 + ], + "seed_sd": 0.013, + "threshold": 0.03 + }, + "rename_ok": { + "mean": 0.959, + "functions": 49, + "boot_lo": 0.898, + "boot_hi": 1.0, + "boot_half": 0.051, + "seeds": [ + 0.9, + 1.0, + 0.95 + ], + "seed_sd": 0.05, + "threshold": 0.06 + }, + "tests_recall": { + "mean": 0.264, + "functions": 21, + "boot_lo": 0.142, + "boot_hi": 0.396, + "boot_half": 0.127, + "seeds": [ + 0.112, + 0.424, + 0.293 + ], + "seed_sd": 0.157, + "threshold": 0.13 + }, + "tests_precision": { + "mean": 0.697, + "functions": 21, + "boot_lo": 0.561, + "boot_hi": 0.823, + "boot_half": 0.131, + "seeds": [ + 0.653, + 0.65, + 0.826 + ], + "seed_sd": 0.101, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.692, + "functions": 21, + "boot_lo": 0.554, + "boot_hi": 0.82, + "boot_half": 0.133, + "seeds": [ + 0.629, + 0.662, + 0.816 + ], + "seed_sd": 0.1, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.773, + "functions": 21, + "boot_lo": 0.641, + "boot_hi": 0.89, + "boot_half": 0.125, + "seeds": [ + 0.741, + 0.7, + 0.891 + ], + "seed_sd": 0.101, + "threshold": 0.13 + }, + "tests_caught": { + "mean": 0.905, + "functions": 21, + "boot_lo": 0.762, + "boot_hi": 1.0, + "boot_half": 0.119, + "seeds": [ + 0.875, + 0.875, + 1.0 + ], + "seed_sd": 0.072, + "threshold": 0.12 + }, + "look_vs_file": { + "mean": 0.166, + "functions": 49, + "boot_lo": 0.12, + "boot_hi": 0.22, + "boot_half": 0.05, + "seeds": [ + 0.199, + 0.152, + 0.127 + ], + "seed_sd": 0.036, + "threshold": 0.06 + } + } + }, + { + "repo": "json-java", + "lang": "java", + "commit": "2cd0a8c2112a", + "symbols": 542, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 16, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 36, + "blind_recall": 1.0, + "blind_checked": 28, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 16, + "rename_ok": 0.973, + "rename_checked": 37, + "tests_recall": 0.703, + "tests_precision": 0.524, + "tests_top10_precision": 0.655, + "tests_top10_best": 0.823, + "tests_caught": 1.0, + "tests_checked": 22, + "look_vs_file": 0.101 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 14, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 11, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.755, + "tests_precision": 0.534, + "tests_top10_precision": 0.65, + "tests_top10_best": 0.738, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.087 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 12, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 11, + "rename_ok": 0.95, + "rename_checked": 20, + "tests_recall": 0.77, + "tests_precision": 0.39, + "tests_top10_precision": 0.65, + "tests_top10_best": 0.85, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.105 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 1.0, + "blind_checked": 13, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 11, + "rename_ok": 1.0, + "rename_checked": 20, + "tests_recall": 0.659, + "tests_precision": 0.586, + "tests_top10_precision": 0.65, + "tests_top10_best": 0.925, + "tests_caught": 1.0, + "tests_checked": 8, + "look_vs_file": 0.123 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 36, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "callers_precision": { + "mean": 1.0, + "functions": 36, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.03 + }, + "blind_recall": { + "mean": 1.0, + "functions": 28, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_recall": { + "mean": 1.0, + "functions": 16, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.07 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 16, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.07 + }, + "common_precision": { + "mean": 1.0, + "functions": 16, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.07 + }, + "rename_ok": { + "mean": 0.973, + "functions": 37, + "boot_lo": 0.919, + "boot_hi": 1.0, + "boot_half": 0.041, + "seeds": [ + 0.95, + 0.95, + 1.0 + ], + "seed_sd": 0.029, + "threshold": 0.05 + }, + "tests_recall": { + "mean": 0.703, + "functions": 22, + "boot_lo": 0.554, + "boot_hi": 0.843, + "boot_half": 0.145, + "seeds": [ + 0.755, + 0.77, + 0.659 + ], + "seed_sd": 0.06, + "threshold": 0.15 + }, + "tests_precision": { + "mean": 0.524, + "functions": 22, + "boot_lo": 0.381, + "boot_hi": 0.659, + "boot_half": 0.139, + "seeds": [ + 0.534, + 0.39, + 0.586 + ], + "seed_sd": 0.102, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.655, + "functions": 22, + "boot_lo": 0.541, + "boot_hi": 0.759, + "boot_half": 0.109, + "seeds": [ + 0.65, + 0.65, + 0.65 + ], + "seed_sd": 0.0, + "threshold": 0.11 + }, + "tests_top10_best": { + "mean": 0.823, + "functions": 22, + "boot_lo": 0.709, + "boot_hi": 0.918, + "boot_half": 0.105, + "seeds": [ + 0.738, + 0.85, + 0.925 + ], + "seed_sd": 0.094, + "threshold": 0.11 + }, + "tests_caught": { + "mean": 1.0, + "functions": 22, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.05 + }, + "look_vs_file": { + "mean": 0.101, + "functions": 37, + "boot_lo": 0.081, + "boot_hi": 0.121, + "boot_half": 0.02, + "seeds": [ + 0.087, + 0.105, + 0.123 + ], + "seed_sd": 0.018, + "threshold": 0.03 + } + } + }, + { + "repo": "semver", + "lang": "rust", + "commit": "280ebcb6edac", + "symbols": 113, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 1, + "summary": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.15 + }, + "summary_seeds": { + "7": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.15 + }, + "8": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 1, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.15 + }, + "9": { + "callers_recall": 1.0, + "callers_precision": 1.0, + "callers_checked": 5, + "blind_recall": 1.0, + "blind_checked": 5, + "common_recall": 1.0, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 2, + "rename_ok": 1.0, + "rename_checked": 5, + "tests_recall": 0.611, + "tests_precision": 0.636, + "tests_top10_precision": 0.667, + "tests_top10_best": 0.667, + "tests_caught": 0.667, + "tests_checked": 3, + "look_vs_file": 0.15 + } + }, + "noise": { + "callers_recall": { + "mean": 1.0, + "functions": 5, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "callers_precision": { + "mean": 1.0, + "functions": 5, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "blind_recall": { + "mean": 1.0, + "functions": 5, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "common_recall": { + "mean": 1.0, + "functions": 2, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.5 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 2, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.5 + }, + "common_precision": { + "mean": 1.0, + "functions": 2, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.5 + }, + "rename_ok": { + "mean": 1.0, + "functions": 5, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.2 + }, + "tests_recall": { + "mean": 0.611, + "functions": 3, + "boot_lo": 0.278, + "boot_hi": 0.944, + "boot_half": 0.333, + "seeds": [ + 0.611, + 0.611, + 0.611 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "tests_precision": { + "mean": 0.636, + "functions": 3, + "boot_lo": 0.303, + "boot_hi": 0.97, + "boot_half": 0.333, + "seeds": [ + 0.636, + 0.636, + 0.636 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "tests_top10_precision": { + "mean": 0.667, + "functions": 3, + "boot_lo": 0.333, + "boot_hi": 1.0, + "boot_half": 0.333, + "seeds": [ + 0.667, + 0.667, + 0.667 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "tests_top10_best": { + "mean": 0.667, + "functions": 3, + "boot_lo": 0.333, + "boot_hi": 1.0, + "boot_half": 0.333, + "seeds": [ + 0.667, + 0.667, + 0.667 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "tests_caught": { + "mean": 0.667, + "functions": 3, + "boot_lo": 0.333, + "boot_hi": 1.0, + "boot_half": 0.333, + "seeds": [ + 0.667, + 0.667, + 0.667 + ], + "seed_sd": 0.0, + "threshold": 0.34 + }, + "look_vs_file": { + "mean": 0.15, + "functions": 5, + "boot_lo": 0.073, + "boot_hi": 0.234, + "boot_half": 0.081, + "seeds": [ + 0.15, + 0.15, + 0.15 + ], + "seed_sd": 0.0, + "threshold": 0.09 + } + } + }, + { + "repo": "indexmap", + "lang": "rust", + "commit": "41a870887c4c", + "symbols": 1026, + "seeds": [ + 7, + 8, + 9 + ], + "seconds": 9, + "summary": { + "callers_recall": 0.991, + "callers_precision": 1.0, + "callers_checked": 32, + "blind_recall": 0.996, + "blind_checked": 21, + "common_recall": 0.784, + "common_precision": 0.992, + "common_recall_with_maybe": 1.0, + "common_checked": 29, + "rename_ok": 0.697, + "rename_checked": 33, + "tests_recall": 0.515, + "tests_precision": 0.402, + "tests_top10_precision": 0.402, + "tests_top10_best": 0.402, + "tests_caught": 0.737, + "tests_checked": 19, + "look_vs_file": 0.134 + }, + "summary_seeds": { + "7": { + "callers_recall": 0.989, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 9, + "common_recall": 0.859, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 16, + "rename_ok": 0.8, + "rename_checked": 20, + "tests_recall": 0.512, + "tests_precision": 0.304, + "tests_top10_precision": 0.304, + "tests_top10_best": 0.304, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.159 + }, + "8": { + "callers_recall": 0.985, + "callers_precision": 1.0, + "callers_checked": 19, + "blind_recall": 1.0, + "blind_checked": 9, + "common_recall": 0.9, + "common_precision": 0.978, + "common_recall_with_maybe": 1.0, + "common_checked": 10, + "rename_ok": 0.75, + "rename_checked": 20, + "tests_recall": 0.524, + "tests_precision": 0.575, + "tests_top10_precision": 0.575, + "tests_top10_best": 0.575, + "tests_caught": 0.875, + "tests_checked": 8, + "look_vs_file": 0.12 + }, + "9": { + "callers_recall": 0.986, + "callers_precision": 1.0, + "callers_checked": 20, + "blind_recall": 0.991, + "blind_checked": 9, + "common_recall": 0.636, + "common_precision": 1.0, + "common_recall_with_maybe": 1.0, + "common_checked": 11, + "rename_ok": 0.6, + "rename_checked": 20, + "tests_recall": 0.615, + "tests_precision": 0.318, + "tests_top10_precision": 0.318, + "tests_top10_best": 0.318, + "tests_caught": 0.75, + "tests_checked": 8, + "look_vs_file": 0.095 + } + }, + "noise": { + "callers_recall": { + "mean": 0.991, + "functions": 32, + "boot_lo": 0.979, + "boot_hi": 1.0, + "boot_half": 0.011, + "seeds": [ + 0.989, + 0.985, + 0.986 + ], + "seed_sd": 0.002, + "threshold": 0.04 + }, + "callers_precision": { + "mean": 1.0, + "functions": 32, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "blind_recall": { + "mean": 0.996, + "functions": 21, + "boot_lo": 0.989, + "boot_hi": 1.0, + "boot_half": 0.005, + "seeds": [ + 1.0, + 1.0, + 0.991 + ], + "seed_sd": 0.005, + "threshold": 0.05 + }, + "common_recall": { + "mean": 0.784, + "functions": 29, + "boot_lo": 0.664, + "boot_hi": 0.897, + "boot_half": 0.116, + "seeds": [ + 0.859, + 0.9, + 0.636 + ], + "seed_sd": 0.142, + "threshold": 0.12 + }, + "common_recall_with_maybe": { + "mean": 1.0, + "functions": 29, + "boot_lo": 1.0, + "boot_hi": 1.0, + "boot_half": 0.0, + "seeds": [ + 1.0, + 1.0, + 1.0 + ], + "seed_sd": 0.0, + "threshold": 0.04 + }, + "common_precision": { + "mean": 0.992, + "functions": 24, + "boot_lo": 0.975, + "boot_hi": 1.0, + "boot_half": 0.013, + "seeds": [ + 1.0, + 0.978, + 1.0 + ], + "seed_sd": 0.013, + "threshold": 0.05 + }, + "rename_ok": { + "mean": 0.697, + "functions": 33, + "boot_lo": 0.576, + "boot_hi": 0.818, + "boot_half": 0.121, + "seeds": [ + 0.8, + 0.75, + 0.6 + ], + "seed_sd": 0.104, + "threshold": 0.13 + }, + "tests_recall": { + "mean": 0.515, + "functions": 19, + "boot_lo": 0.378, + "boot_hi": 0.654, + "boot_half": 0.138, + "seeds": [ + 0.512, + 0.524, + 0.615 + ], + "seed_sd": 0.056, + "threshold": 0.14 + }, + "tests_precision": { + "mean": 0.402, + "functions": 19, + "boot_lo": 0.268, + "boot_hi": 0.534, + "boot_half": 0.133, + "seeds": [ + 0.304, + 0.575, + 0.318 + ], + "seed_sd": 0.153, + "threshold": 0.14 + }, + "tests_top10_precision": { + "mean": 0.402, + "functions": 19, + "boot_lo": 0.268, + "boot_hi": 0.534, + "boot_half": 0.133, + "seeds": [ + 0.304, + 0.575, + 0.318 + ], + "seed_sd": 0.153, + "threshold": 0.14 + }, + "tests_top10_best": { + "mean": 0.402, + "functions": 19, + "boot_lo": 0.268, + "boot_hi": 0.534, + "boot_half": 0.133, + "seeds": [ + 0.304, + 0.575, + 0.318 + ], + "seed_sd": 0.153, + "threshold": 0.14 + }, + "tests_caught": { + "mean": 0.737, + "functions": 19, + "boot_lo": 0.579, + "boot_hi": 0.895, + "boot_half": 0.158, + "seeds": [ + 0.75, + 0.875, + 0.75 + ], + "seed_sd": 0.072, + "threshold": 0.16 + }, + "look_vs_file": { + "mean": 0.134, + "functions": 33, + "boot_lo": 0.079, + "boot_hi": 0.198, + "boot_half": 0.059, + "seeds": [ + 0.159, + 0.12, + 0.095 + ], + "seed_sd": 0.032, + "threshold": 0.06 + } + } + } + ] +} diff --git a/eval/results/smoke.json b/eval/results/smoke.json new file mode 100644 index 0000000..49e1edf --- /dev/null +++ b/eval/results/smoke.json @@ -0,0 +1,9462 @@ +[ + { + "repo": "cobra", + "lang": "go", + "cmd": "status", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 247, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "log", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 94, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "diff", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "index", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 68, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "map

", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 10166, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 569, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 27801, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "read", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 621, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "show", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 549, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "search", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 209, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "search --text", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1324, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "symbols ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 546, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 124, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "callees", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 156, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "impact", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 414, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "hierarchy", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "deps", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 41, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "context", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1406, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "since", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "locate", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 708, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "history", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 175, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "changelog", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.2, + "bytes": 1404, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 1602, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "activity", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 521, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "hotspots", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1620, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "dead", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2087, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "cycles", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 96, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "entrypoints", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 25, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "journal", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 73, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "brief", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 242, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "libs", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 491, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1471, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 624, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 153, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "look <3 targets>", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2957, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "doctor", + "ok": true, + "crashed": false, + "code": 1, + "seconds": 0.0, + "bytes": 636, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "ops", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 3078, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "branches", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 145, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "timeline", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1037, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1100, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "digest", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 72, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "--json look", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1471, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "--json callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 690, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "--json overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1602, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "--json tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1100, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "bench", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 764, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "edit replace", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 24, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "rename", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 409, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "diff (after rename)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 328, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "ops (after edits)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 269, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "add", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "status (staged)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 581, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "msg", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 54, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "commit", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 148, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "undo", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 138, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "reset ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "cmd": "undo --op 1", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 189, + "note": "" + }, + { + "repo": "cobra", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp look", + "ok": true, + "seconds": 0.0, + "bytes": 2145, + "note": "=== main::GetActiveHelpConfig" + }, + { + "repo": "cobra", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp overview", + "ok": true, + "seconds": 0.0, + "bytes": 1602, + "note": "cobra · 36 code files (go) · 288 functions and types · 325 tests · ≈128k tokens of source" + }, + { + "repo": "cobra", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp brief", + "ok": true, + "seconds": 0.0, + "bytes": 234, + "note": "# brief · cobra · branch HEAD · 36 code files" + }, + { + "repo": "cobra", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp entrypoints", + "ok": true, + "seconds": 0.0, + "bytes": 25, + "note": "no entry points detected" + }, + { + "repo": "cobra", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp map", + "ok": true, + "seconds": 0.0, + "bytes": 10166, + "note": "# `/ (repository root)`" + }, + { + "repo": "cobra", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp outline", + "ok": true, + "seconds": 0.0, + "bytes": 569, + "note": "# active_help.go · 60 lines · ~659 tok" + }, + { + "repo": "cobra", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp read", + "ok": true, + "seconds": 0.0, + "bytes": 621, + "note": "active_help.go:42-53 GetActiveHelpConfig" + }, + { + "repo": "cobra", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp changes", + "ok": true, + "seconds": 0.0, + "bytes": 28, + "note": "no changes since last check" + }, + { + "repo": "cobra", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp since", + "ok": true, + "seconds": 0.0, + "bytes": 11, + "note": "no changes" + }, + { + "repo": "cobra", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp show", + "ok": true, + "seconds": 0.0, + "bytes": 549, + "note": "function main::GetActiveHelpConfig active_help.go:47-53" + }, + { + "repo": "cobra", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp search", + "ok": true, + "seconds": 0.0, + "bytes": 209, + "note": "function GetActiveHelpConfig active_help.go:47 — GetActiveHelpConfig returns the value of the ActiveHelp environment variable _ACTIVE_HELP where ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4372, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 970, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 30587, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "read", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 557, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "show", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 352, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "search", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1568, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "search --text", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1866, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "symbols ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 860, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 134, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "callees", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 38, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "impact", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 956, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "hierarchy", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 127, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "deps", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 444, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "context", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1038, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "since", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "locate", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 624, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "history", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 130, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "changelog", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.2, + "bytes": 2609, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4078, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "activity", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 545, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "hotspots", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1680, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "dead", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 3474, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "cycles", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 548, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "entrypoints", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 649, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "journal", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 73, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "brief", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 213, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "libs", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 455, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1006, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1025, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 147, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "look <3 targets>", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2504, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "doctor", + "ok": true, + "crashed": false, + "code": 1, + "seconds": 0.0, + "bytes": 636, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "ops", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4882, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "branches", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 122, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "timeline", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 235, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 393, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "digest", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 66, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "--json look", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1006, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "--json callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1363, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "--json overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 4078, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "--json tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 393, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "bench", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 764, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "edit replace", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 18, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "rename", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2769, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "diff (after rename)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 256, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "ops (after edits)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 201, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "add", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "status (staged)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 479, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "msg", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 27, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "commit", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 148, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "undo", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 138, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "reset ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "cmd": "undo --op 1", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 127, + "note": "" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp look", + "ok": true, + "seconds": 0.0, + "bytes": 2061, + "note": "=== main::chain" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp overview", + "ok": true, + "seconds": 0.0, + "bytes": 4077, + "note": "chi · 90 code files (go) · 351 functions and types · 168 tests · ≈94k tokens of source" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp brief", + "ok": true, + "seconds": 0.0, + "bytes": 205, + "note": "# brief · chi · branch HEAD · 90 code files" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp entrypoints", + "ok": true, + "seconds": 0.0, + "bytes": 649, + "note": "main custom_handler::main _examples/custom-handler/main.go:20" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp map", + "ok": true, + "seconds": 0.0, + "bytes": 4372, + "note": "# `/ (repository root)`" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp outline", + "ok": true, + "seconds": 0.0, + "bytes": 970, + "note": "# chain.go · 49 lines · ~380 tok" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp read", + "ok": true, + "seconds": 0.0, + "bytes": 557, + "note": "chain.go:34-49 chain" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp changes", + "ok": true, + "seconds": 0.0, + "bytes": 28, + "note": "no changes since last check" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp since", + "ok": true, + "seconds": 0.0, + "bytes": 11, + "note": "no changes" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp show", + "ok": true, + "seconds": 0.0, + "bytes": 352, + "note": "function main::chain chain.go:36-49" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp search", + "ok": true, + "seconds": 0.0, + "bytes": 1568, + "note": "function Chain chain.go:6 — Chain returns a Middlewares type from a slice of middleware handlers." + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp callers", + "ok": true, + "seconds": 0.0, + "bytes": 134, + "note": "callers of main::chain (3 sure, ≈98% real):" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp callees", + "ok": true, + "seconds": 0.0, + "bytes": 38, + "note": "calls from main::chain:" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp impact", + "ok": true, + "seconds": 0.0, + "bytes": 956, + "note": "impact of main::chain (depth 3): 21 symbols in 2 files, 4 tests" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp hierarchy", + "ok": true, + "seconds": 0.0, + "bytes": 127, + "note": "struct main::ChainHandler chain.go:24" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp deps", + "ok": true, + "seconds": 0.0, + "bytes": 444, + "note": "/" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp context", + "ok": true, + "seconds": 0.0, + "bytes": 1038, + "note": "[gitnext] Code related to this task, picked from the index (may be incomplete; read files for more):" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp replace_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 18, + "note": "ok chain.go:36-49" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp insert_after", + "ok": true, + "seconds": 0.0, + "bytes": 47, + "note": "ok chain.go:51-64" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp annotate", + "ok": true, + "seconds": 0.0, + "bytes": 15, + "note": "stored 1 notes" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp locate", + "ok": true, + "seconds": 0.0, + "bytes": 624, + "note": "locations (1):" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp check", + "ok": true, + "seconds": 2.3, + "bytes": 232, + "note": "check: 1 symbol changed (chain_added)" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp why", + "ok": true, + "seconds": 0.9, + "bytes": 98, + "note": "why: TestRoutePattern — passes (0.9s), nothing to explain" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp tests_for", + "ok": true, + "seconds": 0.0, + "bytes": 393, + "note": "tests reaching chain (3), most likely to fail first:" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp history", + "ok": true, + "seconds": 0.0, + "bytes": 130, + "note": "history of chain (chain.go), 1 changes:" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp changelog", + "ok": true, + "seconds": 0.1, + "bytes": 2614, + "note": "changelog HEAD~10..HEAD: 1 commits, 111 files, 526 symbol changes" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp diff", + "ok": true, + "seconds": 0.0, + "bytes": 47, + "note": "modified chain.go" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp rename_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 2801, + "note": "renamed chain → chain_mcp: 4 places in 2 files" + }, + { + "repo": "chi", + "lang": "go", + "crashed": false, + "code": 0, + "cmd": "mcp delete_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 47, + "note": "ok chain.go:51-50" + }, + { + "repo": "click", + "lang": "python", + "cmd": "status", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 247, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "log", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 52, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "diff", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "index", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 70, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "map ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 13213, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 5004, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 69660, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "read", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 559, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "show", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 308, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "search", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 52, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "search --text", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 159, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "symbols ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4875, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 108, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "callees", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 130, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "impact", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 473, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "hierarchy", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 388, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "deps", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 415, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "context", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 698, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "since", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "locate", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 650, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "history", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 137, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "changelog", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.3, + "bytes": 4239, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 4087, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "activity", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 634, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "hotspots", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 1710, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "dead", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 1820, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "cycles", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 31, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "entrypoints", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2461, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "journal", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 73, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "brief", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 198, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "libs", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1233, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 842, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 5059, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 159, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "look <3 targets>", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 7028, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "doctor", + "ok": true, + "crashed": false, + "code": 1, + "seconds": 0.0, + "bytes": 640, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "ops", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4836, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "branches", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 101, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "timeline", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1037, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 78, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "digest", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 78, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "--json look", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 842, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "--json callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 797, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "--json overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.2, + "bytes": 4087, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "--json tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 78, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "bench", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.3, + "bytes": 764, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "edit replace", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 30, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "rename", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 123, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "diff (after rename)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 221, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "ops (after edits)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 233, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "add", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 0, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "status (staged)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 419, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "msg", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 51, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "commit", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.3, + "bytes": 148, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "undo", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 138, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "reset ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "cmd": "undo --op 1", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 165, + "note": "" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp look", + "ok": true, + "seconds": 0.1, + "bytes": 5965, + "note": "=== click::_compat::_make_text_stream" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp overview", + "ok": true, + "seconds": 0.1, + "bytes": 4086, + "note": "click · 91 code files (python) · 761 functions and types · 734 tests · ≈251k tokens of source" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp brief", + "ok": true, + "seconds": 0.0, + "bytes": 190, + "note": "# brief · click · branch HEAD · 91 code files" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp entrypoints", + "ok": true, + "seconds": 0.0, + "bytes": 2461, + "note": "cli aliases::cli examples/aliases/aliases.py:97" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp map", + "ok": true, + "seconds": 0.0, + "bytes": 486, + "note": "# `/ (repository root)`" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp outline", + "ok": true, + "seconds": 0.0, + "bytes": 5004, + "note": "# src/click/_compat.py · 590 lines · ~4485 tok" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp read", + "ok": true, + "seconds": 0.0, + "bytes": 559, + "note": "src/click/_compat.py:22-40 _make_text_stream" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp changes", + "ok": true, + "seconds": 0.0, + "bytes": 28, + "note": "no changes since last check" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp since", + "ok": true, + "seconds": 0.0, + "bytes": 11, + "note": "no changes" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp show", + "ok": true, + "seconds": 0.0, + "bytes": 308, + "note": "function click::_compat::_make_text_stream src/click/_compat.py:22-40" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp search", + "ok": true, + "seconds": 0.0, + "bytes": 52, + "note": "function _make_text_stream src/click/_compat.py:22" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp callers", + "ok": true, + "seconds": 0.0, + "bytes": 108, + "note": "callers of click::_compat::_make_text_stream (1 sure):" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp callees", + "ok": true, + "seconds": 0.0, + "bytes": 130, + "note": "calls from click::_compat::_make_text_stream:" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp impact", + "ok": true, + "seconds": 0.0, + "bytes": 473, + "note": "impact of click::_compat::_make_text_stream (depth 3): 6 symbols in 1 files, 0 tests" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp hierarchy", + "ok": true, + "seconds": 0.0, + "bytes": 388, + "note": "class click::_compat::_NonClosingTextIOWrapper src/click/_compat.py:59" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp deps", + "ok": true, + "seconds": 0.0, + "bytes": 27, + "note": "/" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp context", + "ok": true, + "seconds": 0.0, + "bytes": 698, + "note": "[gitnext] Code related to this task, picked from the index (may be incomplete; read files for more):" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp replace_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 30, + "note": "ok src/click/_compat.py:22-40" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp insert_after", + "ok": true, + "seconds": 0.0, + "bytes": 81, + "note": "ok src/click/_compat.py:42-60" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp annotate", + "ok": true, + "seconds": 0.0, + "bytes": 15, + "note": "stored 1 notes" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp locate", + "ok": true, + "seconds": 0.0, + "bytes": 650, + "note": "locations (1):" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp check", + "ok": true, + "seconds": 0.1, + "bytes": 231, + "note": "check: 1 symbol changed (_make_text_stream_added)" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp why", + "ok": true, + "seconds": 0.5, + "bytes": 3852, + "note": "why: test_interrupt_while_reporting_abort — FAILS (0.5s)" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp tests_for", + "ok": true, + "seconds": 0.0, + "bytes": 78, + "note": "no tests reach _make_text_stream (depth 4) — it is untested by the call graph" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp history", + "ok": true, + "seconds": 0.0, + "bytes": 137, + "note": "history of _make_text_stream (src/click/_compat.py), 1 changes:" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp changelog", + "ok": true, + "seconds": 0.3, + "bytes": 4244, + "note": "changelog HEAD~10..HEAD: 1 commits, 179 files, 1559 symbol changes" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp diff", + "ok": true, + "seconds": 0.0, + "bytes": 81, + "note": "modified src/click/_compat.py" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp rename_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 121, + "note": "renamed _make_text_stream → _make_text_stream_mcp: 2 places in 1 files" + }, + { + "repo": "click", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp delete_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 81, + "note": "ok src/click/_compat.py:42-41" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "status", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 247, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "log", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 70, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "diff", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "index", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 68, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "map ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2681, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1342, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2207, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "read", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 670, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "show", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 244, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "search", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 825, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "search --text", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1938, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "symbols ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1170, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 90, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "callees", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 123, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "impact", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 751, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "hierarchy", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 62, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "deps", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 68, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "context", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1012, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "since", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "locate", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 754, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "history", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 147, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "changelog", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 3013, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2762, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "activity", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 651, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "hotspots", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1713, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "dead", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1665, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "cycles", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 299, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "entrypoints", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 760, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "journal", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 73, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "brief", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 220, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "libs", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 260, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 941, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1397, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 161, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "look <3 targets>", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 3353, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "doctor", + "ok": true, + "crashed": false, + "code": 1, + "seconds": 0.0, + "bytes": 611, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "ops", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4158, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "branches", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 124, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "timeline", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1037, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 68, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "digest", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 80, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "--json look", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 941, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "--json callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 570, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "--json overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2762, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "--json tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 68, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "bench", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 764, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "edit replace", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 33, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "rename", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 396, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "diff (after rename)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 205, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "ops (after edits)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 221, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "add", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "status (staged)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 394, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "msg", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 50, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "commit", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 148, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "undo", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 138, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "reset ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "cmd": "undo --op 1", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 153, + "note": "" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp look", + "ok": true, + "seconds": 0.0, + "bytes": 2400, + "note": "=== benchmarks::_harness::measure" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp overview", + "ok": true, + "seconds": 0.0, + "bytes": 2761, + "note": "sqlparse · 42 code files (python) · 287 functions and types · 331 tests · ≈74k tokens of source" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp brief", + "ok": true, + "seconds": 0.0, + "bytes": 212, + "note": "# brief · sqlparse · branch HEAD · 42 code files" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp entrypoints", + "ok": true, + "seconds": 0.0, + "bytes": 760, + "note": "main _harness::main benchmarks/_harness.py:179" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp map", + "ok": true, + "seconds": 0.0, + "bytes": 1025, + "note": "# `/ (repository root)`" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp outline", + "ok": true, + "seconds": 0.0, + "bytes": 1342, + "note": "# benchmarks/_harness.py · 220 lines · ~1825 tok" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp read", + "ok": true, + "seconds": 0.0, + "bytes": 670, + "note": "benchmarks/_harness.py:82-101 measure" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp changes", + "ok": true, + "seconds": 0.0, + "bytes": 28, + "note": "no changes since last check" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp since", + "ok": true, + "seconds": 0.0, + "bytes": 11, + "note": "no changes" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp show", + "ok": true, + "seconds": 0.0, + "bytes": 244, + "note": "function benchmarks::_harness::measure benchmarks/_harness.py:82-101" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp search", + "ok": true, + "seconds": 0.0, + "bytes": 825, + "note": "function measure benchmarks/_harness.py:82 — Run ``run(sql)`` once, return ``(status, elapsed milliseconds)``." + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp callers", + "ok": true, + "seconds": 0.0, + "bytes": 90, + "note": "callers of benchmarks::_harness::measure (1 sure):" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp callees", + "ok": true, + "seconds": 0.0, + "bytes": 123, + "note": "calls from benchmarks::_harness::measure:" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp impact", + "ok": true, + "seconds": 0.0, + "bytes": 751, + "note": "impact of benchmarks::_harness::measure (depth 3): 7 symbols in 6 files, 0 tests" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp hierarchy", + "ok": true, + "seconds": 0.0, + "bytes": 62, + "note": "class benchmarks::_harness::Vector benchmarks/_harness.py:52" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp deps", + "ok": true, + "seconds": 0.0, + "bytes": 27, + "note": "/" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp context", + "ok": true, + "seconds": 0.0, + "bytes": 1012, + "note": "[gitnext] Code related to this task, picked from the index (may be incomplete; read files for more):" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp replace_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 33, + "note": "ok benchmarks/_harness.py:82-101" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp insert_after", + "ok": true, + "seconds": 0.0, + "bytes": 81, + "note": "ok benchmarks/_harness.py:103-122" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp annotate", + "ok": true, + "seconds": 0.0, + "bytes": 15, + "note": "stored 1 notes" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp locate", + "ok": true, + "seconds": 0.0, + "bytes": 754, + "note": "locations (1):" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp check", + "ok": true, + "seconds": 0.1, + "bytes": 223, + "note": "check: 1 symbol changed (measure_added)" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp why", + "ok": true, + "seconds": 0.5, + "bytes": 109, + "note": "why: test_cli_main_empty — passes (0.5s), nothing to explain" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp tests_for", + "ok": true, + "seconds": 0.0, + "bytes": 68, + "note": "no tests reach measure (depth 4) — it is untested by the call graph" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp history", + "ok": true, + "seconds": 0.0, + "bytes": 147, + "note": "history of measure (benchmarks/_harness.py), 1 changes:" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp changelog", + "ok": true, + "seconds": 0.1, + "bytes": 3018, + "note": "changelog HEAD~10..HEAD: 1 commits, 93 files, 628 symbol changes" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp diff", + "ok": true, + "seconds": 0.0, + "bytes": 79, + "note": "modified benchmarks/_harness.py" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp rename_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 394, + "note": "renamed measure → measure_mcp: 2 places in 1 files" + }, + { + "repo": "sqlparse", + "lang": "python", + "crashed": false, + "code": 0, + "cmd": "mcp delete_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 81, + "note": "ok benchmarks/_harness.py:103-102" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "status", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 269, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "log", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 24, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "diff", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 69, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "index", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 69, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "map ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 944, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 256, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4461, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "read", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 212, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "show", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 145, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "search", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 42, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "search --text", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 187, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "symbols ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 217, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 140, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "callees", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 85, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "impact", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 250, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "hierarchy", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 78, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "deps", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 27, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "context", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 439, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "since", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 69, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "locate", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 293, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "history", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 99, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "changelog", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.2, + "bytes": 4646, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 2784, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "activity", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 620, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "hotspots", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1610, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "dead", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4247, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "cycles", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 134, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "entrypoints", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 25, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "journal", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 73, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "brief", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 190, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "libs", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1658, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 588, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 311, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 156, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "look <3 targets>", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1740, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "doctor", + "ok": true, + "crashed": false, + "code": 1, + "seconds": 0.0, + "bytes": 662, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "ops", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2984, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "branches", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 73, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "timeline", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 237, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 71, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "digest", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 75, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "--json look", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 588, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "--json callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 579, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "--json overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 2784, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "--json tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 71, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "bench", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 764, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "edit replace", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 27, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "rename", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 123, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "diff (after rename)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 278, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "ops (after edits)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 214, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "add", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 0, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "status (staged)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 458, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "msg", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 36, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "commit", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 148, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "undo", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 138, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "reset ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "cmd": "undo --op 1", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 146, + "note": "" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp look", + "ok": true, + "seconds": 0.0, + "bytes": 952, + "note": "=== rollup_config::getEsbuild" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp overview", + "ok": true, + "seconds": 0.1, + "bytes": 2783, + "note": "zustand · 52 code files (javascript 16, typescript 36) · 175 functions and types · 157 tests · ≈84k tokens of source" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp brief", + "ok": true, + "seconds": 0.0, + "bytes": 164, + "note": "# brief · zustand · branch HEAD · 52 code files" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp entrypoints", + "ok": true, + "seconds": 0.0, + "bytes": 25, + "note": "no entry points detected" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp map", + "ok": true, + "seconds": 0.0, + "bytes": 944, + "note": "# `/ (repository root)`" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp outline", + "ok": true, + "seconds": 0.0, + "bytes": 256, + "note": "# rollup.config.mjs · 105 lines · ~710 tok" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp read", + "ok": true, + "seconds": 0.0, + "bytes": 212, + "note": "rollup.config.mjs:22-28 getEsbuild" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp changes", + "ok": true, + "seconds": 0.0, + "bytes": 28, + "note": "no changes since last check" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp since", + "ok": true, + "seconds": 0.0, + "bytes": 11, + "note": "no changes" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp show", + "ok": true, + "seconds": 0.0, + "bytes": 145, + "note": "function rollup_config::getEsbuild rollup.config.mjs:22-28" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp search", + "ok": true, + "seconds": 0.0, + "bytes": 42, + "note": "function getEsbuild rollup.config.mjs:22" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp callers", + "ok": true, + "seconds": 0.0, + "bytes": 140, + "note": "callers of rollup_config::getEsbuild (2 sure, ≈100% real):" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp callees", + "ok": true, + "seconds": 0.0, + "bytes": 85, + "note": "calls from rollup_config::getEsbuild:" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp impact", + "ok": true, + "seconds": 0.0, + "bytes": 250, + "note": "impact of rollup_config::getEsbuild (depth 3): 3 symbols in 1 files, 0 tests" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp hierarchy", + "ok": true, + "seconds": 0.0, + "bytes": 78, + "note": "trait src::middleware::devtools::StoreMutators src/middleware/devtools.ts:16" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp deps", + "ok": true, + "seconds": 0.0, + "bytes": 27, + "note": "/" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp context", + "ok": true, + "seconds": 0.0, + "bytes": 439, + "note": "[gitnext] Code related to this task, picked from the index (may be incomplete; read files for more):" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp replace_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 27, + "note": "ok rollup.config.mjs:22-28" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp insert_after", + "ok": true, + "seconds": 0.0, + "bytes": 70, + "note": "ok rollup.config.mjs:30-36" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp annotate", + "ok": true, + "seconds": 0.0, + "bytes": 15, + "note": "stored 1 notes" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp locate", + "ok": true, + "seconds": 0.0, + "bytes": 293, + "note": "locations (1):" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp check", + "ok": true, + "seconds": 0.4, + "bytes": 378, + "note": "check: 2 symbols changed (getEsbuild, getEsbuild_added)" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp why", + "ok": true, + "seconds": 1.1, + "bytes": 732, + "note": "why: TestComponent, TestComponent, TestComponent, TestComponent, TestComponent, TestComponent — FAILS (1.1s)" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp tests_for", + "ok": true, + "seconds": 0.0, + "bytes": 71, + "note": "no tests reach getEsbuild (depth 4) — it is untested by the call graph" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp history", + "ok": true, + "seconds": 0.0, + "bytes": 99, + "note": "history of getEsbuild (rollup.config.mjs), 1 changes:" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp changelog", + "ok": true, + "seconds": 0.1, + "bytes": 4651, + "note": "changelog HEAD~10..HEAD: 1 commits, 144 files, 284 symbol changes" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp diff", + "ok": true, + "seconds": 0.0, + "bytes": 70, + "note": "modified rollup.config.mjs" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp rename_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 122, + "note": "renamed getEsbuild → getEsbuild_mcp: 3 places in 1 files" + }, + { + "repo": "zustand", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp delete_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 70, + "note": "ok rollup.config.mjs:30-29" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "status", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 49, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "log", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 99, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "diff", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 11, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "index", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 69, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "map ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 5229, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 268, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 33552, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "read", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4506, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "show", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 405, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "search", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 109, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "search --text", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1348, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "symbols ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 212, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 91, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "callees", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 983, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "impact", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 131, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "hierarchy", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 114, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "deps", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 331, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "context", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 254, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "since", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 11, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "locate", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4579, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "history", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 165, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "changelog", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.2, + "bytes": 3369, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 3236, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "activity", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 643, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "hotspots", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1605, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "dead", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 3566, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "cycles", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2844, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "entrypoints", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 25, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "journal", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 73, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "brief", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 195, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "libs", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 443, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 4981, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 323, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 149, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "look <3 targets>", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 5895, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "doctor", + "ok": true, + "crashed": false, + "code": 1, + "seconds": 0.0, + "bytes": 662, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "ops", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4370, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "branches", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 149, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "timeline", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 234, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 256, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "digest", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 68, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "--json look", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 4981, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "--json callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 366, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "--json overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 3236, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "--json tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 256, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "bench", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 765, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "edit replace", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 21, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "rename", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 918, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "diff (after rename)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 182, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "ops (after edits)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 223, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "add", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "status (staged)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 434, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "msg", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 23, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "commit", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 148, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "undo", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 138, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "reset ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "cmd": "undo --op 1", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 143, + "note": "" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp look", + "ok": true, + "seconds": 0.0, + "bytes": 5338, + "note": "=== src::cli::cli" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp overview", + "ok": true, + "seconds": 0.1, + "bytes": 3236, + "note": "yaml · 112 code files (javascript 7, typescript 105) · 440 functions and types · 54 tests · ≈158k tokens of source" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp brief", + "ok": true, + "seconds": 0.0, + "bytes": 238, + "note": "# brief · yaml · branch HEAD · 112 code files" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp entrypoints", + "ok": true, + "seconds": 0.0, + "bytes": 25, + "note": "no entry points detected" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp map", + "ok": true, + "seconds": 0.0, + "bytes": 803, + "note": "# `/ (repository root)`" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp outline", + "ok": true, + "seconds": 0.0, + "bytes": 268, + "note": "# src/cli.ts · 190 lines · ~1531 tok" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp read", + "ok": true, + "seconds": 0.0, + "bytes": 4506, + "note": "src/cli.ts:49-190 cli::cli" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp changes", + "ok": true, + "seconds": 0.0, + "bytes": 28, + "note": "no changes since last check" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp since", + "ok": true, + "seconds": 0.0, + "bytes": 11, + "note": "no changes" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp show", + "ok": true, + "seconds": 0.0, + "bytes": 405, + "note": "function src::cli::cli src/cli.ts:49-190" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp search", + "ok": true, + "seconds": 0.0, + "bytes": 109, + "note": "function cli::cli src/cli.ts:49" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp callers", + "ok": true, + "seconds": 0.0, + "bytes": 91, + "note": "callers of src::cli::cli (1 sure, ≈100% real):" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp callees", + "ok": true, + "seconds": 0.0, + "bytes": 983, + "note": "calls from src::cli::cli:" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp impact", + "ok": true, + "seconds": 0.0, + "bytes": 131, + "note": "impact of src::cli::cli (depth 3): 1 symbols in 1 files, 3 tests" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp hierarchy", + "ok": true, + "seconds": 0.0, + "bytes": 114, + "note": "class src::cli::UserError src/cli.ts:39" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp deps", + "ok": true, + "seconds": 0.0, + "bytes": 33, + "note": "/" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp context", + "ok": true, + "seconds": 0.0, + "bytes": 254, + "note": "[gitnext] Code related to this task, picked from the index (may be incomplete; read files for more):" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp replace_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 21, + "note": "ok src/cli.ts:49-190" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp insert_after", + "ok": true, + "seconds": 0.0, + "bytes": 53, + "note": "ok src/cli.ts:192-333" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp annotate", + "ok": true, + "seconds": 0.0, + "bytes": 15, + "note": "stored 1 notes" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp locate", + "ok": true, + "seconds": 0.0, + "bytes": 4579, + "note": "locations (1):" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp check", + "ok": true, + "seconds": 0.5, + "bytes": 313, + "note": "check: 2 symbols changed (cli::cli, cli_added)" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp why", + "ok": true, + "seconds": 1.0, + "bytes": 1476, + "note": "why: testReject — FAILS (1.0s)" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp tests_for", + "ok": true, + "seconds": 0.0, + "bytes": 256, + "note": "tests reaching cli::cli (2), most likely to fail first:" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp history", + "ok": true, + "seconds": 0.0, + "bytes": 165, + "note": "history of cli::cli (src/cli.ts), 1 changes:" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp changelog", + "ok": true, + "seconds": 0.2, + "bytes": 3374, + "note": "changelog HEAD~10..HEAD: 1 commits, 157 files, 452 symbol changes" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp diff", + "ok": true, + "seconds": 0.0, + "bytes": 51, + "note": "modified src/cli.ts" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp rename_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 916, + "note": "renamed cli → cli_mcp: 4 places in 3 files" + }, + { + "repo": "yaml", + "lang": "typescript", + "crashed": false, + "code": 0, + "cmd": "mcp delete_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 53, + "note": "ok src/cli.ts:192-191" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "status", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 247, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "log", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 57, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "diff", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "index", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 71, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "map ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.4, + "bytes": 3974, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 368, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 140426, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "read", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 328, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "show", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.4, + "bytes": 187, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "search", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 414, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "search --text", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 1768, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "symbols ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 312, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.6, + "bytes": 86, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "callees", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 65, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "impact", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.6, + "bytes": 104, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "hierarchy", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 2268, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "deps", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.2, + "bytes": 1063, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "context", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 230, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "since", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "locate", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 468, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "history", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 193, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "changelog", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.0, + "bytes": 5212, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 3.8, + "bytes": 1734, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "activity", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 507, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "hotspots", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.8, + "bytes": 2101, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "dead", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.5, + "bytes": 2254, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "cycles", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.3, + "bytes": 16807, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "entrypoints", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 25, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "journal", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 73, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "brief", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 204, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "libs", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.2, + "bytes": 469, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.4, + "bytes": 849, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 423, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 187, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "look <3 targets>", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.4, + "bytes": 43055, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "doctor", + "ok": true, + "crashed": false, + "code": 1, + "seconds": 0.1, + "bytes": 641, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "ops", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 7011, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "branches", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 110, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "timeline", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 234, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.5, + "bytes": 101, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "digest", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 106, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "--json look", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.4, + "bytes": 849, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "--json callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.3, + "bytes": 326, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "--json overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 3.8, + "bytes": 1734, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "--json tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 1.5, + "bytes": 101, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "bench", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 2.9, + "bytes": 765, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "edit replace", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 58, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "rename", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 1525, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "diff (after rename)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 223, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "ops (after edits)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 281, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "add", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.2, + "bytes": 0, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "status (staged)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 417, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "msg", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 54, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "commit", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 2.9, + "bytes": 148, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "undo", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 138, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "reset ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "cmd": "undo --op 1", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 213, + "note": "" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp look", + "ok": true, + "seconds": 1.5, + "bytes": 1383, + "note": "=== org::jsoup::HttpStatusException::HttpStatusException" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp overview", + "ok": true, + "seconds": 2.5, + "bytes": 1733, + "note": "jsoup · 216 code files (java) · 2663 functions and types · 2583 tests · ≈669k tokens of source" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp brief", + "ok": true, + "seconds": 0.0, + "bytes": 196, + "note": "# brief · jsoup · branch HEAD · 216 code files" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp entrypoints", + "ok": true, + "seconds": 0.0, + "bytes": 25, + "note": "no entry points detected" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp map", + "ok": true, + "seconds": 0.2, + "bytes": 434, + "note": "# `/ (repository root)`" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp outline", + "ok": true, + "seconds": 0.0, + "bytes": 368, + "note": "# src/main/java/org/jsoup/HttpStatusException.java · 25 lines · ~148 tok" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp read", + "ok": true, + "seconds": 0.0, + "bytes": 328, + "note": "src/main/java/org/jsoup/HttpStatusException.java:12-16 HttpStatusException::HttpStatusException" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp changes", + "ok": true, + "seconds": 0.0, + "bytes": 28, + "note": "no changes since last check" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp since", + "ok": true, + "seconds": 0.0, + "bytes": 11, + "note": "no changes" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp show", + "ok": true, + "seconds": 0.0, + "bytes": 187, + "note": "method org::jsoup::HttpStatusException::HttpStatusException src/main/java/org/jsoup/HttpStatusException.java:12-16" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp search", + "ok": true, + "seconds": 0.0, + "bytes": 414, + "note": "class jsoup::HttpStatusException src/main/java/org/jsoup/HttpStatusException.java:8 — Signals that a HTTP request resulted in a not OK HTTP response." + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp callers", + "ok": true, + "seconds": 0.0, + "bytes": 86, + "note": "callers of org::jsoup::HttpStatusException::HttpStatusException (0 sure, ≈100% real):" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp callees", + "ok": true, + "seconds": 0.0, + "bytes": 65, + "note": "calls from org::jsoup::HttpStatusException::HttpStatusException:" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp impact", + "ok": true, + "seconds": 0.0, + "bytes": 104, + "note": "impact of org::jsoup::HttpStatusException::HttpStatusException (depth 3): 0 symbols in 0 files, 0 tests" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp hierarchy", + "ok": true, + "seconds": 0.0, + "bytes": 2268, + "note": "trait org::jsoup::Connection src/main/java/org/jsoup/Connection.java:47" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp deps", + "ok": true, + "seconds": 0.0, + "bytes": 27, + "note": "/" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp context", + "ok": true, + "seconds": 0.0, + "bytes": 230, + "note": "[gitnext] Code related to this task, picked from the index (may be incomplete; read files for more):" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp replace_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 58, + "note": "ok src/main/java/org/jsoup/HttpStatusException.java:12-16" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp insert_after", + "ok": true, + "seconds": 0.0, + "bytes": 126, + "note": "ok src/main/java/org/jsoup/HttpStatusException.java:18-22" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp annotate", + "ok": true, + "seconds": 0.1, + "bytes": 15, + "note": "stored 1 notes" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp locate", + "ok": true, + "seconds": 0.0, + "bytes": 468, + "note": "locations (1):" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp check", + "ok": true, + "seconds": 3.8, + "bytes": 285, + "note": "check: 1 symbol changed (HttpStatusException_added)" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp why", + "ok": true, + "seconds": 4.2, + "bytes": 2030, + "note": "why: testCharset — FAILS (3.0s)" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp tests_for", + "ok": true, + "seconds": 0.0, + "bytes": 101, + "note": "no tests reach HttpStatusException::HttpStatusException (depth 4) — it is untested by the call graph" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp history", + "ok": true, + "seconds": 0.0, + "bytes": 193, + "note": "history of HttpStatusException::HttpStatusException (src/main/java/org/jsoup/HttpStatusException.java), 1 changes:" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp changelog", + "ok": true, + "seconds": 0.8, + "bytes": 5217, + "note": "changelog HEAD~10..HEAD: 1 commits, 330 files, 4946 symbol changes" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp diff", + "ok": true, + "seconds": 0.1, + "bytes": 126, + "note": "modified src/main/java/org/jsoup/HttpStatusException.java" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp rename_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 1524, + "note": "renamed HttpStatusException → HttpStatusException_mcp: 1 places in 1 files" + }, + { + "repo": "jsoup", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp delete_symbol", + "ok": true, + "seconds": 0.1, + "bytes": 126, + "note": "ok src/main/java/org/jsoup/HttpStatusException.java:18-17" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "status", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 247, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "log", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 97, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "diff", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "index", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 71, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "map ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 17502, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4376, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 60503, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "read", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1608, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "show", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 400, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "search", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 79, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "search --text", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1412, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "symbols ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4351, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 110, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "callees", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 387, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "impact", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 513, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "hierarchy", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2070, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "deps", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 196, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "context", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 326, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "since", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "locate", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1704, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "history", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 189, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "changelog", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.4, + "bytes": 1206, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.3, + "bytes": 981, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "activity", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 537, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "hotspots", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 2108, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "dead", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 376, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "cycles", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 571, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "entrypoints", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 25, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "journal", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 73, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "brief", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 248, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "libs", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 226, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 2152, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4431, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 170, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "look <3 targets>", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 23184, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "doctor", + "ok": true, + "crashed": false, + "code": 1, + "seconds": 0.0, + "bytes": 638, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "ops", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 6669, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "branches", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 151, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "timeline", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 242, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 1217, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "digest", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 89, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "--json look", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 2152, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "--json callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 612, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "--json overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.3, + "bytes": 981, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "--json tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 1217, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "bench", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.4, + "bytes": 764, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "edit replace", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 41, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "rename", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 1178, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "diff (after rename)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 197, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "ops (after edits)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 225, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "add", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "status (staged)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 423, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "msg", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 60, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "commit", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.2, + "bytes": 148, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "undo", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 138, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "reset ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "cmd": "undo --op 1", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 157, + "note": "" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp look", + "ok": true, + "seconds": 0.1, + "bytes": 6649, + "note": "=== org::json::CDL::getValue" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp overview", + "ok": true, + "seconds": 0.3, + "bytes": 980, + "note": "json-java · 86 code files (java) · 542 functions and types · 848 tests · ≈277k tokens of source" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp brief", + "ok": true, + "seconds": 0.0, + "bytes": 240, + "note": "# brief · json-java · branch HEAD · 86 code files" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp entrypoints", + "ok": true, + "seconds": 0.0, + "bytes": 25, + "note": "no entry points detected" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp map", + "ok": true, + "seconds": 0.0, + "bytes": 498, + "note": "# `/ (repository root)`" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp outline", + "ok": true, + "seconds": 0.0, + "bytes": 4376, + "note": "# src/main/java/org/json/CDL.java · 441 lines · ~4047 tok" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp read", + "ok": true, + "seconds": 0.0, + "bytes": 1608, + "note": "src/main/java/org/json/CDL.java:36-81 CDL::getValue" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp changes", + "ok": true, + "seconds": 0.0, + "bytes": 28, + "note": "no changes since last check" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp since", + "ok": true, + "seconds": 0.0, + "bytes": 11, + "note": "no changes" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp show", + "ok": true, + "seconds": 0.0, + "bytes": 400, + "note": "method org::json::CDL::getValue src/main/java/org/json/CDL.java:44-81" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp search", + "ok": true, + "seconds": 0.0, + "bytes": 79, + "note": "method CDL::getValue src/main/java/org/json/CDL.java:44 — Get the next value." + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp callers", + "ok": true, + "seconds": 0.0, + "bytes": 110, + "note": "callers of org::json::CDL::getValue (1 sure, ≈100% real):" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp callees", + "ok": true, + "seconds": 0.0, + "bytes": 387, + "note": "calls from org::json::CDL::getValue:" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp impact", + "ok": true, + "seconds": 0.0, + "bytes": 513, + "note": "impact of org::json::CDL::getValue (depth 3): 3 symbols in 1 files, 17 tests" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp hierarchy", + "ok": true, + "seconds": 0.0, + "bytes": 2070, + "note": "class org::json::CDL src/main/java/org/json/CDL.java:26" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp deps", + "ok": true, + "seconds": 0.0, + "bytes": 27, + "note": "/" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp context", + "ok": true, + "seconds": 0.0, + "bytes": 326, + "note": "[gitnext] Code related to this task, picked from the index (may be incomplete; read files for more):" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp replace_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 41, + "note": "ok src/main/java/org/json/CDL.java:44-81" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp insert_after", + "ok": true, + "seconds": 0.0, + "bytes": 82, + "note": "ok src/main/java/org/json/CDL.java:83-120" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp annotate", + "ok": true, + "seconds": 0.0, + "bytes": 15, + "note": "stored 1 notes" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp locate", + "ok": true, + "seconds": 0.0, + "bytes": 1704, + "note": "locations (1):" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp check", + "ok": true, + "seconds": 5.3, + "bytes": 1910, + "note": "check: 2 symbols changed (CDL::getValue, getValue_added)" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp why", + "ok": true, + "seconds": 0.7, + "bytes": 1082, + "note": "why: testJSONArrayInt — FAILS (0.7s)" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp tests_for", + "ok": true, + "seconds": 0.0, + "bytes": 1217, + "note": "tests reaching CDL::getValue (17), the 10 most likely to fail first:" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp history", + "ok": true, + "seconds": 0.0, + "bytes": 189, + "note": "history of CDL::getValue (src/main/java/org/json/CDL.java), 1 changes:" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp changelog", + "ok": true, + "seconds": 0.4, + "bytes": 1211, + "note": "changelog HEAD~10..HEAD: 1 commits, 115 files, 1270 symbol changes" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp diff", + "ok": true, + "seconds": 0.0, + "bytes": 81, + "note": "modified src/main/java/org/json/CDL.java" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp rename_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 1177, + "note": "renamed getValue → getValue_mcp: 2 places in 1 files" + }, + { + "repo": "json-java", + "lang": "java", + "crashed": false, + "code": 0, + "cmd": "mcp delete_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 81, + "note": "ok src/main/java/org/json/CDL.java:83-82" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "status", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 247, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "log", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 63, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "diff", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "index", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 68, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "map ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 765, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 91, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 4712, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "read", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 268, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "show", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 85, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "search", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 113, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "search --text", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 928, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "symbols ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 68, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 53, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "callees", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 70, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "impact", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 71, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "hierarchy", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 46, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "deps", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 27, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "context", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 482, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "since", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "locate", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 332, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "history", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 123, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "changelog", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 648, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1625, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "activity", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 482, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "hotspots", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1132, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "dead", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 526, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "cycles", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 31, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "entrypoints", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 22, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "journal", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 73, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "brief", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 212, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "libs", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 222, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 488, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 146, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 146, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "look <3 targets>", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1671, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "doctor", + "ok": true, + "crashed": false, + "code": 1, + "seconds": 0.0, + "bytes": 637, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "ops", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 2962, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "branches", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 118, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "timeline", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1037, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 65, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "digest", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 65, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "--json look", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 488, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "--json callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 157, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "--json overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 1625, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "--json tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 65, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "bench", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 764, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "edit replace", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 17, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "rename", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 245, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "diff (after rename)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 120, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "ops (after edits)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 194, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "add", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "status (staged)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 315, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "msg", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 25, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "commit", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 148, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "undo", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 138, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "reset ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "cmd": "undo --op 1", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 126, + "note": "" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp look", + "ok": true, + "seconds": 0.0, + "bytes": 672, + "note": "=== semver::build::main" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp overview", + "ok": true, + "seconds": 0.0, + "bytes": 1625, + "note": "semver · 19 code files (rust) · 113 functions and types · 50 tests · ≈25k tokens of source" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp brief", + "ok": true, + "seconds": 0.0, + "bytes": 204, + "note": "# brief · semver · branch HEAD · 19 code files" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp entrypoints", + "ok": true, + "seconds": 0.0, + "bytes": 22, + "note": "main main build.rs:5" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp map", + "ok": true, + "seconds": 0.0, + "bytes": 765, + "note": "# `/ (repository root)`" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp outline", + "ok": true, + "seconds": 0.0, + "bytes": 91, + "note": "# build.rs · 26 lines · ~162 tok" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp read", + "ok": true, + "seconds": 0.0, + "bytes": 268, + "note": "build.rs:5-15 main" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp changes", + "ok": true, + "seconds": 0.0, + "bytes": 28, + "note": "no changes since last check" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp since", + "ok": true, + "seconds": 0.0, + "bytes": 11, + "note": "no changes" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp show", + "ok": true, + "seconds": 0.0, + "bytes": 85, + "note": "function semver::build::main build.rs:5-15" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp search", + "ok": true, + "seconds": 0.0, + "bytes": 113, + "note": "function main build.rs:5" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp callers", + "ok": true, + "seconds": 0.0, + "bytes": 53, + "note": "callers of semver::build::main (0 sure, ≈100% real):" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp callees", + "ok": true, + "seconds": 0.0, + "bytes": 70, + "note": "calls from semver::build::main:" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp impact", + "ok": true, + "seconds": 0.0, + "bytes": 71, + "note": "impact of semver::build::main (depth 3): 0 symbols in 0 files, 0 tests" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp hierarchy", + "ok": true, + "seconds": 0.0, + "bytes": 46, + "note": "enum semver::error::ErrorKind src/error.rs:4" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp deps", + "ok": true, + "seconds": 0.0, + "bytes": 27, + "note": "/" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp context", + "ok": true, + "seconds": 0.0, + "bytes": 482, + "note": "[gitnext] Code related to this task, picked from the index (may be incomplete; read files for more):" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp replace_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 17, + "note": "ok build.rs:5-15" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp insert_after", + "ok": true, + "seconds": 0.0, + "bytes": 55, + "note": "ok build.rs:17-27" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp annotate", + "ok": true, + "seconds": 0.0, + "bytes": 15, + "note": "stored 1 notes" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp locate", + "ok": true, + "seconds": 0.0, + "bytes": 332, + "note": "locations (1):" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp check", + "ok": true, + "seconds": 15.3, + "bytes": 197, + "note": "check: 1 symbol changed (main_added)" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp why", + "ok": true, + "seconds": 14.1, + "bytes": 100, + "note": "why: test — passes (14.1s), nothing to explain" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp tests_for", + "ok": true, + "seconds": 0.0, + "bytes": 65, + "note": "no tests reach main (depth 4) — it is untested by the call graph" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp history", + "ok": true, + "seconds": 0.0, + "bytes": 123, + "note": "history of main (build.rs), 1 changes:" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp changelog", + "ok": true, + "seconds": 0.0, + "bytes": 653, + "note": "changelog HEAD~10..HEAD: 1 commits, 28 files, 165 symbol changes" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp diff", + "ok": true, + "seconds": 0.0, + "bytes": 55, + "note": "modified build.rs" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp rename_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 243, + "note": "renamed main → main_mcp: 1 places in 1 files" + }, + { + "repo": "semver", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp delete_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 55, + "note": "ok build.rs:17-16" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "status", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 247, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "log", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 65, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "diff", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "index", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 69, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "map ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 4568, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 239, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "outline ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 110088, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "read", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 200, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "show", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 228, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "search", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 36, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "search --text", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 352, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "symbols ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 321, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 240, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "callees", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 123, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "impact", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 318, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "hierarchy", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 3909, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "deps", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 233, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "context", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 576, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "since", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 34, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "locate", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 275, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "history", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 134, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "changelog", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.2, + "bytes": 2074, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.2, + "bytes": 3215, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "activity", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 481, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "hotspots", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 1702, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "dead", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 6289, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "cycles", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 695, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "entrypoints", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 143, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "journal", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 73, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "brief", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 215, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "libs", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 817, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 809, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 355, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "look ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 151, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "look <3 targets>", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 2389, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "doctor", + "ok": true, + "crashed": false, + "code": 1, + "seconds": 0.0, + "bytes": 639, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "ops", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 3471, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "branches", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 115, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "timeline", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 243, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 384, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "digest", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 70, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "--json look", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 809, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "--json callers", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 1091, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "--json overview", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 3215, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "--json tests-for", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 384, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "bench", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 764, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "edit replace", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 22, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "rename", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 141, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "diff (after rename)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 460, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "ops (after edits)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 210, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "add", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "status (staged)", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 528, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "msg", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 35, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "commit", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.1, + "bytes": 148, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "undo", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 138, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "reset ", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 0, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "cmd": "undo --op 1", + "ok": true, + "crashed": false, + "code": 0, + "seconds": 0.0, + "bytes": 142, + "note": "" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp look", + "ok": true, + "seconds": 0.0, + "bytes": 1213, + "note": "=== indexmap::borsh::check_zst" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp overview", + "ok": true, + "seconds": 0.1, + "bytes": 3214, + "note": "indexmap · 36 code files (rust) · 1028 functions and types · 179 tests · ≈120k tokens of source" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp brief", + "ok": true, + "seconds": 0.0, + "bytes": 207, + "note": "# brief · indexmap · branch HEAD · 36 code files" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp entrypoints", + "ok": true, + "seconds": 0.0, + "bytes": 143, + "note": "route RawEntryApiV1::raw_entry_v1 src/map/raw_entry_v1.rs:66 GET a" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp map", + "ok": true, + "seconds": 0.0, + "bytes": 781, + "note": "# `/ (repository root)`" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp outline", + "ok": true, + "seconds": 0.0, + "bytes": 239, + "note": "# src/borsh.rs · 127 lines · ~965 tok" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp read", + "ok": true, + "seconds": 0.0, + "bytes": 200, + "note": "src/borsh.rs:93-98 check_zst" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp changes", + "ok": true, + "seconds": 0.0, + "bytes": 28, + "note": "no changes since last check" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp since", + "ok": true, + "seconds": 0.0, + "bytes": 11, + "note": "no changes" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp show", + "ok": true, + "seconds": 0.0, + "bytes": 228, + "note": "function indexmap::borsh::check_zst src/borsh.rs:93-98" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp search", + "ok": true, + "seconds": 0.0, + "bytes": 36, + "note": "function check_zst src/borsh.rs:93" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp callers", + "ok": true, + "seconds": 0.0, + "bytes": 240, + "note": "callers of indexmap::borsh::check_zst (4 sure, ≈100% real):" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp callees", + "ok": true, + "seconds": 0.0, + "bytes": 123, + "note": "calls from indexmap::borsh::check_zst:" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp impact", + "ok": true, + "seconds": 0.0, + "bytes": 318, + "note": "impact of indexmap::borsh::check_zst (depth 3): 4 symbols in 1 files, 0 tests" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp hierarchy", + "ok": true, + "seconds": 0.0, + "bytes": 3909, + "note": "struct indexmap::inner::Core src/inner.rs:29" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp deps", + "ok": true, + "seconds": 0.0, + "bytes": 27, + "note": "/" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp context", + "ok": true, + "seconds": 0.0, + "bytes": 576, + "note": "[gitnext] Code related to this task, picked from the index (may be incomplete; read files for more):" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp replace_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 22, + "note": "ok src/borsh.rs:93-98" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp insert_after", + "ok": true, + "seconds": 0.0, + "bytes": 68, + "note": "ok src/borsh.rs:100-105" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp annotate", + "ok": true, + "seconds": 0.0, + "bytes": 15, + "note": "stored 1 notes" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp locate", + "ok": true, + "seconds": 0.0, + "bytes": 275, + "note": "locations (1):" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp check", + "ok": true, + "seconds": 16.3, + "bytes": 377, + "note": "check: 2 symbols changed (check_zst, check_zst_added)" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp why", + "ok": true, + "seconds": 1.1, + "bytes": 182, + "note": "why: test_binary_search_by, test_binary_search_by — passes (1.1s), nothing to explain" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp tests_for", + "ok": true, + "seconds": 0.0, + "bytes": 384, + "note": "tests reaching check_zst (2), most likely to fail first:" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp history", + "ok": true, + "seconds": 0.0, + "bytes": 134, + "note": "history of check_zst (src/borsh.rs), 1 changes:" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp changelog", + "ok": true, + "seconds": 0.2, + "bytes": 2079, + "note": "changelog HEAD~10..HEAD: 1 commits, 46 files, 1181 symbol changes" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp diff", + "ok": true, + "seconds": 0.0, + "bytes": 66, + "note": "modified src/borsh.rs" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp rename_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 139, + "note": "renamed check_zst → check_zst_mcp: 5 places in 1 files" + }, + { + "repo": "indexmap", + "lang": "rust", + "crashed": false, + "code": 0, + "cmd": "mcp delete_symbol", + "ok": true, + "seconds": 0.0, + "bytes": 67, + "note": "ok src/borsh.rs:100-99" + } +] \ No newline at end of file diff --git a/eval/results/smoke.md b/eval/results/smoke.md new file mode 100644 index 0000000..8ca7237 --- /dev/null +++ b/eval/results/smoke.md @@ -0,0 +1,90 @@ +860 calls: 86 commands and MCP tools × 10 projects. Not ok: 0, crashed: 0, slower than 20s: 0. + +| command | ok in | slowest, s | not ok: project — what it said | +|---|---:|---:|---| +| `--json callers` | 10/10 | 1.3 | | +| `--json look` | 10/10 | 1.4 | | +| `--json overview` | 10/10 | 3.8 | | +| `--json tests-for` | 10/10 | 1.5 | | +| `activity` | 10/10 | 0.0 | | +| `add` | 10/10 | 0.2 | | +| `bench` | 10/10 | 2.9 | | +| `branches` | 10/10 | 0.1 | | +| `brief` | 10/10 | 0.1 | | +| `callees` | 10/10 | 0.1 | | +| `callers` | 10/10 | 1.6 | | +| `changelog` | 10/10 | 1.0 | | +| `commit` | 10/10 | 2.9 | | +| `context` | 10/10 | 0.1 | | +| `cycles` | 10/10 | 1.3 | | +| `dead` | 10/10 | 1.5 | | +| `deps` | 10/10 | 1.2 | | +| `diff` | 10/10 | 0.0 | | +| `diff (after rename)` | 10/10 | 0.1 | | +| `digest` | 10/10 | 0.0 | | +| `doctor` | 10/10 | 0.1 | | +| `edit replace` | 10/10 | 0.1 | | +| `entrypoints` | 10/10 | 0.1 | | +| `hierarchy` | 10/10 | 0.1 | | +| `history` | 10/10 | 0.1 | | +| `hotspots` | 10/10 | 1.8 | | +| `impact` | 10/10 | 1.6 | | +| `index` | 10/10 | 0.0 | | +| `journal` | 10/10 | 0.0 | | +| `libs` | 10/10 | 0.2 | | +| `locate` | 10/10 | 0.1 | | +| `log` | 10/10 | 0.0 | | +| `look <3 targets>` | 10/10 | 1.4 | | +| `look ` | 10/10 | 0.1 | | +| `look ` | 10/10 | 0.1 | | +| `look ` | 10/10 | 1.4 | | +| `map ` | 10/10 | 1.4 | | +| `msg` | 10/10 | 0.1 | | +| `ops` | 10/10 | 0.0 | | +| `ops (after edits)` | 10/10 | 0.0 | | +| `outline ` | 10/10 | 0.1 | | +| `outline ` | 10/10 | 0.1 | | +| `overview` | 10/10 | 3.8 | | +| `read` | 10/10 | 0.1 | | +| `rename` | 10/10 | 0.1 | | +| `reset ` | 10/10 | 0.0 | | +| `search` | 10/10 | 0.1 | | +| `search --text` | 10/10 | 0.1 | | +| `show` | 10/10 | 1.4 | | +| `since` | 10/10 | 0.0 | | +| `status` | 10/10 | 0.0 | | +| `status (staged)` | 10/10 | 0.1 | | +| `symbols ` | 10/10 | 0.1 | | +| `tests-for` | 10/10 | 1.5 | | +| `timeline` | 10/10 | 0.0 | | +| `undo` | 10/10 | 0.0 | | +| `undo --op 1` | 10/10 | 0.0 | | +| `mcp annotate` | 10/10 | 0.1 | | +| `mcp brief` | 10/10 | 0.0 | | +| `mcp callees` | 10/10 | 0.0 | | +| `mcp callers` | 10/10 | 0.0 | | +| `mcp changelog` | 10/10 | 0.8 | | +| `mcp changes` | 10/10 | 0.0 | | +| `mcp check` | 10/10 | 16.3 | | +| `mcp context` | 10/10 | 0.0 | | +| `mcp delete_symbol` | 10/10 | 0.1 | | +| `mcp deps` | 10/10 | 0.0 | | +| `mcp diff` | 10/10 | 0.1 | | +| `mcp entrypoints` | 10/10 | 0.0 | | +| `mcp hierarchy` | 10/10 | 0.0 | | +| `mcp history` | 10/10 | 0.0 | | +| `mcp impact` | 10/10 | 0.0 | | +| `mcp insert_after` | 10/10 | 0.0 | | +| `mcp locate` | 10/10 | 0.0 | | +| `mcp look` | 10/10 | 1.5 | | +| `mcp map` | 10/10 | 0.2 | | +| `mcp outline` | 10/10 | 0.0 | | +| `mcp overview` | 10/10 | 2.5 | | +| `mcp read` | 10/10 | 0.0 | | +| `mcp rename_symbol` | 10/10 | 0.0 | | +| `mcp replace_symbol` | 10/10 | 0.0 | | +| `mcp search` | 10/10 | 0.0 | | +| `mcp show` | 10/10 | 0.0 | | +| `mcp since` | 10/10 | 0.0 | | +| `mcp tests_for` | 10/10 | 0.0 | | +| `mcp why` | 10/10 | 14.1 | | diff --git a/eval/results/why-rank-go.json b/eval/results/why-rank-go.json new file mode 100644 index 0000000..cba468f --- /dev/null +++ b/eval/results/why-rank-go.json @@ -0,0 +1,563 @@ +[ + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::SetHelpTemplate", + "variant": "static", + "test": "TestSetHelpTemplate", + "place": 1, + "listed": 110, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::SetHelpTemplate", + "variant": "nochange", + "test": "TestSetHelpTemplate", + "place": 1, + "listed": 68, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::SetHelpTemplate", + "variant": "default", + "test": "TestSetHelpTemplate", + "place": 1, + "listed": 68, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "doc::hasSeeAlso", + "variant": "static", + "test": "TestGenManDoc", + "place": 7, + "listed": 60, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "doc::hasSeeAlso", + "variant": "nochange", + "test": "TestGenManDoc", + "place": 9, + "listed": 39, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "doc::hasSeeAlso", + "variant": "default", + "test": "TestGenManDoc", + "place": 1, + "listed": 39, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::UsageFunc", + "variant": "static", + "test": "TestNoArgs_WithArgs", + "place": 82, + "listed": 105, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::UsageFunc", + "variant": "nochange", + "test": "TestNoArgs_WithArgs", + "place": 17, + "listed": 62, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::UsageFunc", + "variant": "default", + "test": "TestNoArgs_WithArgs", + "place": 4, + "listed": 62, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::InheritedFlags", + "variant": "static", + "test": "TestActiveHelpAlone", + "place": 91, + "listed": 106, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::InheritedFlags", + "variant": "nochange", + "test": "TestActiveHelpAlone", + "place": 29, + "listed": 64, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::InheritedFlags", + "variant": "default", + "test": "TestActiveHelpAlone", + "place": 6, + "listed": 64, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::findNext", + "variant": "static", + "test": "TestAliasPrefixMatching", + "place": 49, + "listed": 106, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::findNext", + "variant": "nochange", + "test": "TestAliasPrefixMatching", + "place": 15, + "listed": 48, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::findNext", + "variant": "default", + "test": "TestAliasPrefixMatching", + "place": 1, + "listed": 48, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::writeRequiredFlag", + "variant": "static", + "test": "TestBashCompletions", + "place": 25, + "listed": 49, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::writeRequiredFlag", + "variant": "nochange", + "test": "TestBashCompletions", + "place": 19, + "listed": 51, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::writeRequiredFlag", + "variant": "default", + "test": "TestBashCompletions", + "place": 1, + "listed": 51, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::InitDefaultHelpFlag", + "variant": "static", + "test": "TestActiveHelpAlone", + "place": 8, + "listed": 106, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::InitDefaultHelpFlag", + "variant": "nochange", + "test": "TestActiveHelpAlone", + "place": 48, + "listed": 64, + "named": false, + "learned": true + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::InitDefaultHelpFlag", + "variant": "default", + "test": "TestActiveHelpAlone", + "place": 1, + "listed": 64, + "named": false, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "main::Mux::Find", + "variant": "static", + "test": "TestGetHead", + "place": 1, + "listed": 41, + "named": true, + "learned": false + }, + { + "repo": "chi", + "lang": "go", + "target": "main::Mux::Find", + "variant": "nochange", + "test": "TestGetHead", + "place": 1, + "listed": 49, + "named": true, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "main::Mux::Find", + "variant": "default", + "test": "TestGetHead", + "place": 1, + "listed": 49, + "named": true, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "main::node::walk", + "variant": "static", + "test": "TestCustomHTTPMethod", + "place": null, + "listed": 32, + "named": false, + "learned": false + }, + { + "repo": "chi", + "lang": "go", + "target": "main::node::walk", + "variant": "nochange", + "test": "TestCustomHTTPMethod", + "place": 10, + "listed": 37, + "named": false, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "main::node::walk", + "variant": "default", + "test": "TestCustomHTTPMethod", + "place": 1, + "listed": 37, + "named": false, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::NewWrapResponseWriter", + "variant": "static", + "test": "TestRequestLogger", + "place": null, + "listed": 6, + "named": false, + "learned": false + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::NewWrapResponseWriter", + "variant": "nochange", + "test": "TestRequestLogger", + "place": 6, + "listed": 14, + "named": false, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::NewWrapResponseWriter", + "variant": "default", + "test": "TestRequestLogger", + "place": 1, + "listed": 14, + "named": false, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::encoderGzip", + "variant": "static", + "test": "TestCompressor", + "place": null, + "listed": 35, + "named": false, + "learned": false + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::encoderGzip", + "variant": "nochange", + "test": "TestCompressor", + "place": 11, + "listed": 47, + "named": false, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::encoderGzip", + "variant": "default", + "test": "TestCompressor", + "place": 1, + "listed": 47, + "named": false, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "main::walk", + "variant": "static", + "test": "TestCustomHTTPMethod", + "place": 1, + "listed": 32, + "named": true, + "learned": false + }, + { + "repo": "chi", + "lang": "go", + "target": "main::walk", + "variant": "nochange", + "test": "TestCustomHTTPMethod", + "place": 1, + "listed": 37, + "named": true, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "main::walk", + "variant": "default", + "test": "TestCustomHTTPMethod", + "place": 1, + "listed": 37, + "named": true, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::untrustedPeer", + "variant": "static", + "test": "TestAdvisory_GHSA_j6qf_3m9c_vwj3", + "place": 9, + "listed": 21, + "named": false, + "learned": false + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::untrustedPeer", + "variant": "nochange", + "test": "TestAdvisory_GHSA_j6qf_3m9c_vwj3", + "place": 5, + "listed": 39, + "named": false, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::untrustedPeer", + "variant": "default", + "test": "TestAdvisory_GHSA_j6qf_3m9c_vwj3", + "place": 1, + "listed": 39, + "named": false, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "main::node::replaceChild", + "variant": "static", + "test": "TestCompressor", + "place": 1, + "listed": 35, + "named": true, + "learned": false + }, + { + "repo": "chi", + "lang": "go", + "target": "main::node::replaceChild", + "variant": "nochange", + "test": "TestCompressor", + "place": 1, + "listed": 47, + "named": true, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "main::node::replaceChild", + "variant": "default", + "test": "TestCompressor", + "place": 1, + "listed": 47, + "named": true, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::ClientIPFromXFF", + "variant": "static", + "test": "TestClientIPFromXFF_SingleTrustedHop", + "place": 1, + "listed": 21, + "named": true, + "learned": false + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::ClientIPFromXFF", + "variant": "nochange", + "test": "TestClientIPFromXFF_SingleTrustedHop", + "place": 1, + "listed": 40, + "named": true, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::ClientIPFromXFF", + "variant": "default", + "test": "TestClientIPFromXFF_SingleTrustedHop", + "place": 1, + "listed": 40, + "named": true, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::ContentCharset", + "variant": "static", + "test": "TestContentCharset", + "place": 1, + "listed": 33, + "named": false, + "learned": false + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::ContentCharset", + "variant": "nochange", + "test": "TestContentCharset", + "place": 1, + "listed": 33, + "named": false, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "middleware::ContentCharset", + "variant": "default", + "test": "TestContentCharset", + "place": 1, + "listed": 33, + "named": false, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "main::node::setEndpoint", + "variant": "static", + "test": "TestBasicAuth", + "place": 2, + "listed": 16, + "named": true, + "learned": false + }, + { + "repo": "chi", + "lang": "go", + "target": "main::node::setEndpoint", + "variant": "nochange", + "test": "TestBasicAuth", + "place": 2, + "listed": 33, + "named": true, + "learned": true + }, + { + "repo": "chi", + "lang": "go", + "target": "main::node::setEndpoint", + "variant": "default", + "test": "TestBasicAuth", + "place": 2, + "listed": 33, + "named": true, + "learned": true + } +] \ No newline at end of file diff --git a/eval/results/why-rank-go.md b/eval/results/why-rank-go.md new file mode 100644 index 0000000..f4d4337 --- /dev/null +++ b/eval/results/why-rank-go.md @@ -0,0 +1,13 @@ +| order | repo | bugs | first | in 3 | in 8 | in the list | empty list | named in the failure | from the learned map | +|---|---|---:|---:|---:|---:|---:|---:|---:|---:| +| static | cobra | 7 | 1 (14%) | 1 (14%) | 3 (42%) | 7 | 0 | 0 | 0 | +| static | chi | 10 | 5 (50%) | 6 (60%) | 6 (60%) | 7 | 0 | 5 | 0 | +| static | all | 17 | 6 (35%) | 7 (41%) | 9 (52%) | 14 | 0 | 5 | 0 | +| nochange | cobra | 7 | 1 (14%) | 1 (14%) | 1 (14%) | 7 | 0 | 0 | 7 | +| nochange | chi | 10 | 5 (50%) | 6 (60%) | 8 (80%) | 10 | 0 | 5 | 10 | +| nochange | all | 17 | 6 (35%) | 7 (41%) | 9 (52%) | 17 | 0 | 5 | 17 | +| default | cobra | 7 | 5 (71%) | 5 (71%) | 7 (100%) | 7 | 0 | 0 | 7 | +| default | chi | 10 | 9 (90%) | 10 (100%) | 10 (100%) | 10 | 0 | 5 | 10 | +| default | all | 17 | 14 (82%) | 15 (88%) | 17 (100%) | 17 | 0 | 5 | 17 | + +51 answers in 1265 s. diff --git a/eval/results/why-rank-rust.json b/eval/results/why-rank-rust.json new file mode 100644 index 0000000..b2b2938 --- /dev/null +++ b/eval/results/why-rank-rust.json @@ -0,0 +1,662 @@ +[ + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::pre_is_compatible", + "variant": "static", + "test": "test_caret", + "place": 8, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::pre_is_compatible", + "variant": "nochange", + "test": "test_caret", + "place": 2, + "listed": 32, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::pre_is_compatible", + "variant": "default", + "test": "test_caret", + "place": 1, + "listed": 32, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::parse::numeric_identifier", + "variant": "static", + "test": "test_any", + "place": 14, + "listed": 18, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::parse::numeric_identifier", + "variant": "nochange", + "test": "test_any", + "place": 8, + "listed": 12, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::parse::numeric_identifier", + "variant": "default", + "test": "test_any", + "place": 1, + "listed": 12, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_less", + "variant": "static", + "test": "test_less_than", + "place": 1, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_less", + "variant": "nochange", + "test": "test_less_than", + "place": 1, + "listed": 37, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_less", + "variant": "default", + "test": "test_less_than", + "place": 1, + "listed": 37, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_caret", + "variant": "static", + "test": "test_basic", + "place": 16, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_caret", + "variant": "nochange", + "test": "test_basic", + "place": 1, + "listed": 30, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_caret", + "variant": "default", + "test": "test_basic", + "place": 1, + "listed": 30, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::identifier::Identifier::eq", + "variant": "static", + "test": "test_cargo3202", + "place": null, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::identifier::Identifier::eq", + "variant": "nochange", + "test": "test_cargo3202", + "place": 7, + "listed": 24, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::identifier::Identifier::eq", + "variant": "default", + "test": "test_cargo3202", + "place": 1, + "listed": 24, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::display::pad", + "variant": "static", + "test": "test_align", + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::display::pad", + "variant": "nochange", + "test": "test_align", + "place": 4, + "listed": 24, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::display::pad", + "variant": "default", + "test": "test_align", + "place": 1, + "listed": 24, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_req", + "variant": "static", + "test": "test_basic", + "place": 3, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_req", + "variant": "nochange", + "test": "test_basic", + "place": 6, + "listed": 30, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_req", + "variant": "default", + "test": "test_basic", + "place": 1, + "listed": 30, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::parse::identifier", + "variant": "static", + "test": "test_comparator_parse", + "place": null, + "listed": 3, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::parse::identifier", + "variant": "nochange", + "test": "test_comparator_parse", + "place": 20, + "listed": 27, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::parse::identifier", + "variant": "default", + "test": "test_comparator_parse", + "place": 1, + "listed": 27, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_tilde", + "variant": "static", + "test": "test_tilde", + "place": 1, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_tilde", + "variant": "nochange", + "test": "test_tilde", + "place": 1, + "listed": 32, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_tilde", + "variant": "default", + "test": "test_tilde", + "place": 1, + "listed": 32, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::error::QuotedChar::fmt", + "variant": "static", + "test": "test_comparator_parse", + "place": null, + "listed": 3, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::error::QuotedChar::fmt", + "variant": "nochange", + "test": "test_comparator_parse", + "place": 4, + "listed": 27, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::error::QuotedChar::fmt", + "variant": "default", + "test": "test_comparator_parse", + "place": 1, + "listed": 27, + "named": false, + "learned": true + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::increment_indices", + "variant": "static", + "test": "shift_insert", + "place": 49, + "listed": 94, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::increment_indices", + "variant": "nochange", + "test": "shift_insert", + "place": 14, + "listed": 42, + "named": false, + "learned": true + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::increment_indices", + "variant": "default", + "test": "shift_insert", + "place": 5, + "listed": 42, + "named": false, + "learned": true + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::move_index_inner", + "variant": "static", + "test": "insert_sorted_bad", + "place": 1, + "listed": 123, + "named": true, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::move_index_inner", + "variant": "nochange", + "test": "insert_sorted_bad", + "place": 1, + "listed": 46, + "named": true, + "learned": true + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::move_index_inner", + "variant": "default", + "test": "insert_sorted_bad", + "place": 1, + "listed": 46, + "named": true, + "learned": true + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::entry::OccupiedEntry::swap_indices", + "variant": "static", + "test": null, + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::entry::OccupiedEntry::swap_indices", + "variant": "nochange", + "test": null, + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::entry::OccupiedEntry::swap_indices", + "variant": "default", + "test": null, + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::map::IndexMap::with_capacity_and_hasher", + "variant": "static", + "test": null, + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::map::IndexMap::with_capacity_and_hasher", + "variant": "nochange", + "test": null, + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::map::IndexMap::with_capacity_and_hasher", + "variant": "default", + "test": null, + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::shift_remove_finish", + "variant": "static", + "test": "shift_remove_entry", + "place": 2, + "listed": 68, + "named": true, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::shift_remove_finish", + "variant": "nochange", + "test": "shift_remove_entry", + "place": 2, + "listed": 30, + "named": true, + "learned": true + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::shift_remove_finish", + "variant": "default", + "test": "shift_remove_entry", + "place": 2, + "listed": 30, + "named": true, + "learned": true + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::swap_indices", + "variant": "static", + "test": null, + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::swap_indices", + "variant": "nochange", + "test": null, + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::swap_indices", + "variant": "default", + "test": null, + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::map::IndexMap::replace_index", + "variant": "static", + "test": null, + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::map::IndexMap::replace_index", + "variant": "nochange", + "test": null, + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::map::IndexMap::replace_index", + "variant": "default", + "test": null, + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::entry::OccupiedEntry::move_index", + "variant": "static", + "test": "insert_sorted_bad", + "place": 35, + "listed": 123, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::entry::OccupiedEntry::move_index", + "variant": "nochange", + "test": "insert_sorted_bad", + "place": 12, + "listed": 46, + "named": false, + "learned": true + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::entry::OccupiedEntry::move_index", + "variant": "default", + "test": "insert_sorted_bad", + "place": 1, + "listed": 46, + "named": false, + "learned": true + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::try_reserve_entries", + "variant": "static", + "test": "try_reserve", + "place": 4, + "listed": 13, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::try_reserve_entries", + "variant": "nochange", + "test": "try_reserve", + "place": 3, + "listed": 15, + "named": false, + "learned": true + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::inner::Core::try_reserve_entries", + "variant": "default", + "test": "try_reserve", + "place": 1, + "listed": 15, + "named": false, + "learned": true + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::set::IndexSet::is_subset", + "variant": "static", + "test": "comparisons", + "place": 2, + "listed": 19, + "named": false, + "learned": false + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::set::IndexSet::is_subset", + "variant": "nochange", + "test": "comparisons", + "place": 3, + "listed": 33, + "named": false, + "learned": true + }, + { + "repo": "indexmap", + "lang": "rust", + "target": "indexmap::set::IndexSet::is_subset", + "variant": "default", + "test": "comparisons", + "place": 1, + "listed": 33, + "named": false, + "learned": true + } +] \ No newline at end of file diff --git a/eval/results/why-rank-rust.md b/eval/results/why-rank-rust.md new file mode 100644 index 0000000..2df5d6f --- /dev/null +++ b/eval/results/why-rank-rust.md @@ -0,0 +1,13 @@ +| order | repo | bugs | first | in 3 | in 8 | in the list | empty list | named in the failure | from the learned map | +|---|---|---:|---:|---:|---:|---:|---:|---:|---:| +| static | semver | 10 | 2 (20%) | 3 (30%) | 4 (40%) | 6 | 1 | 0 | 0 | +| static | indexmap | 10 | 1 (10%) | 3 (30%) | 4 (40%) | 6 | 4 | 2 | 0 | +| static | all | 20 | 3 (15%) | 6 (30%) | 8 (40%) | 12 | 5 | 2 | 0 | +| nochange | semver | 10 | 3 (30%) | 4 (40%) | 9 (90%) | 10 | 0 | 0 | 10 | +| nochange | indexmap | 10 | 1 (10%) | 4 (40%) | 4 (40%) | 6 | 4 | 2 | 6 | +| nochange | all | 20 | 4 (20%) | 8 (40%) | 13 (65%) | 16 | 4 | 2 | 16 | +| default | semver | 10 | 10 (100%) | 10 (100%) | 10 (100%) | 10 | 0 | 0 | 10 | +| default | indexmap | 10 | 4 (40%) | 5 (50%) | 6 (60%) | 6 | 4 | 2 | 6 | +| default | all | 20 | 14 (70%) | 15 (75%) | 16 (80%) | 16 | 4 | 2 | 16 | + +60 answers in 309 s. diff --git a/eval/results/why-rank.json b/eval/results/why-rank.json new file mode 100644 index 0000000..162cea4 --- /dev/null +++ b/eval/results/why-rank.json @@ -0,0 +1,1223 @@ +[ + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::SetHelpTemplate", + "variant": "static", + "test": "TestSetHelpTemplate", + "place": 1, + "listed": 110, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::SetHelpTemplate", + "variant": "nochange", + "test": "TestSetHelpTemplate", + "place": 1, + "listed": 110, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::SetHelpTemplate", + "variant": "default", + "test": "TestSetHelpTemplate", + "place": 1, + "listed": 110, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "doc::hasSeeAlso", + "variant": "static", + "test": "TestGenManDoc", + "place": 7, + "listed": 60, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "doc::hasSeeAlso", + "variant": "nochange", + "test": "TestGenManDoc", + "place": 7, + "listed": 60, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "doc::hasSeeAlso", + "variant": "default", + "test": "TestGenManDoc", + "place": 7, + "listed": 60, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::UsageFunc", + "variant": "static", + "test": "TestNoArgs_WithArgs", + "place": 82, + "listed": 105, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::UsageFunc", + "variant": "nochange", + "test": "TestNoArgs_WithArgs", + "place": 82, + "listed": 105, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::UsageFunc", + "variant": "default", + "test": "TestNoArgs_WithArgs", + "place": 82, + "listed": 105, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::InheritedFlags", + "variant": "static", + "test": "TestActiveHelpAlone", + "place": 91, + "listed": 106, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::InheritedFlags", + "variant": "nochange", + "test": "TestActiveHelpAlone", + "place": 91, + "listed": 106, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::InheritedFlags", + "variant": "default", + "test": "TestActiveHelpAlone", + "place": 91, + "listed": 106, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::findNext", + "variant": "static", + "test": "TestAliasPrefixMatching", + "place": 49, + "listed": 106, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::findNext", + "variant": "nochange", + "test": "TestAliasPrefixMatching", + "place": 49, + "listed": 106, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::findNext", + "variant": "default", + "test": "TestAliasPrefixMatching", + "place": 49, + "listed": 106, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::writeRequiredFlag", + "variant": "static", + "test": "TestBashCompletions", + "place": 25, + "listed": 49, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::writeRequiredFlag", + "variant": "nochange", + "test": "TestBashCompletions", + "place": 25, + "listed": 49, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::writeRequiredFlag", + "variant": "default", + "test": "TestBashCompletions", + "place": 25, + "listed": 49, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::InitDefaultHelpFlag", + "variant": "static", + "test": "TestActiveHelpAlone", + "place": 8, + "listed": 106, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::InitDefaultHelpFlag", + "variant": "nochange", + "test": "TestActiveHelpAlone", + "place": 8, + "listed": 106, + "named": false, + "learned": false + }, + { + "repo": "cobra", + "lang": "go", + "target": "main::Command::InitDefaultHelpFlag", + "variant": "default", + "test": "TestActiveHelpAlone", + "place": 8, + "listed": 106, + "named": false, + "learned": false + }, + { + "repo": "click", + "lang": "python", + "target": "click::core::Option::resolve_envvar_value", + "variant": "static", + "test": "test_auto_envvar_flattens_name_case", + "place": null, + "listed": 75, + "named": false, + "learned": false + }, + { + "repo": "click", + "lang": "python", + "target": "click::core::Option::resolve_envvar_value", + "variant": "nochange", + "test": "test_auto_envvar_flattens_name_case", + "place": 21, + "listed": 99, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::core::Option::resolve_envvar_value", + "variant": "default", + "test": "test_auto_envvar_flattens_name_case", + "place": 1, + "listed": 99, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::parser::_OptionParser::_match_short_opt", + "variant": "static", + "test": "test_counting", + "place": null, + "listed": 75, + "named": false, + "learned": false + }, + { + "repo": "click", + "lang": "python", + "target": "click::parser::_OptionParser::_match_short_opt", + "variant": "nochange", + "test": "test_counting", + "place": 8, + "listed": 151, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::parser::_OptionParser::_match_short_opt", + "variant": "default", + "test": "test_counting", + "place": 1, + "listed": 151, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::core::Group::parse_args", + "variant": "static", + "test": "test_add_different_name", + "place": 4, + "listed": 32, + "named": true, + "learned": false + }, + { + "repo": "click", + "lang": "python", + "target": "click::core::Group::parse_args", + "variant": "nochange", + "test": "test_add_different_name", + "place": 4, + "listed": 78, + "named": true, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::core::Group::parse_args", + "variant": "default", + "test": "test_add_different_name", + "place": 4, + "listed": 78, + "named": true, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::exceptions::MissingParameter::format_message", + "variant": "static", + "test": "test_bad_defaults_for_nargs", + "place": null, + "listed": 75, + "named": false, + "learned": false + }, + { + "repo": "click", + "lang": "python", + "target": "click::exceptions::MissingParameter::format_message", + "variant": "nochange", + "test": "test_bad_defaults_for_nargs", + "place": 3, + "listed": 126, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::exceptions::MissingParameter::format_message", + "variant": "default", + "test": "test_bad_defaults_for_nargs", + "place": 1, + "listed": 126, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::core::Argument::make_metavar", + "variant": "static", + "test": "test_argument_get_help_record_never_none", + "place": 8, + "listed": 19, + "named": false, + "learned": false + }, + { + "repo": "click", + "lang": "python", + "target": "click::core::Argument::make_metavar", + "variant": "nochange", + "test": "test_argument_get_help_record_never_none", + "place": 3, + "listed": 11, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::core::Argument::make_metavar", + "variant": "default", + "test": "test_argument_get_help_record_never_none", + "place": 1, + "listed": 11, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::types::Tuple::convert", + "variant": "static", + "test": "test_bad_defaults_for_multiple", + "place": null, + "listed": 75, + "named": false, + "learned": false + }, + { + "repo": "click", + "lang": "python", + "target": "click::types::Tuple::convert", + "variant": "nochange", + "test": "test_bad_defaults_for_multiple", + "place": 1, + "listed": 118, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::types::Tuple::convert", + "variant": "default", + "test": "test_bad_defaults_for_multiple", + "place": 1, + "listed": 118, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::parser::_OptionParser::_process_args_for_options", + "variant": "static", + "test": "test_aliased_command_canonical_name", + "place": 59, + "listed": 73, + "named": false, + "learned": false + }, + { + "repo": "click", + "lang": "python", + "target": "click::parser::_OptionParser::_process_args_for_options", + "variant": "nochange", + "test": "test_aliased_command_canonical_name", + "place": 107, + "listed": 141, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::parser::_OptionParser::_process_args_for_options", + "variant": "default", + "test": "test_aliased_command_canonical_name", + "place": 1, + "listed": 141, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::shell_completion::_is_incomplete_option", + "variant": "static", + "test": "test_argument_default", + "place": 20, + "listed": 32, + "named": false, + "learned": false + }, + { + "repo": "click", + "lang": "python", + "target": "click::shell_completion::_is_incomplete_option", + "variant": "nochange", + "test": "test_argument_default", + "place": 7, + "listed": 65, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::shell_completion::_is_incomplete_option", + "variant": "default", + "test": "test_argument_default", + "place": 1, + "listed": 65, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::types::Path::shell_complete", + "variant": "static", + "test": "test_path_types", + "place": 1, + "listed": 41, + "named": false, + "learned": false + }, + { + "repo": "click", + "lang": "python", + "target": "click::types::Path::shell_complete", + "variant": "nochange", + "test": "test_path_types", + "place": 2, + "listed": 81, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::types::Path::shell_complete", + "variant": "default", + "test": "test_path_types", + "place": 1, + "listed": 81, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::shell_completion::ZshComplete::format_completion", + "variant": "static", + "test": "test_zsh_full_complete_with_colons", + "place": null, + "listed": 72, + "named": false, + "learned": false + }, + { + "repo": "click", + "lang": "python", + "target": "click::shell_completion::ZshComplete::format_completion", + "variant": "nochange", + "test": "test_zsh_full_complete_with_colons", + "place": 2, + "listed": 112, + "named": false, + "learned": true + }, + { + "repo": "click", + "lang": "python", + "target": "click::shell_completion::ZshComplete::format_completion", + "variant": "default", + "test": "test_zsh_full_complete_with_colons", + "place": 1, + "listed": 112, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::aligned_indent::AlignedIndentFilter::_split_kwds", + "variant": "static", + "test": "test_joins", + "place": null, + "listed": 74, + "named": false, + "learned": false + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::aligned_indent::AlignedIndentFilter::_split_kwds", + "variant": "nochange", + "test": "test_joins", + "place": 6, + "listed": 82, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::aligned_indent::AlignedIndentFilter::_split_kwds", + "variant": "default", + "test": "test_joins", + "place": 1, + "listed": 82, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::aligned_indent::AlignedIndentFilter::_process_case", + "variant": "static", + "test": "test_case_statement", + "place": null, + "listed": 74, + "named": false, + "learned": false + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::aligned_indent::AlignedIndentFilter::_process_case", + "variant": "nochange", + "test": "test_case_statement", + "place": 1, + "listed": 85, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::aligned_indent::AlignedIndentFilter::_process_case", + "variant": "default", + "test": "test_case_statement", + "place": 1, + "listed": 85, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::sql::TokenList::__init__", + "variant": "static", + "test": "test_array_literal", + "place": null, + "listed": 75, + "named": false, + "learned": false + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::sql::TokenList::__init__", + "variant": "nochange", + "test": "test_array_literal", + "place": 49, + "listed": 57, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::sql::TokenList::__init__", + "variant": "default", + "test": "test_array_literal", + "place": 1, + "listed": 57, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::engine::statement_splitter::StatementSplitter::_handle_closing_keyword", + "variant": "static", + "test": "test_issue193_splitting_function", + "place": 56, + "listed": 76, + "named": false, + "learned": false + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::engine::statement_splitter::StatementSplitter::_handle_closing_keyword", + "variant": "nochange", + "test": "test_issue193_splitting_function", + "place": 5, + "listed": 20, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::engine::statement_splitter::StatementSplitter::_handle_closing_keyword", + "variant": "default", + "test": "test_issue193_splitting_function", + "place": 1, + "listed": 20, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::reindent::ReindentFilter::_process_case", + "variant": "static", + "test": "test_compact", + "place": null, + "listed": 79, + "named": false, + "learned": false + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::reindent::ReindentFilter::_process_case", + "variant": "nochange", + "test": "test_compact", + "place": 1, + "listed": 83, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::reindent::ReindentFilter::_process_case", + "variant": "default", + "test": "test_compact", + "place": 1, + "listed": 83, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::sql::NameAliasMixin::get_alias", + "variant": "static", + "test": "test_2d_array_index", + "place": 2, + "listed": 78, + "named": true, + "learned": false + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::sql::NameAliasMixin::get_alias", + "variant": "nochange", + "test": "test_2d_array_index", + "place": 2, + "listed": 63, + "named": true, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::sql::NameAliasMixin::get_alias", + "variant": "default", + "test": "test_2d_array_index", + "place": 2, + "listed": 63, + "named": true, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::sql::TokenList::insert_after", + "variant": "static", + "test": "test_basic", + "place": 72, + "listed": 74, + "named": false, + "learned": false + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::sql::TokenList::insert_after", + "variant": "nochange", + "test": "test_basic", + "place": 13, + "listed": 89, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::sql::TokenList::insert_after", + "variant": "default", + "test": "test_basic", + "place": 1, + "listed": 89, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::others::StripWhitespaceFilter::_stripws_default", + "variant": "static", + "test": "test_issue213_leadingws", + "place": null, + "listed": 79, + "named": false, + "learned": false + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::others::StripWhitespaceFilter::_stripws_default", + "variant": "nochange", + "test": "test_issue213_leadingws", + "place": 2, + "listed": 64, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::others::StripWhitespaceFilter::_stripws_default", + "variant": "default", + "test": "test_issue213_leadingws", + "place": 1, + "listed": 64, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::reindent::ReindentFilter::_split_kwds", + "variant": "static", + "test": "test_php", + "place": null, + "listed": 79, + "named": false, + "learned": false + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::reindent::ReindentFilter::_split_kwds", + "variant": "nochange", + "test": "test_php", + "place": 7, + "listed": 79, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::reindent::ReindentFilter::_split_kwds", + "variant": "default", + "test": "test_php", + "place": 1, + "listed": 79, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::others::SpacesAroundOperatorsFilter::_process", + "variant": "static", + "test": "test_basic", + "place": 50, + "listed": 74, + "named": false, + "learned": false + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::others::SpacesAroundOperatorsFilter::_process", + "variant": "nochange", + "test": "test_basic", + "place": 1, + "listed": 89, + "named": false, + "learned": true + }, + { + "repo": "sqlparse", + "lang": "python", + "target": "sqlparse::filters::others::SpacesAroundOperatorsFilter::_process", + "variant": "default", + "test": "test_basic", + "place": 1, + "listed": 89, + "named": false, + "learned": true + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::pre_is_compatible", + "variant": "static", + "test": "test_caret", + "place": 8, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::pre_is_compatible", + "variant": "nochange", + "test": "test_caret", + "place": 8, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::pre_is_compatible", + "variant": "default", + "test": "test_caret", + "place": 8, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::parse::numeric_identifier", + "variant": "static", + "test": "test_any", + "place": 14, + "listed": 18, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::parse::numeric_identifier", + "variant": "nochange", + "test": "test_any", + "place": 14, + "listed": 18, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::parse::numeric_identifier", + "variant": "default", + "test": "test_any", + "place": 14, + "listed": 18, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_less", + "variant": "static", + "test": "test_less_than", + "place": 1, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_less", + "variant": "nochange", + "test": "test_less_than", + "place": 1, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_less", + "variant": "default", + "test": "test_less_than", + "place": 1, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_caret", + "variant": "static", + "test": "test_basic", + "place": 16, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_caret", + "variant": "nochange", + "test": "test_basic", + "place": 16, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_caret", + "variant": "default", + "test": "test_basic", + "place": 16, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::identifier::Identifier::eq", + "variant": "static", + "test": "test_cargo3202", + "place": null, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::identifier::Identifier::eq", + "variant": "nochange", + "test": "test_cargo3202", + "place": null, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::identifier::Identifier::eq", + "variant": "default", + "test": "test_cargo3202", + "place": null, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::display::pad", + "variant": "static", + "test": "test_align", + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::display::pad", + "variant": "nochange", + "test": "test_align", + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::display::pad", + "variant": "default", + "test": "test_align", + "place": null, + "listed": 0, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_req", + "variant": "static", + "test": "test_basic", + "place": 3, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_req", + "variant": "nochange", + "test": "test_basic", + "place": 3, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_req", + "variant": "default", + "test": "test_basic", + "place": 3, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::parse::identifier", + "variant": "static", + "test": "test_comparator_parse", + "place": null, + "listed": 3, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::parse::identifier", + "variant": "nochange", + "test": "test_comparator_parse", + "place": null, + "listed": 3, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::parse::identifier", + "variant": "default", + "test": "test_comparator_parse", + "place": null, + "listed": 3, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_tilde", + "variant": "static", + "test": "test_tilde", + "place": 1, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_tilde", + "variant": "nochange", + "test": "test_tilde", + "place": 1, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::eval::matches_tilde", + "variant": "default", + "test": "test_tilde", + "place": 1, + "listed": 22, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::error::QuotedChar::fmt", + "variant": "static", + "test": "test_comparator_parse", + "place": null, + "listed": 3, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::error::QuotedChar::fmt", + "variant": "nochange", + "test": "test_comparator_parse", + "place": null, + "listed": 3, + "named": false, + "learned": false + }, + { + "repo": "semver", + "lang": "rust", + "target": "semver::error::QuotedChar::fmt", + "variant": "default", + "test": "test_comparator_parse", + "place": null, + "listed": 3, + "named": false, + "learned": false + } +] \ No newline at end of file diff --git a/eval/results/why-rank.md b/eval/results/why-rank.md new file mode 100644 index 0000000..4162226 --- /dev/null +++ b/eval/results/why-rank.md @@ -0,0 +1,19 @@ +| order | repo | bugs | first | in 3 | in 8 | in the list | empty list | named in the failure | from the learned map | +|---|---|---:|---:|---:|---:|---:|---:|---:|---:| +| static | cobra | 7 | 1 (14%) | 1 (14%) | 3 (42%) | 7 | 0 | 0 | 0 | +| static | click | 10 | 1 (10%) | 1 (10%) | 3 (30%) | 5 | 0 | 1 | 0 | +| static | sqlparse | 10 | 0 (0%) | 1 (10%) | 1 (10%) | 4 | 0 | 1 | 0 | +| static | semver | 10 | 2 (20%) | 3 (30%) | 4 (40%) | 6 | 1 | 0 | 0 | +| static | all | 37 | 4 (10%) | 6 (16%) | 11 (29%) | 22 | 1 | 2 | 0 | +| nochange | cobra | 7 | 1 (14%) | 1 (14%) | 3 (42%) | 7 | 0 | 0 | 0 | +| nochange | click | 10 | 1 (10%) | 5 (50%) | 8 (80%) | 10 | 0 | 1 | 10 | +| nochange | sqlparse | 10 | 3 (30%) | 5 (50%) | 8 (80%) | 10 | 0 | 1 | 10 | +| nochange | semver | 10 | 2 (20%) | 3 (30%) | 4 (40%) | 6 | 1 | 0 | 0 | +| nochange | all | 37 | 7 (18%) | 14 (37%) | 23 (62%) | 33 | 1 | 2 | 20 | +| default | cobra | 7 | 1 (14%) | 1 (14%) | 3 (42%) | 7 | 0 | 0 | 0 | +| default | click | 10 | 9 (90%) | 9 (90%) | 10 (100%) | 10 | 0 | 1 | 10 | +| default | sqlparse | 10 | 9 (90%) | 10 (100%) | 10 (100%) | 10 | 0 | 1 | 10 | +| default | semver | 10 | 2 (20%) | 3 (30%) | 4 (40%) | 6 | 1 | 0 | 0 | +| default | all | 37 | 21 (56%) | 23 (62%) | 27 (72%) | 33 | 1 | 2 | 20 | + +111 answers in 87 s. diff --git a/eval/run.py b/eval/run.py new file mode 100644 index 0000000..0dd520f --- /dev/null +++ b/eval/run.py @@ -0,0 +1,1177 @@ +#!/usr/bin/env python3 +"""gitnext eval: check gitnext's answers against the compilers and test suites +of real, popular repositories pinned to exact commits. + +Nothing here trusts gitnext or a human judgement. Each check gets its ground +truth from the project itself: + + callers rename a function's *definition* only and compile: every error the + compiler reports is a real use of it; fix those uses and compile again + until it builds (javac and rustc stop at the first failing class / + crate, one pass misses the rest). Compared with `gitnext callers` + → recall (uses gitnext found) and precision (callers that are real). + Checked twice: for functions with a unique name, and for methods + whose name several types share (`common` — only the receiver's type + tells them apart). + And once more for functions picked without asking gitnext (`blind`): + the two samples above hold only functions it finds a caller for, so + they cannot show a function whose callers it misses entirely. + rename `gitnext rename Gnx --text`, then the project must still + compile and its tests must still pass. + tests make the function fail on entry and run the whole test suite: + the tests that fail are the ones that exercise it. A test is its + name, in Python `file::name`, in TypeScript its file. Compared with + `gitnext tests-for --all` → recall / precision, and with the 10 tests + it puts first → how many of those fail (top-10 precision) and whether + any does (caught). + index time, size, share of calls resolved inside the repo. + look tokens of one `gitnext look` vs reading the files it covers. + + python3 eval/run.py # all repos in eval/repos.json: 20 functions, 8 mutants, seeds 7,8,9 + python3 eval/run.py --repos cobra,click --n 6 --mutants 3 --seed 7 + python3 eval/run.py --check # compare with eval/baseline.json, exit 1 on regression + python3 eval/run.py --bless # accept the current results as the baseline of this sample + +Which difference is real. Every number is a mean over the functions that the seeds +picked (a function picked twice counts once). Next to it stands "±": half the 90% +interval the mean stays in when the functions are drawn again (bootstrap), and at +least what one function weighs. A change smaller than that is noise; `--check` +uses the same thresholds. latest.md also shows each number on every seed's own sample. + +Repositories are cloned into eval/.work (or $GITNEXT_EVAL_WORK) and set up once +(`setup` in repos.json). What the compilers and test suites said is kept in +eval/.work/truth.json: per repo commit and function, and for a rename per distinct +edit, so a second run only asks gitnext again (`--no-cache` asks everything again). +Results: eval/results/latest.json + latest.md + latest.noise.json. +""" +from __future__ import annotations + +import argparse +import fcntl +import hashlib +import json +import math +import os +import random +import re +import shutil +import statistics +import subprocess +import sys +import time +from pathlib import Path + +HERE = Path(__file__).resolve().parent +WORK = Path(os.environ.get("GITNEXT_EVAL_WORK", HERE / ".work")) +GITNEXT = os.environ.get("GITNEXT", shutil.which("gitnext") or str(HERE.parent / "target/release/gitnext")) +TOL = 0.05 # allowed drop of a rate before --check fails, where the baseline has no threshold of its own +RATES = ("recall", "precision", "_ok", "caught", "with_maybe") # the summary keys --check watches +CACHE_VERSION = 2 # bump when what truth.json stores changes its meaning: CI keys its cache on this number +MAX_TRIES = 2 # mutants: at most MAX_TRIES × --mutants functions of a sample are tried +SAMPLE_FROM: dict | None = None # --sample-from: repo → the earlier run whose functions are measured again +BOOT = 2000 # bootstrap resamples behind every "±" + + +def sh(cmd: str, cwd: Path, timeout: int = 900, env: dict | None = None) -> tuple[int, str]: + try: + p = subprocess.run(cmd, shell=True, cwd=cwd, capture_output=True, text=True, timeout=timeout, + env={**os.environ, **(env or {})}, errors="replace") + return p.returncode, p.stdout + p.stderr + except subprocess.TimeoutExpired as e: + return 124, (e.stdout or "") if isinstance(e.stdout, str) else "timeout" + + +def gx(args: list[str], cwd: Path, timeout: int = 600) -> tuple[int, str]: + p = subprocess.run([GITNEXT, *args], cwd=cwd, capture_output=True, text=True, timeout=timeout, errors="replace") + return p.returncode, p.stdout + p.stderr + + +CACHE_FILE = WORK / "truth.json" +CACHE: dict = {} +USE_CACHE = True + + +CACHE_STATS = {"cached": 0, "asked": 0} + + +def _load_cache() -> None: + try: + d = json.loads(CACHE_FILE.read_text()) + except (OSError, ValueError): + return + secs = {**d.pop("_seconds", {}), **CACHE.get("_seconds", {})} + CACHE.update(d) + CACHE["_seconds"] = secs + + +def cached(key: str, make, keep=lambda v: True): + """Ground truth of a pinned commit does not change: ask the compiler / tests once. + An answer that fails `keep` (a suite that did not start) is not stored. The file is read again + under a lock before every write, so two runs (`--repos a` and `--repos b`) can share it. + `_seconds` in the file: how long each answer took — what a cold run costs.""" + if not CACHE: + _load_cache() + if USE_CACHE and key in CACHE: + CACHE_STATS["cached"] += 1 + return CACHE[key] + CACHE_STATS["asked"] += 1 + t0 = time.time() + val = make() + if not keep(val): + return val + CACHE_FILE.parent.mkdir(parents=True, exist_ok=True) + with open(CACHE_FILE.with_suffix(".lock"), "w") as lock: + fcntl.flock(lock, fcntl.LOCK_EX) + _load_cache() + CACHE[key] = val + CACHE.setdefault("_seconds", {})[key] = round(time.time() - t0, 1) + tmp = CACHE_FILE.with_suffix(".tmp") + tmp.write_text(json.dumps(CACHE, ensure_ascii=False)) + os.replace(tmp, CACHE_FILE) + return val + + +def tokens(s: str) -> int: + return (len(s) + 3) // 4 + + +# ---------------------------------------------------------------- languages +# compile errors → (file, line); test output → failing test names + +def go_errors(out: str) -> list[tuple[str, int]]: + return [(m.group(1).lstrip("./"), int(m.group(2))) for m in re.finditer(r"^\s*([\w./-]+\.go):(\d+):\d+:", out, re.M)] + + +def ts_errors(out: str) -> list[tuple[str, int]]: + return [(m.group(1), int(m.group(2))) for m in re.finditer(r"^([\w./@-]+\.(?:ts|tsx|js|jsx|mts|cts))\((\d+),\d+\): error", out, re.M)] + + +def java_errors(out: str, root: Path) -> list[tuple[str, int]]: + res = [] + for m in re.finditer(r"\[ERROR\] (/[^:\[]+\.java):\[(\d+),\d+\]", out): + try: + res.append((str(Path(m.group(1)).relative_to(root)), int(m.group(2)))) + except ValueError: + pass + return res + + +def rust_errors(out: str) -> list[tuple[str, int]]: + return [(m.group(1), int(m.group(2))) for m in re.finditer(r"^\s*-->\s+([\w./-]+\.rs):(\d+):\d+", out, re.M)] + + +def go_failed(out: str) -> set[str]: + names = set() + for line in out.splitlines(): + try: + ev = json.loads(line) + except ValueError: + continue + if ev.get("Action") == "fail" and ev.get("Test"): + names.add(ev["Test"].split("/")[0]) + return names + + +def go_failing_alone(root: Path) -> set[str]: + """Go tests that fail, each run on its own. A panic kills the whole test binary, so one + `go test` run names only the first test that reached the broken function. + The binary keeps the name `go test` gives it (`cobra.test`): a project may look at it — cobra + reads the command line as its own arguments under any other name, and seven tests fail.""" + failed = set() + _, dirs = sh("go list -f '{{.Dir}}' ./...", root) + for d in [Path(x) for x in dirs.split() if x.startswith("/")]: + out = d / ".gnx-bin" + sh(f"rm -rf {out}; mkdir {out} && go test -c -o {out}/ .", d, timeout=900) + for binary in out.glob("*.test"): # none: no tests in this package + _, names = sh(f"{binary} -test.list '^(Test|Example|Fuzz)'", d) + for n in [x for x in names.split() if re.match(r"(Test|Example|Fuzz)\w*$", x)]: + code, _ = sh(f"{binary} -test.run '^{n}$' -test.count=1", d, timeout=300) + if code: + failed.add(n) + shutil.rmtree(out, ignore_errors=True) + return failed + + +def py_failed(out: str) -> set[str]: + # `FAILED tests/a.py::Class::test_x[a::b c] - message` → test_x: the id of a parametrized case may hold anything + return {m.group(1).rsplit("::", 1)[-1] for m in re.finditer(r"^(?:FAILED|ERROR) ([^\s\[]+::[^\s\[]+)", out, re.M)} + + +PY_TESTS: dict[str, dict[str, list[str]]] = {} # repo root → test file → its tests (py_collect), filled by run_repo + + +def py_collect(root: Path) -> dict[str, list[str]]: + """Every test of the untouched commit, by file, as `file::test`.""" + _, out = sh(".venv/bin/python -m pytest --co -q -p no:cacheprovider 2>&1", root, timeout=1200) + by_file: dict[str, set[str]] = {} + for m in re.finditer(r"^([^\s:\[]+\.py)::([^\s\[]+)", out, re.M): + by_file.setdefault(m.group(1), set()).add(f"{m.group(1)}::{m.group(2).rsplit('::', 1)[-1]}") + return {f: sorted(v) for f, v in by_file.items()} + + +def py_failed_ids(out: str, root: Path) -> set[str]: + """Failing tests as `file::test`: two files may hold a test of the same name, a bare name would merge + them. A test module that could not be imported (`ERROR tests/a.py - ImportError`) fails all its tests.""" + ids: set[str] = set() + for m in re.finditer(r"^(?:FAILED|ERROR) ([^\s:\[]+\.py)(?:::([^\s\[]+))?", out, re.M): + if m.group(2): + ids.add(f"{m.group(1)}::{m.group(2).rsplit('::', 1)[-1]}") + else: + ids.update(PY_TESTS.get(str(root), {}).get(m.group(1), [])) + return ids + + +def rust_failed(out: str) -> set[str]: + return {m.group(1).rsplit("::", 1)[-1] for m in re.finditer(r"^test (\S+) \.\.\. FAILED", out, re.M)} + + +def java_failed(out: str) -> set[str]: + names = set() + # surefire 3: `[ERROR] org.x.FooTest.parses(boolean)[2] -- Time elapsed: 0.01 s <<< ERROR!` + for m in re.finditer(r"^\[ERROR\]\s+[\w.$]+\.(\w+)(?:\([^)]*\))?(?:\[\d+\])?\s+--\s+Time elapsed.*<<< (?:ERROR|FAILURE)!", out, re.M): + names.add(m.group(1)) + for m in re.finditer(r"\[ERROR\]\s+(\w+)\.(\w+)(?::\d+)?\s", out): # the summary: `FooTest.parses:22 » Runtime` + names.add(m.group(2)) + for m in re.finditer(r"^\s*(\w+)\(([\w.]+)\)\s", out, re.M): # junit4 summary lines + names.add(m.group(1)) + return names + + +def vitest_failed_files(json_path: Path, root: Path) -> set[str]: + try: + d = json.loads(json_path.read_text()) + except (OSError, ValueError): + return set() + out = set() + for f in d.get("testResults", []): + if f.get("status") == "failed": + try: + out.add(str(Path(f["name"]).relative_to(root))) + except ValueError: + out.add(f["name"]) + return out + + +LANG = { + "go": dict( + compile="go test -count=1 -run '^$' -gcflags=-e ./... 2>&1", + errors=lambda out, root: go_errors(out), + tests="go test -count=1 -json ./... 2>&1", + ran=lambda out, root: '"Action":"pass"' in out or '"Action":"fail"' in out, + failed=lambda out, root: go_failed(out), + fail_stmt='panic("gitnext-mutant")', + failing_alone=go_failing_alone, + tests_key="tests2", # under "tests": answers taken with a renamed test binary (see go_failing_alone) + # `./...` skips directories that start with `_` or `.` and `testdata` (chi's `_examples`): the compiler + # never sees a caller there, so it can be neither confirmed nor refuted + unseen=lambda file: any(d.startswith(("_", ".")) or d == "testdata" for d in file.split("/")[:-1]), + level="name", + ), + "python": dict( + compile=".venv/bin/python -m compileall -q . >/dev/null && .venv/bin/python -m pytest -q --co -p no:cacheprovider 2>&1 | tail -3", + errors=None, # no compiler to name every use + # the whole summary, no tracebacks: `| tail -400` cut the list wherever hundreds of tests failed + # and all of the suite: without --continue-on-collection-errors a test module that no longer imports stops the run + # before any test ("Interrupted: 1 error during collection") — it looked like "no test fails" + tests=".venv/bin/python -m pytest -q -rfE --tb=no -p no:cacheprovider -x --maxfail=10000 --continue-on-collection-errors 2>&1", + tests_key="tests4", # "tests": cut at 400 lines; "tests2": names from inside parametrized ids; "tests3": stopped at a collection error + collect=py_collect, + ids=py_failed_ids, + ran=lambda out, root: bool(re.search(r"\d+ (passed|failed|error)", out)), + failed=lambda out, root: py_failed(out), + fail_stmt='raise RuntimeError("gitnext-mutant")', + level="name", + ), + "typescript": dict( + compile="npx tsc --noEmit -p . --pretty false 2>&1", + errors=lambda out, root: ts_errors(out), + tests="rm -f .gnx-vitest.json; npx vitest run --reporter=json --outputFile=.gnx-vitest.json >/dev/null 2>&1; echo done", + ran=lambda out, root: (root / ".gnx-vitest.json").exists(), + failed=lambda out, root: vitest_failed_files(root / ".gnx-vitest.json", root), + fail_stmt='if (Date.now() > 0) throw new Error("gitnext-mutant");', # a bare `throw` makes the rest unreachable: tsc rejects it + level="file", + ), + "java": dict( + # every class again: maven recompiles only the changed files, the callers in other files would pass unchecked + compile="rm -rf target/classes target/test-classes target/maven-status; mvn -q -B -o test-compile 2>&1", + errors=lambda out, root: java_errors(out, root), + tests="mvn -B -o test -Dsurefire.printSummary=true -DtrimStackTrace=true 2>&1 | grep -E '<<<|Tests run:|ERROR\\] +[A-Za-z]|BUILD'", + ran=lambda out, root: bool(re.search(r"Tests run: [1-9]", out)), + failed=lambda out, root: java_failed(out), + fail_stmt='if (true) throw new RuntimeException("gitnext-mutant");', + level="name", + ), + "rust": dict( + # all features: code behind a feature (indexmap's rayon and serde modules) is code gitnext indexes too + compile="cargo check --tests --all-features --message-format human 2>&1", + uses_key="uses2", # "uses": without the features + unseen=lambda file: file.startswith("benches/"), # `cargo check --benches` needs nightly where benches use #![feature(test)] + errors=lambda out, root: rust_errors(out), + tests="cargo test --no-fail-fast 2>&1", + ran=lambda out, root: "test result:" in out, + failed=lambda out, root: rust_failed(out), + fail_stmt='panic!("gitnext-mutant");', + level="name", + ), +} + + +# ---------------------------------------------------------------- repo plumbing + +def prepare(repo: dict) -> Path: + root = WORK / repo["name"] + if not root.exists(): + WORK.mkdir(parents=True, exist_ok=True) + code, out = sh(f"git clone -q {repo['url']} {root}", WORK, timeout=1800) + if code: + raise RuntimeError(f"clone {repo['url']}: {out[-400:]}") + sh(f"git fetch -q --depth 1 origin {repo['commit']} 2>/dev/null; git checkout -q -f {repo['commit']}", root) + restore(root) + marker = root / ".gnx-setup-done" + if repo.get("setup") and not marker.exists(): + code, out = sh(repo["setup"], root, timeout=3600) + if code: + raise RuntimeError(f"setup {repo['name']}: {out[-600:]}") + marker.write_text("ok") + return root + + +def restore(root: Path) -> None: + sh("git checkout -q -- . && git clean -qfd -e .venv -e node_modules -e target -e .gitnext -e .gnx-setup-done -e .gnx-vitest.json", root) + + +def baseline_tests(root: Path, L: dict) -> dict: + """The suite on the untouched commit: did it run, and which tests fail already (those are not ours). + Asked the same way a mutant is: where its tests run one at a time, the ones failing alone count too.""" + _, tout = sh(L["tests"], root, timeout=2400) + failed = L.get("ids", L["failed"])(tout, root) + if "failing_alone" in L: + failed = failed | L["failing_alone"](root) + return {"ran": bool(L["ran"](tout, root)), "failed": sorted(failed), "tail": tout[-300:]} + + +def symbols(root: Path) -> list[dict]: + code, out = gx(["--json", "symbols"], root) + return json.loads(out) if code == 0 else [] + + +CALLERS_MEMO: dict | None = None # run_repo turns it on: the tree is clean there, and in a big repo one call takes seconds + + +def _callers_of(entry: dict) -> tuple[set[str], set[str]]: + sure, maybe = set(), set() + for c, _line in entry.get("callers", []): + sure.add(c["qualified"]) + for c in entry.get("maybe", []) or []: + maybe.add((c[0] if isinstance(c, list) else c)["qualified"]) + return sure, maybe + + +def callers_many(root: Path, qs: list[str]) -> dict[str, tuple[set[str], set[str]]]: + """`gitnext callers` for several functions in one run: in a big repo every run costs a second or two. + A gitnext that takes one name at a time, or does not find one of the names, is asked name by name.""" + memo = CALLERS_MEMO if CALLERS_MEMO is not None else {} + + def ask(names: list[str]) -> bool: + code, out = gx(["--json", "callers", *names], root) + try: + d = json.loads(out) if not code else None + except ValueError: + d = None + if d is None: + return False + got: dict[str, tuple[set[str], set[str]]] = {n: (set(), set()) for n in names} + for entry in d if isinstance(d, list) else [d]: + name = names[0] if len(names) == 1 else (entry.get("symbol") or {}).get("qualified") + if name in got: + sure, maybe = _callers_of(entry) + got[name][0].update(sure) + got[name][1].update(maybe) + for n in names: + memo[(str(root), n)] = got[n] + return True + + new = [q for q in dict.fromkeys(qs) if (str(root), q) not in memo] + if len(new) > 1: + ask(new) + for q in new: + if (str(root), q) not in memo and not ask([q]): + memo[(str(root), q)] = (set(), set()) + return {q: memo[(str(root), q)] for q in qs} + + +def callers(root: Path, q: str) -> tuple[set[str], set[str]]: + return callers_many(root, [q])[q] + + +def tests_for_rows(root: Path, q: str) -> list[tuple[str, str, str]]: + """What `gitnext tests-for --all` names, most likely first: (test name, test file, how it was found).""" + code, out = gx(["tests-for", q, "--all"], root) + if code: # a gitnext without `--all` lists everything anyway + code, out = gx(["tests-for", q], root) + return [(m.group(1).rsplit("::", 1)[-1], m.group(2), m.group(3)) for m in re.finditer(r"^(\S+)\s+(\S+?):\d+ \(([^)]*)\)", out, re.M)] + + +def tests_for(root: Path, q: str) -> tuple[list[str], list[str], set[str]]: + """(test names, test files — both most likely first, names found through the call graph only)""" + names, files, graph = [], [], set() + for n, f, how in tests_for_rows(root, q): + if n not in names: + names.append(n) + if f not in files: + files.append(f) + if "hop" in how or "direct" in how: + graph.add(n) + return names, files, graph + + +def enclosing(syms: list[dict], file: str, line: int) -> str | None: + best = None + for s in syms: + if s["file"] == file and s["kind"] != "module" and s["start_line"] <= line <= s["end_line"]: + if best is None or (s["end_line"] - s["start_line"]) < (best["end_line"] - best["start_line"]): + best = s + if best is None: + mods = [s for s in syms if s["file"] == file and s["kind"] == "module"] + return mods[0]["qualified"] if mods else None + return best["qualified"] + + +def pick(syms: list[dict], root: Path, n: int, seed: int, common: bool = False, blind: bool = False) -> list[dict]: + """Functions to check. Default: names that occur once in the repo, with a caller gitnext knows of. + `common`: methods whose name several types share (`release`, `parse`…) — only the receiver's type + tells them apart. `blind`: the first n of the same order whether gitnext sees a caller or not — + a function whose callers it misses entirely never gets into the default sample.""" + names: dict[str, int] = {} + for s in syms: + if s["kind"] in ("function", "method") and not s.get("test"): + names[s["name"]] = names.get(s["name"], 0) + 1 + all_names: dict[str, int] = {} + owners: dict[str, list] = {} + for s in syms: + all_names[s["name"]] = all_names.get(s["name"], 0) + 1 + owners.setdefault(s["name"], []).append(s.get("parent")) + overloaded = {n for n, ps in owners.items() if len(set(ps)) < len(ps)} # same name twice in one type + cands = [ + s for s in syms + if s["kind"] in ("function", "method") and not s.get("test") and not s.get("decl") and s.get("visibility") + and len(s["name"]) >= 4 and s["end_line"] - s["start_line"] >= 2 + and not s["name"].startswith(("_", "Test", "test", "__")) and s["name"] not in ("main", "init", "constructor", "toString", "equals", "hashCode", "fmt", "new", "default") + and s["name"] != s.get("parent", "").rsplit("::", 1)[-1] # constructors + and ((s["kind"] == "method" and 2 <= names[s["name"]] <= 6 and s["name"] not in overloaded) if common else all_names[s["name"]] == 1) + ] + rng = random.Random(seed) + rng.shuffle(cands) + out = [] + used = set() + for at in range(0, len(cands), 40): # gitnext is asked about 40 functions per run + chunk = cands[at:at + 40] + found = callers_many(root, [s["qualified"] for s in chunk]) + for s in chunk: + if s["name"] in used: # one method per shared name + continue + sure, maybe = found[s["qualified"]] + if blind or sure or (common and maybe): + s["_callers"], s["_maybe"] = sure, maybe + out.append(s) + used.add(s["name"]) + if len(out) >= n: + return out + return out + + +def name_col(text_line: str, name: str) -> int: + m = re.search(rf"(? bool: + p = root / file + lines = p.read_text(errors="replace").split("\n") + new = fn(lines[line - 1]) + if new is None or new == lines[line - 1]: + return False + lines[line - 1] = new + p.write_text("\n".join(lines)) + return True + + +def body_start(root: Path, s: dict, lang: str) -> int | None: + """Line after the opening `{` (or `:` in Python) of a function.""" + lines = (root / s["file"]).read_text(errors="replace").split("\n") + for i in range(s["start_line"] - 1, min(s["end_line"], len(lines))): + t = lines[i].split("//")[0].rstrip() + if lang == "python": + if t.endswith(":") and not t.lstrip().startswith(("@", "#")): + return i + 2 + elif t.endswith("{"): + return i + 2 + return None + + +def indent_of(root: Path, file: str, line: int) -> str: + lines = (root / file).read_text(errors="replace").split("\n") + for l in lines[line - 1: line + 5]: + if l.strip(): + return l[: len(l) - len(l.lstrip())] + return " " + + +# ---------------------------------------------------------------- checks + +def use_sites(root: Path, repo: dict, s: dict) -> list | None: + """Every (file, line) that uses `s`, named by the compiler: rename the definition only, compile, + rename the uses it complains about, compile again — until nothing new comes up. One pass is not + enough: javac stops at the first class with errors, rustc at the first crate.""" + L = LANG[repo["lang"]] + old, new = s["name"], s["name"] + "Gnxbroken" + if not edit_line(root, s["file"], s["start_line"] + _def_offset(root, s), lambda l: _rename_token(l, old, new)): + return None + sites: list[tuple[str, int]] = [] + for _ in range(12): + _, out = sh(L["compile"], root, timeout=1200) + progress = False + for f, ln in dict.fromkeys(L["errors"](out, root)): + try: + fixed = edit_line(root, f, ln, lambda l: re.sub(rf"(? dict | None: + L = LANG[repo["lang"]] + if not L["errors"]: + return None + sites = cached(f"{repo['name']}@{repo['commit'][:12]}:{L.get('uses_key', 'uses')}:{s['qualified']}", lambda: use_sites(root, repo, s)) + if sites is None: + return None + modules = {x["qualified"] for x in syms if x["kind"] == "module"} + file_of = {x["qualified"]: x["file"] for x in syms} + hits = {(f, q) for f, ln in sites if (q := enclosing(syms, f, ln)) and q != s["qualified"]} + # a use on an import line (Java static import, TS re-export) is not a call + import_files = {f for f, q in hits if q in modules} + truth = {q for f, q in hits if q not in modules} + # code the compile command does not build (Rust benches need nightly) can be neither confirmed nor refuted + seen = lambda c: not L.get("unseen", lambda f: False)(file_of.get(c, "")) + found = {c for c in s["_callers"] if seen(c)} + maybe = {c for c in s["_maybe"] if seen(c)} + if not truth and not import_files: + return {"symbol": s["qualified"], "skipped": "compiler reported no uses"} + ok_found = {c for c in found if c in truth or file_of.get(c) in import_files} + return { + "symbol": s["qualified"], "truth": sorted(truth), "found": sorted(found), "maybe": sorted(maybe), "import_files": sorted(import_files), + "recall": len(found & truth) / len(truth) if truth else None, "precision": len(ok_found) / len(found) if found else None, + "recall_with_maybe": len((found | maybe) & truth) / len(truth) if truth else None, + } + + +def _def_offset(root: Path, s: dict) -> int: + """Lines between the symbol's start (decorators, annotations, doc) and the line with its name.""" + lines = (root / s["file"]).read_text(errors="replace").split("\n") + for i in range(s["start_line"] - 1, min(s["end_line"], len(lines))): + if name_col(lines[i], s["name"]) >= 0 and not lines[i].lstrip().startswith(("@", "//", "#", "*", "/*")): + return i - (s["start_line"] - 1) + return 0 + + +def _rename_token(line: str, old: str, new: str) -> str | None: + c = name_col(line, old) + return None if c < 0 else line[:c] + new + line[c + len(old):] + + +def check_rename(root: Path, repo: dict, s: dict, run_tests: bool, baseline_failed: set[str] = frozenset()) -> dict: + L = LANG[repo["lang"]] + new = s["name"] + ("_gnx" if "_" in s["name"] or s["name"].islower() else "Gnx") + code, out = gx(["rename", s["qualified"], new, "--text"], root) + if code: + restore(root) + return {"symbol": s["qualified"], "ok": False, "stage": "rename", "detail": out[-300:]} + gx(["index"], root) + left = sh(f"git grep -nw {s['name']} -- . ':!*.md' | head -5", root)[1].strip() + + def verdict() -> dict: + ccode, cout = sh(L["compile"], root, timeout=1500) + compiled = ccode == 0 and "error" not in cout.lower()[-400:] if repo["lang"] != "python" else ccode == 0 + v = {"compiled": compiled, "ran": None, "failed": [], "detail": "" if compiled else cout[-500:]} + if compiled and run_tests: + tcode, tout = sh(L["tests"], root, timeout=1800) + v["ran"], v["failed"] = bool(L["ran"](tout, root)), sorted(L.get("ids", L["failed"])(tout, root)) + return v + + # the same edit gets the same verdict from the same commands: the build and the tests are asked once per + # distinct diff, so a second run costs only gitnext's time, and a changed gitnext pays only for what it edits differently + diff = sh("git diff --no-color", root)[1] + how = hashlib.sha1((L["compile"] + (L["tests"] if run_tests else "")).encode()).hexdigest()[:8] + key = f"{repo['name']}@{repo['commit'][:12]}:rename:{how}:{hashlib.sha1(diff.encode()).hexdigest()}" + v = cached(key, verdict, keep=lambda v: v["ran"] is not False) # a suite that did not start: ask again next time + failed = set(v["failed"]) - baseline_failed + tests_ok = None if v["ran"] is None else (not failed and v["ran"]) # a suite that did not start has no failures either + restore(root) + gx(["index"], root) + return {"symbol": s["qualified"], "ok": v["compiled"] and tests_ok is not False, "compiled": v["compiled"], "tests_ok": tests_ok, + "tests_failed": sorted(failed)[:8] if tests_ok is False else [], + "old_name_left": left[:300], "detail": v["detail"] or ("the test suite did not run" if v["ran"] is False else "")} + + +def failing_tests(root: Path, repo: dict, s: dict, baseline_failed: set[str]) -> dict: + """Tests that fail when `s` throws on entry (or why that could not be measured): `failed` — their + names; `ids`, where the language has them (Python) — the same tests as `file::test`.""" + L = LANG[repo["lang"]] + at = body_start(root, s, repo["lang"]) + if not at: + return {"skipped": "no body"} + ind = indent_of(root, s["file"], at) + p = root / s["file"] + lines = p.read_text(errors="replace").split("\n") + lines.insert(at - 1, ind + L["fail_stmt"]) + p.write_text("\n".join(lines)) + ccode, cout = sh(L["compile"], root, timeout=1500) + if ccode and repo["lang"] != "python": + restore(root) + return {"skipped": "mutant does not compile"} + ids = None + if "failing_alone" in L: + truth = L["failing_alone"](root) - baseline_failed + else: + _, tout = sh(L["tests"], root, timeout=2400) + if not L["ran"](tout, root): + restore(root) + return {"skipped": "the test suite did not run"} + truth = L["failed"](tout, root) - baseline_failed + if "ids" in L: + ids = L["ids"](tout, root) - baseline_failed + restore(root) + return {"failed": sorted(truth)} if ids is None else {"failed": sorted(truth), "ids": sorted(ids)} + + +TOP = 10 # tests-for names this many by default + + +def check_tests(root: Path, repo: dict, s: dict, baseline_failed: set[str]) -> dict | None: + L = LANG[repo["lang"]] + t = cached(f"{repo['name']}@{repo['commit'][:12]}:{L.get('tests_key', 'tests')}:{s['qualified']}", lambda: failing_tests(root, repo, s, baseline_failed), + keep=lambda v: v.get("skipped") != "the test suite did not run") + if t.get("skipped") == "no body": + return None + if "skipped" in t: + return {"symbol": s["qualified"], "skipped": t["skipped"]} + # a test is its file (TS), `file::name` (Python: `ids`) or its name + level = "file" if L["level"] == "file" else "id" if "ids" in t else "name" + key = {"file": lambda n, f: f, "id": lambda n, f: f"{f}::{n}", "name": lambda n, f: n}[level] + truth = set(t["ids"] if level == "id" else t["failed"]) + rows = tests_for_rows(root, s["qualified"]) + order = list(dict.fromkeys(key(n, f) for n, f, how in rows)) + graph = {key(n, f) for n, f, how in rows if "hop" in how or "direct" in how} + pred = set(order) + if not truth: + return {"symbol": s["qualified"], "skipped": "no test fails when it throws", "predicted": len(pred)} + tp = len(pred & truth) + top = order[:TOP] + top_hits = sum(1 for x in top if x in truth) + out = {"symbol": s["qualified"], "level": level, "truth": len(truth), "predicted": len(pred), + "recall": tp / len(truth), "precision": tp / len(pred) if pred else 0.0, + # of the 10 tests named first: how many fail, and how many could at best (few tests fail at all) + "top_hits": top_hits, "top_n": len(top), "top_precision": top_hits / len(top) if top else 0.0, + "top_best": min(tp, len(top)) / len(top) if top else 0.0, "caught": 1.0 if top_hits else 0.0, + "missed": sorted(truth - pred)[:8]} + if level != "file": + out["recall_graph_only"] = len(graph & truth) / len(truth) + return out + + +def look_cost(root: Path, s: dict) -> dict: + _, out = gx(["look", s["qualified"]], root) + files = {s["file"]} | {c.split("::")[0] for c in []} + naive = sum(tokens((root / f).read_text(errors="replace")) for f in files if (root / f).exists()) + return {"symbol": s["qualified"], "look_tokens": tokens(out), "file_tokens": naive} + + +def run_repo(repo: dict, n: int, mutants: int, seed, tests_in_rename: bool) -> dict: + """One repo; `seed`: a number or a list of them. A function that several seeds picked is measured + once. `summary` is over all distinct functions, `summary_seeds` over each seed's own sample, and + `noise` says how far each number moves when the functions are drawn again.""" + global CALLERS_MEMO + seeds = [seed] if isinstance(seed, int) else list(seed) + t0 = time.time() + root = prepare(repo) + L = LANG[repo["lang"]] + ti = time.time() + code, out = gx(["init"], root, timeout=1800) + index_s = time.time() - ti + syms = symbols(root) + res: dict = {"repo": repo["name"], "lang": repo["lang"], "commit": repo["commit"][:12], "index_seconds": round(index_s, 1), + "symbols": sum(1 for s in syms if s["kind"] != "module"), "files": len({s["file"] for s in syms}), "seeds": seeds} + # how many call edges resolve inside the repo + m = re.search(r"(\d+) symbols · (\d+) edges", gx(["index"], root)[1]) + res["edges"] = int(m.group(2)) if m else None + prev = SAMPLE_FROM.get(repo["name"]) if SAMPLE_FROM is not None else None + if SAMPLE_FROM is not None and prev is None: + raise RuntimeError(f"--sample-from: no sample of {repo['name']} in that run") + if prev is not None: # the functions of the earlier run, not drawn again: a change of the graph moves no function + if prev.get("commit") != res["commit"]: + raise RuntimeError(f"--sample-from: {repo['name']} was at {prev.get('commit')}, now at {res['commit']}") + by_q = {s["qualified"]: s for s in syms} + again = lambda key: {sd: [by_q[q] for q in prev.get(key, {}).get(str(sd), []) if q in by_q] for sd in seeds} + plain, common, blind = again("samples"), again("samples_common"), again("samples_blind") + pool = {s["qualified"]: s for v in (*plain.values(), *common.values(), *blind.values()) for s in v} + qs = list(pool) + for at in range(0, len(qs), 40): # what gitnext says now, asked as pick asks it + for q, (sure, maybe) in callers_many(root, qs[at:at + 40]).items(): + pool[q]["_callers"], pool[q]["_maybe"] = sure, maybe + else: + CALLERS_MEMO = {} + try: + plain = {sd: pick(syms, root, n, sd) for sd in seeds} + common = {sd: pick(syms, root, n, sd, common=True) if L["errors"] else [] for sd in seeds} + blind = {sd: pick(syms, root, n, sd, blind=True) if L["errors"] else [] for sd in seeds} + finally: + CALLERS_MEMO = None + + def distinct(by_seed: dict) -> list[dict]: + seen: dict[str, dict] = {} + for sd in seeds: + for s in by_seed[sd]: + seen.setdefault(s["qualified"], s) + return list(seen.values()) + + sample, sample_common, sample_blind = distinct(plain), distinct(common), distinct(blind) + res["sample"] = [s["qualified"] for s in sample] + res["sample_common"] = [s["qualified"] for s in sample_common] + res["samples"] = {str(sd): [s["qualified"] for s in plain[sd]] for sd in seeds} + res["samples_common"] = {str(sd): [s["qualified"] for s in common[sd]] for sd in seeds} + res["samples_blind"] = {str(sd): [s["qualified"] for s in blind[sd]] for sd in seeds} + if "collect" in L: # on the untouched commit, before the first mutant + PY_TESTS[str(root)] = cached(f"{repo['name']}@{repo['commit'][:12]}:collect", lambda: L["collect"](root), keep=bool) + # baseline: tests already failing before any change are not ours + base = cached(f"{repo['name']}@{repo['commit'][:12]}:baseline:{L.get('tests_key', 'tests')}", lambda: baseline_tests(root, L), keep=lambda v: v["ran"]) + if not base["ran"]: # otherwise "no test failed" would pass every check below + raise RuntimeError(f"the test suite of {repo['name']} did not run: {base['tail']}") + baseline_failed = set(base["failed"]) # in the units the checks compare: `ids` where the language has them + res["baseline_failing_tests"] = sorted(baseline_failed)[:20] + res["callers"] = [x for s in sample if (x := check_callers(root, repo, syms, s))] + res["callers_common"] = [x for s in sample_common if (x := check_callers(root, repo, syms, s))] + # picked whether gitnext sees a caller or not: the functions the compiler finds uses of + res["callers_blind"] = [x for s in sample_blind if (x := check_callers(root, repo, syms, s))] + res["rename"] = [check_rename(root, repo, s, tests_in_rename, baseline_failed) for s in sample] + # mutants: down each seed's sample until `mutants` functions are measured (with the throw some do not + # compile, some fail no test), trying at most MAX_TRIES × mutants of them + done: dict[str, dict | None] = {} + res["mutants"] = {} + for sd in seeds: + tried, got = [], 0 + for s in plain[sd][: MAX_TRIES * mutants]: + if got >= mutants: + break + q = s["qualified"] + if q not in done: + done[q] = check_tests(root, repo, s, baseline_failed) + if done[q] is None: + continue + tried.append(q) + got += "recall" in done[q] + res["mutants"][str(sd)] = tried + res["tests"] = [x for x in done.values() if x] + res["look"] = [look_cost(root, s) for s in sample] + res["seconds"] = round(time.time() - t0) + res["summary"] = summarize(res) + res["summary_seeds"] = {str(sd): summarize(res, seed_only(res, sd)) for sd in seeds} + res["noise"] = noise(metric_values(res), [metric_values(res, seed_only(res, sd)) for sd in seeds]) + return res + + +def mean(v: list[float]) -> float | None: + return round(sum(v) / len(v), 3) if v else None + + +METRIC_NAMES = { + "callers_recall": "callers recall", "callers_precision": "callers precision", "blind_recall": "callers recall, picked blind", + "common_recall": "shared names: recall", "common_recall_with_maybe": "shared names: recall with maybe", + "common_precision": "shared names: precision", "rename_ok": "rename ok (tests pass)", + "tests_recall": "tests recall", "tests_precision": "tests precision", "tests_top10_precision": "top-10 that fail", + "tests_top10_best": "… best possible order", "tests_caught": "caught by the top 10", "look_vs_file": "look / file", +} + + +def metric_values(r: dict, only: dict | None = None) -> dict[str, list[float]]: + """The per-function values behind every number of a repo. `only` (see seed_only): one seed's functions.""" + def keep(kind: str, rows: list[dict]) -> list[dict]: + return rows if only is None else [x for x in rows if x["symbol"] in only[kind]] + cal = [c for c in keep("plain", r["callers"]) if c.get("recall") is not None] + com = [c for c in keep("common", r.get("callers_common", [])) if c.get("recall") is not None] + bli = [c for c in keep("blind", r.get("callers_blind", [])) if c.get("recall") is not None] + tst = [t for t in keep("mutants", r["tests"]) if "recall" in t] + return { + "callers_recall": [c["recall"] for c in cal], + "callers_precision": [c["precision"] for c in cal if c["precision"] is not None], + # the first functions of the same order, with or without a caller in gitnext's graph + "blind_recall": [c["recall"] for c in bli], + # methods whose name several types share: sure callers, and sure + "maybe" + "common_recall": [c["recall"] for c in com], + "common_recall_with_maybe": [c["recall_with_maybe"] for c in com], + "common_precision": [c["precision"] for c in com if c["precision"] is not None], + "rename_ok": [1.0 if x["ok"] else 0.0 for x in keep("plain", r["rename"])], + "tests_recall": [t["recall"] for t in tst], + "tests_precision": [t["precision"] for t in tst], + "tests_top10_precision": [t["top_precision"] for t in tst], + "tests_top10_best": [t["top_best"] for t in tst], + "tests_caught": [t["caught"] for t in tst], + "look_vs_file": [l["look_tokens"] / max(1, l["file_tokens"]) for l in keep("plain", r["look"])], + } + + +def seed_only(r: dict, seed) -> dict: + return {"plain": set(r["samples"][str(seed)]), "common": set(r["samples_common"][str(seed)]), + "blind": set(r.get("samples_blind", {}).get(str(seed), [])), "mutants": set(r["mutants"][str(seed)])} + + +def summarize(r: dict, only: dict | None = None) -> dict: + v = metric_values(r, only) + return { + "callers_recall": mean(v["callers_recall"]), + "callers_precision": mean(v["callers_precision"]), + "callers_checked": len(v["callers_recall"]), + "blind_recall": mean(v["blind_recall"]), + "blind_checked": len(v["blind_recall"]), + "common_recall": mean(v["common_recall"]), + "common_precision": mean(v["common_precision"]), + "common_recall_with_maybe": mean(v["common_recall_with_maybe"]), + "common_checked": len(v["common_recall"]), + "rename_ok": mean(v["rename_ok"]), + "rename_checked": len(v["rename_ok"]), + "tests_recall": mean(v["tests_recall"]), + "tests_precision": mean(v["tests_precision"]), + "tests_top10_precision": mean(v["tests_top10_precision"]), + "tests_top10_best": mean(v["tests_top10_best"]), + "tests_caught": mean(v["tests_caught"]), + "tests_checked": len(v["tests_recall"]), + "look_vs_file": mean(v["look_vs_file"]), + } + + +def noise(vals: dict[str, list[float]], per_seed: list[dict[str, list[float]]]) -> dict: + """Which difference is real. For every metric: the mean over the functions, the 90% interval it stays + in when the functions are drawn again (bootstrap), its value on each seed's own sample, and the + threshold — half that interval, but at least what one function weighs. A change below it is noise.""" + out: dict = {} + for k, v in vals.items(): + if not v: + out[k] = None + continue + n = len(v) + rng = random.Random(BOOT) + boots = sorted(sum(rng.choices(v, k=n)) / n for _ in range(BOOT)) + lo, hi = boots[int(0.05 * BOOT)], boots[int(0.95 * BOOT) - 1] + half = (hi - lo) / 2 + seeds = [sum(s[k]) / len(s[k]) for s in per_seed if s[k]] + thr = max(half, 1 / n) if k.endswith(RATES) or k.endswith("best") else half + out[k] = {"mean": round(sum(v) / n, 3), "functions": n, "boot_lo": round(lo, 3), "boot_hi": round(hi, 3), + "boot_half": round(half, 3), "seeds": [round(x, 3) for x in seeds], + "seed_sd": round(statistics.stdev(seeds), 3) if len(seeds) > 1 else None, + "threshold": math.ceil(thr * 100 - 1e-9) / 100} + return out + + +def scopes(results: list[dict]) -> dict: + """`noise` per language and for all repos together: the functions are pooled, each counts once.""" + ok = [r for r in results if r.get("summary")] + groups: dict[str, list[dict]] = {"all": ok} if ok else {} + for r in ok: + groups.setdefault(r["lang"], []).append(r) + out = {} + for name, rs in groups.items(): + def pool(sd=None) -> dict[str, list[float]]: + per = [metric_values(r, None if sd is None else seed_only(r, sd)) for r in rs] + return {k: [x for p in per for x in p[k]] for k in METRIC_NAMES} + out[name] = noise(pool(), [pool(sd) for sd in rs[0]["seeds"]]) + return out + + +def render_md(results: list[dict], agg: dict | None = None, note: str = "") -> str: + def pm(z: dict, k: str, count: bool = False) -> str: # "77% ±6 (20)" + e = (z or {}).get(k) + return "—" if not e else f"{e['mean']:.0%} ±{e['threshold'] * 100:.0f}" + (f" ({e['functions']})" if count else "") + rows = ["| repo | lang | symbols | index s | callers recall | callers precision | callers recall, picked blind | shared names: recall (+maybe) | shared names: precision | rename ok " + "| tests recall | tests precision | top-10 fail (best possible) | caught by top-10 | look / file |", + "|---|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|"] + for r in results: + if "error" in r: + rows.append(f"| {r['repo']} | {r.get('lang','')} | error: {r['error'][:60]} ||||||||||||") + continue + z = r.get("noise") or {} + com = "—" if not z.get("common_recall") else f"{pm(z, 'common_recall')} ({pm(z, 'common_recall_with_maybe')}) ({z['common_recall']['functions']})" + top = "—" if not z.get("tests_top10_precision") else f"{pm(z, 'tests_top10_precision')} ({pm(z, 'tests_top10_best')})" + rows.append(f"| {r['repo']} | {r['lang']} | {r['symbols']} | {r['index_seconds']} | {pm(z, 'callers_recall', True)} | " + f"{pm(z, 'callers_precision')} | {pm(z, 'blind_recall', True)} | {com} | {pm(z, 'common_precision')} | {pm(z, 'rename_ok', True)} | " + f"{pm(z, 'tests_recall', True)} | {pm(z, 'tests_precision')} | {top} | {pm(z, 'tests_caught')} | {pm(z, 'look_vs_file')} |") + out = "\n".join(rows) + "\n" + if not agg: + return out + out += ("\n`77% ±6 (20)`: the mean over 20 functions; a change smaller than ±6 points is noise. The ± is half the 90% interval\n" + "the number stays in when the functions are drawn again (bootstrap), and never less than what one function weighs.\n") + langs = [k for k in agg if k != "all"] + out += "\n| per language | all | " + " | ".join(langs) + " |\n|---|" + "---:|" * (len(langs) + 1) + "\n" + for k, label in METRIC_NAMES.items(): + out += f"| {label} | " + " | ".join(pm(agg[s], k, True) for s in ["all", *langs]) + " |\n" + pct = lambda x: f"{x * 100:.0f}" + out += ("\n| all repos | mean | functions | 90% interval | on each seed | 2 × SD of the seeds | threshold |\n" + "|---|---:|---:|---:|---:|---:|---:|\n") + for k, label in METRIC_NAMES.items(): + e = agg["all"].get(k) + if e: + sd = "—" if e["seed_sd"] is None else f"{2 * e['seed_sd'] * 100:.1f}" + out += (f"| {label} | {e['mean']:.1%} | {e['functions']} | {pct(e['boot_lo'])}–{pct(e['boot_hi'])}% | " + f"{' / '.join(pct(x) for x in e['seeds'])} | {sd} | ±{e['threshold'] * 100:.0f} |\n") + return out + ("\n" + note + "\n" if note else "") + + +def compare(results: list[dict], baseline: dict) -> list[str]: + """Rates that dropped by more than their threshold (`thresholds` of the baseline: per repo and metric).""" + bad = [] + for r in results: + if "error" in r: # a repo that did not run is not a pass + bad.append(f"{r['repo']}: {r['error'][:200]}") + continue + b = baseline.get("repos", {}).get(r["repo"], {}) + thr = baseline.get("thresholds", {}).get(r["repo"], {}) + for k, v in (r.get("summary") or {}).items(): + if k.endswith(RATES) and v is not None and b.get(k) is not None and v < b[k] - thr.get(k, TOL) - 1e-9: + bad.append(f"{r['repo']}: {k} {b[k]:.0%} → {v:.0%} (threshold {thr.get(k, TOL) * 100:.0f})") + return bad + + +# --compare: the per-function value of every metric, read from the rows of one kind of check +# (the same formulas as metric_values; None: the function does not count for this metric) +PAIRED = { + "callers_recall": ("callers", lambda c: c.get("recall")), + "callers_precision": ("callers", lambda c: c.get("precision") if c.get("recall") is not None else None), + "blind_recall": ("callers_blind", lambda c: c.get("recall")), + "common_recall": ("callers_common", lambda c: c.get("recall")), + "common_recall_with_maybe": ("callers_common", lambda c: c.get("recall_with_maybe") if c.get("recall") is not None else None), + "common_precision": ("callers_common", lambda c: c.get("precision") if c.get("recall") is not None else None), + "rename_ok": ("rename", lambda x: 1.0 if x["ok"] else 0.0), + "tests_recall": ("tests", lambda t: t.get("recall")), + "tests_precision": ("tests", lambda t: t.get("precision") if "recall" in t else None), + "tests_top10_precision": ("tests", lambda t: t.get("top_precision") if "recall" in t else None), + "tests_top10_best": ("tests", lambda t: t.get("top_best") if "recall" in t else None), + "tests_caught": ("tests", lambda t: t.get("caught") if "recall" in t else None), + "look_vs_file": ("look", lambda x: x["look_tokens"] / max(1, x["file_tokens"])), +} + + +def _load_run(p: str) -> list[dict]: + path = Path(p) + if not path.exists() and (HERE / "results" / f"{p}.json").exists(): + path = HERE / "results" / f"{p}.json" # a bare name: eval/results/.json + data = json.loads(path.read_text()) + if not isinstance(data, list) or not all(isinstance(r, dict) and "repo" in r for r in data): + sys.exit(f"{path}: not the results of a run (eval/results/.json, a list with one entry per repo)") + return data + + +def paired_values(a: list[dict], b: list[dict]) -> tuple[dict, list[str]]: + """For every metric, the functions both runs measured: (repo, lang, symbol, value in A, value in B). + And what does not pair: repos or commits that differ, functions only one run has.""" + ra = {r["repo"]: r for r in a if "error" not in r} + rb = {r["repo"]: r for r in b if "error" not in r} + notes = [] + for name in sorted(set(ra) ^ set(rb)): + notes.append(f"{name}: only in {'A' if name in ra else 'B'} (or failed in the other run) — left out") + out: dict[str, list[tuple]] = {k: [] for k in PAIRED} + lost: dict[str, list[int]] = {} # kind of rows → [functions in A, in B, in both] + for name in sorted(set(ra) & set(rb)): + x, y = ra[name], rb[name] + if x.get("commit") != y.get("commit"): + notes.append(f"{name}: different commits ({x.get('commit')} / {y.get('commit')}) — left out") + continue + for kind in {k for k, _ in PAIRED.values()}: + ia = {row["symbol"]: row for row in x.get(kind, [])} + ib = {row["symbol"]: row for row in y.get(kind, [])} + both = [s for s in ia if s in ib] + c = lost.setdefault(kind, [0, 0, 0]) + c[0] += len(ia) + c[1] += len(ib) + c[2] += len(both) + for k, (kk, get) in PAIRED.items(): + if kk != kind: + continue + for s in both: + va, vb = get(ia[s]), get(ib[s]) + if va is not None and vb is not None: + out[k].append((name, x["lang"], s, va, vb)) + for kind, (na, nb, nboth) in sorted(lost.items()): + if na != nboth or nb != nboth: + notes.append(f"{kind}: {na} functions in A, {nb} in B, {nboth} in both — " + f"{(na + nb - 2 * nboth) / max(1, na + nb):.0%} do not pair (the sample depends on gitnext's answers)") + return out, notes + + +def paired_stats(rows: list[tuple]) -> dict | None: + """The mean difference B − A over the functions, its 90% interval when the functions are drawn again + (bootstrap, within each repo — a repo keeps its number of functions) and the verdict.""" + if not rows: + return None + n = len(rows) + by_repo: dict[str, list[float]] = {} + for repo, _, _, va, vb in rows: + by_repo.setdefault(repo, []).append(vb - va) + d = [x for v in by_repo.values() for x in v] + rng = random.Random(BOOT) + boots = sorted(sum(sum(rng.choices(v, k=len(v))) for v in by_repo.values()) / n for _ in range(BOOT)) + lo, hi = boots[int(0.05 * BOOT)], boots[int(0.95 * BOOT) - 1] + # the same mean, but for two versions measured on independent samples: what --check and latest.md allow + a = [r[3] for r in rows] + rng = random.Random(BOOT) + ba = sorted(sum(rng.choices(a, k=n)) / n for _ in range(BOOT)) + unpaired = (ba[int(0.95 * BOOT) - 1] - ba[int(0.05 * BOOT)]) / 2 + changed = sum(1 for x in d if abs(x) > 1e-12) + # a difference whose whole interval is under half a point is real but too small to matter + verdict = ("same" if not changed else "< 0.5 pt" if max(abs(lo), abs(hi)) < 0.005 + else "better" if lo > 0 else "worse" if hi < 0 else "can't tell") + return {"functions": n, "changed": changed, "a": sum(a) / n, "b": sum(r[4] for r in rows) / n, + "diff": sum(d) / n, "lo": lo, "hi": hi, "unpaired_half": unpaired, "verdict": verdict} + + +def compare_runs(pa: str, pb: str, top: int = 10) -> str: + """`--compare A B`: the two runs on the functions both measured. A difference counts when its 90% + interval stays on one side of zero: the noise of the sample cancels out, only functions whose + answer changed move the number.""" + pairs, notes = paired_values(_load_run(pa), _load_run(pb)) + pts = lambda x: f"{x * 100:+.1f}" + md = [f"# {Path(pa).stem} (A) → {Path(pb).stem} (B)", "", + "Paired: each function is measured by both versions, the difference B − A is taken per function, and the " + "90% interval comes from drawing the functions again (within each repo). `better` / `worse`: the whole interval " + "is on one side of zero. `can't tell`: it covers zero. `same`: no function changed. `< 0.5 pt`: the whole interval " + "is within half a point. `changed`: functions whose " + "value differs — a difference rests on them alone, read them below. `± alone`: the noise of one version on its " + "own (as in latest.md): two separate runs would need a difference that large.", ""] + if notes: + md += ["Not paired:", *[f"- {x}" for x in notes], ""] + langs = sorted({r[1] for v in pairs.values() for r in v}) + repos = sorted({r[0] for v in pairs.values() for r in v}) + head = "| metric | functions | changed | A | B | B − A, points | 90% interval | ± alone | verdict |" + sep = "|---|---:|---:|---:|---:|---:|---:|---:|---|" + + def table(title: str, keep) -> list[str]: + rows = [] + for k, label in METRIC_NAMES.items(): + s = paired_stats([r for r in pairs[k] if keep(r)]) + if s: + rows.append(f"| {label} | {s['functions']} | {s['changed']} | {s['a']:.1%} | {s['b']:.1%} | {pts(s['diff'])} | " + f"{pts(s['lo'])} … {pts(s['hi'])} | ±{s['unpaired_half'] * 100:.1f} | **{s['verdict']}** |") + return [f"## {title}", "", head, sep, *rows, ""] if rows else [] + + md += table("All repos", lambda r: True) + for lang in langs: + md += table(lang, lambda r, lang=lang: r[1] == lang) + # per repo: only the metrics where some function changed + per = ["## Per repo (metrics where a function changed)", "", "| repo | metric | functions | changed | A | B | B − A | 90% interval | verdict |", + "|---|---|---:|---:|---:|---:|---:|---:|---|"] + for repo in repos: + for k, label in METRIC_NAMES.items(): + s = paired_stats([r for r in pairs[k] if r[0] == repo]) + if s and s["changed"]: + per.append(f"| {repo} | {label} | {s['functions']} | {s['changed']} | {s['a']:.1%} | {s['b']:.1%} | {pts(s['diff'])} | " + f"{pts(s['lo'])} … {pts(s['hi'])} | {s['verdict']} |") + md += (per + [""]) if len(per) > 4 else ["## Per repo", "", "No function changed its value.", ""] + ch = [f"## Functions that changed (up to {top} per metric, largest first)", ""] + for k, label in METRIC_NAMES.items(): + moved = sorted((r for r in pairs[k] if abs(r[4] - r[3]) > 1e-12), key=lambda r: -abs(r[4] - r[3])) + if moved: + ch.append(f"- **{label}** ({len(moved)}): " + "; ".join(f"{r[0]} `{r[2]}` {r[3]:.0%} → {r[4]:.0%}" for r in moved[:top])) + md += ch if len(ch) > 2 else [] + return "\n".join(md) + "\n" + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + ap.add_argument("--compare", nargs=2, metavar=("A", "B"), help="compare two runs (their .json, or names in eval/results) on the\n" + "functions both measured: the difference, its 90%% interval and whether B is better, worse or can't tell") + ap.add_argument("--compare-out", metavar="FILE", help="with --compare: also write the table to this file") + ap.add_argument("--sample-from", metavar="RUN", help="measure the functions an earlier run picked (its .json, or a name in\n" + "eval/results) instead of drawing them again: the sample asks gitnext, so a change of the graph\n" + "would move it. Then --compare pairs every function. Same --seeds as that run") + ap.add_argument("--repos", default="", help="comma-separated names (default: all)") + ap.add_argument("--n", type=int, default=20, help="functions sampled per repo and seed") + ap.add_argument("--mutants", type=int, default=8, help="of those, how many get the test-suite check (one that cannot be\n" + "measured is replaced by the next of the sample; at most twice as many are tried)") + ap.add_argument("--seeds", default="7,8,9", help="the samples to draw. The numbers are over all distinct functions;\n" + "the seeds show how much a number depends on the sample") + ap.add_argument("--seed", type=int, help="one sample: the same as --seeds N") + ap.add_argument("--fast", action="store_true", help="after a rename only compile, skip the test suite (a rename that edits a\n" + "string the tests compare against compiles fine and is still wrong)") + ap.add_argument("--no-cache", action="store_true", help="ask the compilers and test suites again (eval/.work/truth.json)") + ap.add_argument("--out", default="latest", help="name of the result files in eval/results") + ap.add_argument("--check", action="store_true", help="exit 1 if a rate dropped below eval/baseline.json by more than its threshold") + ap.add_argument("--bless", action="store_true", help="accept the results as the baseline of this sample (--n, --mutants, --seeds)") + args = ap.parse_args() + if args.compare: + md = compare_runs(*args.compare) + if args.compare_out: + Path(args.compare_out).write_text(md) + print(md) + return + global USE_CACHE, SAMPLE_FROM + USE_CACHE = not args.no_cache + if args.sample_from: + SAMPLE_FROM = {r["repo"]: r for r in _load_run(args.sample_from) if "error" not in r} + seeds = [args.seed] if args.seed is not None else [int(x) for x in args.seeds.split(",") if x.strip()] + cfg = f"n{args.n}-m{args.mutants}-seeds{','.join(map(str, seeds))}" # a baseline belongs to one sample + repos = json.loads((HERE / "repos.json").read_text()) + if args.repos: + want = set(args.repos.split(",")) + repos = [r for r in repos if r["name"] in want] + t0 = time.time() + results = [] + for repo in repos: + print(f"== {repo['name']} ({repo['lang']})", flush=True) + try: + r = run_repo(repo, args.n, args.mutants, seeds, not args.fast) + except Exception as e: # one broken repo must not hide the others + r = {"repo": repo["name"], "lang": repo["lang"], "error": str(e)} + results.append(r) + print(json.dumps(r.get("summary") or r, ensure_ascii=False), flush=True) + agg = scopes(results) + secs = round(time.time() - t0) + note = (f"Sample `{cfg}`: {args.n} functions and {args.mutants} mutants per repo and seed, seeds {', '.join(map(str, seeds))}. " + f"Run time: {secs // 60} min {secs % 60} s; of the compilers' and test suites' answers {CACHE_STATS['cached']} came from the cache, " + f"{CACHE_STATS['asked']} were asked now.") + out = HERE / "results" + out.mkdir(exist_ok=True) + (out / f"{args.out}.json").write_text(json.dumps(results, ensure_ascii=False, indent=1)) + (out / f"{args.out}.noise.json").write_text(json.dumps({"config": cfg, "seconds": secs, "truth": CACHE_STATS, "scopes": agg}, ensure_ascii=False, indent=1)) + md = render_md(results, agg, note) + (out / f"{args.out}.md").write_text(md) + print("\n" + md) + base_path = HERE / "baseline.json" + baseline = json.loads(base_path.read_text()) if base_path.exists() else {} + if not all(isinstance(v, dict) and "repos" in v for v in baseline.values()): + baseline = {} # the format before samples had names: one sample, no thresholds + if args.bless: + entry = baseline.setdefault(cfg, {"repos": {}, "thresholds": {}}) + for r in results: + if r.get("summary"): + entry["repos"][r["repo"]] = r["summary"] + entry["thresholds"][r["repo"]] = {k: e["threshold"] for k, e in r["noise"].items() if e and k.endswith(RATES)} + base_path.write_text(json.dumps(baseline, indent=1) + "\n") + print(f"baseline updated ({cfg})") + if args.check: + if cfg not in baseline: + print(f"no baseline for the sample {cfg} in eval/baseline.json (it has: {', '.join(baseline) or 'none'}); run with --bless first") + sys.exit(1) + bad = compare(results, baseline[cfg]) + if bad: + print("REGRESSIONS:\n " + "\n ".join(bad)) + sys.exit(1) + print("no regressions") + + +if __name__ == "__main__": + main() diff --git a/eval/run_agent_mac.sh b/eval/run_agent_mac.sh new file mode 100644 index 0000000..1947140 --- /dev/null +++ b/eval/run_agent_mac.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# The plain agent (eval/agent.py) on a local model, without loca: +# base tools vs + gitnext tools (eleven tools) vs only gitnext's short list (`lite`, six tools), +# judged by each project's own compiler and tests. +# +# 1. model in another terminal: ~/Developer/loca/bin/llama.sh (any OpenAI-compatible server) +# 2. sh eval/run_agent_mac.sh +# +# Options: REPOS=click,semver TASKS=find,callers,fix,rename MODES=base,gitnext,lite REPEAT=3 PORT=8080 LEARN=1 +# (other modes: verify, ctx, both, cmd; REPEAT=N is N different task sets per project; +# LEARN=0: no `gitnext learn-tests` before the `fix` tasks; a Rust project needs +# `rustup component add llvm-tools-preview` for it, a Python one pytest-cov — installed by the run) +# Projects are cloned into eval/.work (pinned commits, see eval/repos.json); needs git, python3, cargo. +# Results: eval/results/agent--.json / .md / .log / .trace.jsonl (every conversation) +set -e +GN=$(cd "$(dirname "$0")/.." && pwd) +REPOS=${REPOS:-click,semver} +TASKS=${TASKS:-find,callers,fix,rename} +MODES=${MODES:-base,gitnext,lite} +REPEAT=${REPEAT:-3} +PORT=${PORT:-8080} +LEARN=${LEARN:-1} + +command -v gitnext >/dev/null 2>&1 || { echo "gitnext is not on PATH: cargo install --path $GN/crates/gitnext-cli --force"; exit 1; } +if ! curl -s "http://127.0.0.1:$PORT/health" | grep -q ok; then + echo "the model server is not answering on port $PORT — start it first (e.g. ~/Developer/loca/bin/llama.sh)"; exit 1 +fi +NAME="agent-$(hostname -s 2>/dev/null || echo mac)-$(date +%Y%m%d-%H%M)" +mkdir -p "$GN/eval/results" +cd "$GN/eval" +GITNEXT=$(command -v gitnext) python3 agent.py --host "http://127.0.0.1:$PORT" --repos "$REPOS" --tasks "$TASKS" \ + --modes "$MODES" --repeat "$REPEAT" $([ "$LEARN" = 1 ] && echo --learn) --out "$GN/eval/results/$NAME.json" 2>&1 | tee "$GN/eval/results/$NAME.log" diff --git a/eval/smoke.py b/eval/smoke.py new file mode 100644 index 0000000..7f639d4 --- /dev/null +++ b/eval/smoke.py @@ -0,0 +1,208 @@ +#!/usr/bin/env python3 +"""Every gitnext command and every MCP tool, once, on every eval project: does it answer? + +Not a measure of quality (eval/run.py is) — a check that nothing crashes, hangs or comes back +empty on real code in five languages. For each project a function with callers, a class, a file +and a folder are picked from the index and every read-only command is run with them; the commands +that change files run in a throw-away copy of the project; the MCP tools are called over stdio. + + GITNEXT=$PWD/target/release/gitnext python3 eval/smoke.py [--repos semver,click] + +Result: eval/results/smoke.md / .json — one row per command that failed, was empty, or was slow. +""" +from __future__ import annotations + +import argparse +import json +import os +import shutil +import subprocess +import sys +import tempfile +import time +from pathlib import Path + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import run as ev # noqa: E402 + +SLOW = 20.0 # seconds + + +ENV = {**os.environ, "GIT_AUTHOR_NAME": "smoke", "GIT_AUTHOR_EMAIL": "smoke@example.invalid", "GIT_COMMITTER_NAME": "smoke", "GIT_COMMITTER_EMAIL": "smoke@example.invalid"} + + +def sh(args: list[str], cwd: Path, stdin: str | None = None, timeout: int = 300) -> tuple[int, str, float]: + t = time.time() + try: + p = subprocess.run(args, cwd=cwd, input=stdin, capture_output=True, text=True, timeout=timeout, errors="replace", env=ENV) + return p.returncode, p.stdout + p.stderr, time.time() - t + except subprocess.TimeoutExpired: + return -9, "timed out", time.time() - t + + +def samples(root: Path) -> dict: + aside = ("benches/", "bench/", "examples/", "example/", "docs/", "tests/", "test/", "_examples/", "scripts/") + syms = [s for s in ev.symbols(root) if not s.get("test") and not s["file"].startswith(aside)] + fns = [s for s in syms if s["kind"] in ("function", "method") and s["end_line"] - s["start_line"] >= 3] + # a function somebody calls, not too common a name + names: dict[str, int] = {} + for s in fns: + names[s["name"]] = names.get(s["name"], 0) + 1 + fn = None + for s in sorted(fns, key=lambda s: (names[s["name"]], s["file"], s["start_line"])): + code, out, _ = sh([ev.GITNEXT, "--json", "callers", s["qualified"]], root) + if code == 0 and '"file"' in out: + fn = s + break + fn = fn or fns[0] + cls = next((s for s in syms if s["kind"] in ("class", "struct", "interface", "trait", "enum")), fn) + with_tests = json.loads(sh([ev.GITNEXT, "--json", "--tests", "symbols"], root)[1] or "[]") + tests = [s for s in with_tests if s.get("test") and s["kind"] in ("function", "method")] + # Go: `TestX` is a test and `testX` in a _test.go file is its helper; elsewhere `test_x` / `testX` is the test + first, second = ("Test", "test") if any(t["file"].endswith("_test.go") for t in tests) else ("test", "Test") + test = next((s for s in tests if s["name"].startswith(first)), None) or next((s for s in tests if s["name"].startswith(second)), None) + d = str(Path(fn["file"]).parent) + return {"fn": fn["qualified"], "name": fn["name"], "file": fn["file"], "line": fn["start_line"] + 1, "dir": d if d != "." else "", "cls": cls["qualified"], + "test": test["name"] if test else fn["name"], "start": fn["start_line"], "end": fn["end_line"]} + + +def read_only(s: dict) -> list[tuple[str, list[str], str | None]]: + g = lambda *a: list(a) # noqa: E731 + err = f"{s['file']}:{s['line']}: error: something went wrong here" + return [ + ("status", g("status"), None), ("log", g("log", "-n", "5"), None), ("diff", g("diff"), None), ("index", g("index"), None), + ("map ", g("map", s["dir"] or "."), None), ("outline ", g("outline", s["file"]), None), ("outline ", g("outline", s["dir"] or "."), None), + ("read", g("read", s["fn"]), None), ("show", g("show", s["fn"]), None), ("search", g("search", s["name"]), None), + ("search --text", g("search", "--text", s["name"]), None), ("symbols ", g("symbols", s["file"]), None), + ("callers", g("callers", s["fn"]), None), ("callees", g("callees", s["fn"]), None), ("impact", g("impact", s["fn"]), None), + ("hierarchy", g("hierarchy", s["cls"]), None), ("deps", g("deps", s["dir"] or "."), None), + ("context", g("context", f"fix the bug in {s['name']}"), None), ("since", g("since", "HEAD"), None), + ("locate", g("locate", err), None), ("history", g("history", s["fn"]), None), ("changelog", g("changelog", "HEAD~1.."), None), + ("overview", g("overview"), None), ("activity", g("activity"), None), ("hotspots", g("hotspots"), None), ("dead", g("dead"), None), + ("cycles", g("cycles"), None), ("entrypoints", g("entrypoints"), None), ("journal", g("journal"), None), ("brief", g("brief"), None), + ("libs", g("libs"), None), ("look ", g("look", s["fn"]), None), ("look ", g("look", s["file"]), None), + ("look ", g("look", err), None), ("look <3 targets>", g("look", s["fn"], s["cls"], s["file"]), None), + ("doctor", g("doctor"), None), ("ops", g("ops"), None), ("branches", g("branches"), None), ("timeline", g("timeline"), None), + ("tests-for", g("tests-for", s["fn"]), None), ("digest", g("digest"), f"{err}\nerror: aborting due to 1 previous error\n"), + ("--json look", g("--json", "look", s["fn"]), None), ("--json callers", g("--json", "callers", s["fn"]), None), + ("--json overview", g("--json", "overview"), None), ("--json tests-for", g("--json", "tests-for", s["fn"]), None), + ("bench", g("bench"), None), + ] + + +def changing(s: dict, root: Path) -> list[tuple[str, list[str], str | None]]: + """Run in a copy: one after another, each builds on the last.""" + code = "\n".join(Path(root / s["file"]).read_text(errors="replace").split("\n")[s["start"] - 1:s["end"]]) + "\n" + new = s["name"] + ("_smoke" if s["name"].islower() or "_" in s["name"] else "Smoke") + return [ + ("edit replace", ["edit", "replace", s["fn"]], code), ("rename", ["rename", s["fn"], new], None), ("diff (after rename)", ["diff"], None), + ("ops (after edits)", ["ops"], None), ("add", ["add"], None), ("status (staged)", ["status"], None), ("msg", ["msg"], None), + ("commit", ["commit", "-m", "smoke"], None), ("undo", ["undo"], None), ("reset ", ["reset", s["file"]], None), ("undo --op 1", ["undo", "--op", "1"], None), + ] + + +def mcp(root: Path, s: dict, code: str) -> list[dict]: + """tools/list, then every tool once; arguments are filled from the schema by the property's name.""" + p = subprocess.Popen([ev.GITNEXT, "mcp"], cwd=root, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True) + n = 0 + + def ask(method: str, params: dict) -> dict: + nonlocal n + n += 1 + p.stdin.write(json.dumps({"jsonrpc": "2.0", "id": n, "method": method, "params": params}) + "\n") + p.stdin.flush() + line = p.stdout.readline() + return json.loads(line) if line.strip() else {"error": {"message": "no answer"}} + + ask("initialize", {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "smoke", "version": "0"}}) + tools = ask("tools/list", {}).get("result", {}).get("tools", []) + new = s["name"] + "_mcp" + fill = {"symbol": s["fn"], "symbols": [s["fn"]], "target": s["fn"], "targets": [s["fn"], s["file"]], "name": s["fn"], "path": s["file"], "file": s["file"], "dir": s["dir"] or ".", + "query": s["name"], "task": f"fix the bug in {s['name']}", "text": f"{s['file']}:{s['line']}: error: x", "error": f"{s['file']}:{s['line']}: error: x", "code": code, + "new_name": new, "new": new, "old": s["fn"], "summary": "smoke test note", "note": "smoke test note", "rev": "HEAD", "range": "HEAD~1..", "test": s["test"], "what": s["fn"], "depth": 2, "limit": 5} + rows = [] + order = sorted(tools, key=lambda t: {"rename_symbol": 1, "delete_symbol": 2}.get(t["name"], 0)) # the two that take the symbol away go last + for t in order: + props = (t.get("inputSchema") or {}).get("properties") or {} + req = (t.get("inputSchema") or {}).get("required") or [] + if t["name"] == "hierarchy": + fill["symbol"] = s["cls"] + elif t["name"] == "annotate": + fill["items"] = [{"symbol": s["fn"], "summary": "smoke test note"}] + else: + fill["symbol"] = s["fn"] + # a new function after the sample, not a second copy of it + fill["code"] = code.replace(s["name"], s["name"] + "_added", 1) if t["name"] == "insert_after" else code + if t["name"] == "delete_symbol": + fill["symbol"] = s["fn"] + "_added" # the one `insert_after` put in + args = {k: fill[k] for k in props if k in fill and (k in req or k in ("symbol", "target", "targets", "path", "query", "task", "test") and t["name"] not in ("check",))} + missing = [k for k in req if k not in args] + t0 = time.time() + r = ask("tools/call", {"name": t["name"], "arguments": args}) + res = r.get("result") or {} + text = "".join(c.get("text", "") for c in res.get("content", [])) + bad = "error" in r or res.get("isError") or not text.strip() + rows.append({"cmd": f"mcp {t['name']}", "ok": not bad and not missing, "seconds": round(time.time() - t0, 1), "bytes": len(text), + "note": (f"no value for required {missing}; " if missing else "") + ((r.get("error") or {}).get("message") or text.strip().split("\n")[0])[:160]}) + p.stdin.close() + p.wait(timeout=30) + return rows + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + ap.add_argument("--repos", default="") + ap.add_argument("--out", default=str(HERE / "results" / "smoke.json")) + a = ap.parse_args() + repos = [r for r in json.loads((HERE / "repos.json").read_text()) if not a.repos or r["name"] in a.repos.split(",")] + rows = [] + for repo in repos: + root = ev.WORK / repo["name"] + if not root.exists(): + print(f"{repo['name']}: not checked out, skipped", flush=True) + continue + ev.sh(f"git checkout -q -f {repo['commit']}", root) + ev.restore(root) + ev.gx(["index"], root, timeout=1800) + s = samples(root) + print(f"== {repo['name']} ({repo['lang']}): {s['fn']} {s['file']}", flush=True) + + def note(name: str, code: int, out: str, secs: float, cwd_note: str = "") -> None: + crashed = "panicked at" in out or code in (-9, 101, 134, 139) + # `doctor` exits 1 when something is missing for agents (here: no agent config) and says what + quiet = name in ("add", "reset ") # like git: nothing to say when it worked + ok = (code == 0 or name == "doctor") and (out.strip() != "" or quiet) and not crashed + rows.append({"repo": repo["name"], "lang": repo["lang"], "cmd": name, "ok": ok, "crashed": crashed, "code": code, "seconds": round(secs, 1), "bytes": len(out), + "note": "" if ok and secs < SLOW else (out.strip().split("\n") or [""])[-1][:160] or "empty output"}) + + for name, args, stdin in read_only(s): + note(name, *sh([ev.GITNEXT, *args], root, stdin)) + with tempfile.TemporaryDirectory() as tmp: + copy = Path(tmp) / repo["name"] + shutil.copytree(root, copy, symlinks=True, ignore=shutil.ignore_patterns("node_modules", "target", ".venv")) + code_text = "\n".join((root / s["file"]).read_text(errors="replace").split("\n")[s["start"] - 1:s["end"]]) + "\n" + (copy / ".gitnext" / "ops.jsonl").unlink(missing_ok=True) # the journal of earlier eval runs: operation numbers start again + for name, args, stdin in changing(s, root): + note(name, *sh([ev.GITNEXT, *args], copy, stdin)) + sh(["git", "checkout", "-q", "-f", "HEAD"], copy) + sh([ev.GITNEXT, "index"], copy) + for r in mcp(copy, s, code_text): + rows.append({"repo": repo["name"], "lang": repo["lang"], "crashed": False, "code": 0, **r}) + bad = [r for r in rows if r["repo"] == repo["name"] and not r["ok"]] + print(f" {sum(1 for r in rows if r['repo'] == repo['name'])} calls, {len(bad)} not ok: " + ", ".join(r["cmd"] for r in bad)[:300], flush=True) + ev.restore(root) + Path(a.out).write_text(json.dumps(rows, ensure_ascii=False, indent=1)) + cmds = sorted({r["cmd"] for r in rows}, key=lambda c: (c.startswith("mcp "), c)) + md = [f"{len(rows)} calls: {len(cmds)} commands and MCP tools × {len({r['repo'] for r in rows})} projects. Not ok: {sum(1 for r in rows if not r['ok'])}, crashed: {sum(1 for r in rows if r['crashed'])}, slower than {SLOW:.0f}s: {sum(1 for r in rows if r['seconds'] >= SLOW)}.", "", + "| command | ok in | slowest, s | not ok: project — what it said |", "|---|---:|---:|---|"] + for c in cmds: + rs = [r for r in rows if r["cmd"] == c] + bad = [r for r in rs if not r["ok"]] + md.append(f"| `{c}` | {len(rs) - len(bad)}/{len(rs)} | {max(r['seconds'] for r in rs)} | " + "; ".join(f"{r['repo']} — {r['note']}" for r in bad[:4]).replace("|", "/") + " |") + Path(a.out).with_suffix(".md").write_text("\n".join(md) + "\n") + print(md[0]) + + +if __name__ == "__main__": + main() diff --git a/eval/test_guard.py b/eval/test_guard.py new file mode 100644 index 0000000..2997e17 --- /dev/null +++ b/eval/test_guard.py @@ -0,0 +1,368 @@ +#!/usr/bin/env python3 +"""The loop guard and the agent loop against a scripted "model" — no real model needed. + + python3 -m unittest eval/test_guard.py (from the repository root) +""" +from __future__ import annotations + +import json +import subprocess +import sys +import tempfile +import threading +import time +import unittest +from http.server import BaseHTTPRequestHandler, HTTPServer +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +import agent # noqa: E402 +import guard # noqa: E402 + +agent.ev.GITNEXT = "/bin/true" # `gitnext context` / `locate` answer nothing: the loop itself is under test + + +def call(name: str, **args) -> dict: + return {"role": "assistant", "content": "", "tool_calls": [{"id": f"c{time.time_ns()}", "type": "function", "function": {"name": name, "arguments": json.dumps(args)}}]} + + +def say(text: str) -> dict: + return {"role": "assistant", "content": text} + + +class Script: + """An OpenAI-compatible server that answers with the next scripted message.""" + + def __init__(self, replies: list[dict]): + self.replies, self.requests = list(replies), [] + outer = self + + class H(BaseHTTPRequestHandler): + def do_POST(self): + body = json.loads(self.rfile.read(int(self.headers["Content-Length"]))) + outer.requests.append(body) + msg = outer.replies.pop(0) if outer.replies else say("") + data = json.dumps({"choices": [{"message": msg}], "usage": {"prompt_tokens": 100, "completion_tokens": 10}}).encode() + self.send_response(200) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(data))) + self.end_headers() + self.wfile.write(data) + + def log_message(self, *a): + pass + + self.server = HTTPServer(("127.0.0.1", 0), H) + self.host = f"http://127.0.0.1:{self.server.server_port}" + threading.Thread(target=self.server.serve_forever, daemon=True).start() + + def seen(self) -> str: + """Everything the model was shown, as one string.""" + return json.dumps(self.requests[-1]["messages"], ensure_ascii=False) if self.requests else "" + + def close(self): + self.server.shutdown() + + +class Case(unittest.TestCase): + def setUp(self): + self.tmp = tempfile.TemporaryDirectory() + self.root = Path(self.tmp.name) + (self.root / "calc.py").write_text("def add(a, b):\n return a + b\n") + (self.root / "notes.txt").write_text("one\ntwo\n") + for c in (["init", "-q"], ["add", "-A"], ["-c", "user.name=t", "-c", "user.email=t@example.invalid", "-c", "commit.gpgsign=false", "commit", "-qm", "start"]): + subprocess.run(["git", *c], cwd=self.root, check=True, capture_output=True) + + def tearDown(self): + self.tmp.cleanup() + + def run_agent(self, replies, mode="base", steps=25): + s = Script(replies) + try: + res = agent.agent({"prompt": "do the task"}, mode, self.root, "python", s.host, steps, time.time() + 120) + finally: + s.close() + return res, s + + # ---- repeated call + + def test_same_call_is_not_run_twice(self): + res, s = self.run_agent([call("grep", pattern="add"), call("grep", pattern="add"), call("grep", pattern="add"), call("finish", answer="calc.py")]) + self.assertEqual(res["guard"]["repeats"], 2) + self.assertIn("Not run again", s.seen()) + self.assertEqual(res["answer"], "calc.py") + self.assertNotIn("stopped", res) + + def test_same_call_runs_again_after_a_change(self): + res, _ = self.run_agent([call("run", command="cat calc.py"), call("edit_file", path="calc.py", old="a + b", new="a - b"), + call("run", command="cat calc.py"), call("finish", answer="ok")]) + self.assertNotIn("repeats", res["guard"]) + + # ---- no progress + + def test_no_progress_nudges_then_stops(self): + res, s = self.run_agent([call("read_file", path="notes.txt")] * 12) + self.assertEqual(res["stopped"], "no_progress") + self.assertEqual(res["steps"], 1 + 2 * guard.NO_PROGRESS_STEPS) + self.assertIn("brought nothing new", s.seen()) + self.assertIn("Stopped: no_progress", res["handoff"]) + self.assertIn("read_file", res["handoff"]) + + # ---- the same error again + + def test_same_error_hint_then_stop(self): + fail = "python3 -c \"raise ValueError('boom')\"" + replies = [] + for i in range(5): + replies += [call("edit_file", path="notes.txt", old="one" if i == 0 else f"v{i - 1}", new=f"v{i}"), call("run", command=fail)] + res, s = self.run_agent(replies) + self.assertEqual(res["stopped"], "same_error") + self.assertEqual(res["tools"]["run"], guard.SAME_ERROR_LIMIT) + self.assertIn("same error as before", s.seen()) + self.assertIn("ValueError", res["handoff"]) + + # ---- see-saw + + def test_seesaw_goes_back_to_the_start(self): + flip = call("edit_file", path="calc.py", old="a + b", new="a - b") + flop = call("edit_file", path="calc.py", old="a - b", new="a + b") + # the same two versions reached by other means (an identical call would be caught as a repeat) + flip2 = call("run", command="sed -i 's/a + b/a - b/' calc.py") + mark = call("edit_file", path="notes.txt", old="one", new="uno") # an edit before the see-saw, never tested: undone too + res, s = self.run_agent([mark, flip, flop, flip2, call("finish", answer="gave up")]) + self.assertEqual(res["guard"]["seesaw"], 1) + self.assertIn("same two versions", s.seen()) + self.assertEqual((self.root / "notes.txt").read_text(), "one\ntwo\n") + self.assertEqual((self.root / "calc.py").read_text(), "def add(a, b):\n return a + b\n") + + def test_seesaw_goes_back_to_the_last_passing_state(self): + flip = call("edit_file", path="calc.py", old="a + b", new="a - b") + flop = call("edit_file", path="calc.py", old="a - b", new="a + b") + flip2 = call("run", command="sed -i 's/a + b/a - b/' calc.py") + res, _ = self.run_agent([call("edit_file", path="notes.txt", old="one", new="uno"), call("run", command="grep -q uno notes.txt # stands in for pytest"), + flip, flop, flip2, call("finish", answer="x")]) + self.assertEqual(res["guard"]["seesaw"], 1) + self.assertEqual((self.root / "notes.txt").read_text(), "uno\ntwo\n") # the state the passing tests saw + self.assertEqual((self.root / "calc.py").read_text(), "def add(a, b):\n return a + b\n") + + def test_identical_edit_in_the_same_state_is_a_repeat(self): + flip = call("edit_file", path="calc.py", old="a + b", new="a - b") + flop = call("edit_file", path="calc.py", old="a - b", new="a + b") + res, s = self.run_agent([flip, flop, flip, call("finish", answer="x")]) + self.assertEqual(res["guard"]["repeats"], 1) + self.assertEqual((self.root / "calc.py").read_text(), "def add(a, b):\n return a + b\n") + + # ---- budgets + + def test_soft_budget_asks_to_wrap_up(self): + res, s = self.run_agent([call("grep", pattern=f"p{i}") for i in range(8)] + [call("finish", answer="done")], steps=10) + self.assertEqual(res["guard"]["soft_budget"], 1) + self.assertIn("Wrap up", s.seen()) + self.assertEqual(res["answer"], "done") + + def test_hard_token_budget_stops(self): + agent.TOKEN_BUDGET = 350 # the scripted server reports 100 prompt tokens per turn + try: + res, _ = self.run_agent([call("grep", pattern=f"p{i}") for i in range(10)]) + finally: + agent.TOKEN_BUDGET = 0 + self.assertEqual(res["stopped"], "budget") + self.assertEqual(res["steps"], 4) + + # ---- repeated text, history + + def test_repeated_text_is_cut(self): + text, cut = guard.trim_repeats("I will check the file.\n" * 40) + self.assertTrue(cut) + self.assertEqual(text.count("I will check the file."), 2) + text, cut = guard.trim_repeats("Let me think. " + "the answer is in calc.py, " * 30) + self.assertTrue(cut) + self.assertLess(len(text), 120) + self.assertEqual(guard.trim_repeats("def f():\n pass\n\n\ndef g():\n pass\n"), ("def f():\n pass\n\n\ndef g():\n pass\n", False)) + + def test_old_output_becomes_one_line(self): + msgs = [{"role": "system", "content": "s"}, {"role": "user", "content": "task"}] + for i in range(6): + msgs.append({"role": "assistant", "content": "", "tool_calls": [{"id": f"c{i}", "function": {"name": "read_file", "arguments": json.dumps({"path": f"f{i}.py"})}}]}) + msgs.append({"role": "tool", "tool_call_id": f"c{i}", "content": f"line of file {i}\n" * 200}) + guard.compress(msgs, 9000) + outs = [m["content"] for m in msgs if m["role"] == "tool"] + self.assertTrue(outs[0].startswith("[old output of read_file")) + self.assertIn("f0.py", outs[0]) + self.assertIn("200 lines", outs[0].replace("201", "200")) + self.assertEqual(outs[-1], "line of file 5\n" * 200) # the newest stays whole + self.assertLessEqual(sum(len(m.get("content") or "") for m in msgs), 9000 + 600) + + # ---- command mode + + def test_command_mode_runs_fenced_commands(self): + res, s = self.run_agent([say("```sh\ngrep -n add calc.py\n```"), say("I think it is there."), say("DONE: calc.py line 1")], mode="cmd") + self.assertEqual(res["answer"], "calc.py line 1") + self.assertEqual(res["tools"], {"sh": 1}) + self.assertNotIn("tools", s.requests[0]) # no tool-calling API in this mode + self.assertIn("1:def add", s.seen()) + self.assertIn("one command in a ```sh block", s.seen()) + + def test_command_mode_repeat_is_caught(self): + res, s = self.run_agent([say("```sh\ncat notes.txt\n```")] * 3 + [say("DONE: two lines")], mode="cmd") + self.assertEqual(res["guard"]["repeats"], 2) + self.assertEqual(res["answer"], "two lines") + + + # ---- the gate of `verify` mode + + def fake_gitnext(self) -> str: + """`gitnext check` passes once calc.py subtracts; every other command says nothing.""" + g = self.root.parent / f"gitnext-{self.root.name}.sh" + g.write_text("#!/bin/sh\nif [ \"$1\" = check ]; then grep -q 'a - b' calc.py && echo 'verdict: ok — builds, 1 test pass' || { grep -q 'a / b' calc.py && echo 'verdict: builds, but no test reaches the changed code' || { echo 'calc.py: test_add failed'; echo 'verdict: FAILED — tests (see the output above)'; }; }; fi\n" + "if [ \"$1\" = digest ]; then cat >/dev/null; echo 'tests: 1 failed'; echo '✗ test_add calc.py:2'; fi\n" + "if [ \"$1\" = check ] && [ -n \"$2\" ]; then echo \"why: test_$2 — FAILS\"; fi\n" + # `edit replace add`: the code on stdin replaces calc.py (the only function there); any other name is unknown + "if [ \"$1\" = edit ]; then if [ \"$3\" = add ]; then cat > calc.py; echo 'ok calc.py:1-2'; else cat >/dev/null; echo \"error: symbol $3 not found\"; exit 1; fi; fi\n") + g.chmod(0o755) + self.addCleanup(g.unlink) + self.addCleanup(setattr, agent.ev, "GITNEXT", agent.ev.GITNEXT) + agent.ev.GITNEXT = str(g) + return str(g) + + def test_verify_sends_back_an_answer_given_without_a_look(self): + self.fake_gitnext() + res, s = self.run_agent([say("it is in calc.py"), call("grep", pattern="add"), say("calc.py"), say("calc.py")], mode="verify") + self.assertEqual(res["gate"], {"tool": 1, "nochange": 1}) + self.assertEqual(res["answer"], "calc.py") + self.assertIn("Your first step must be a tool call", s.seen()) + self.assertIn("No file was changed", s.seen()) + # the answer given without a look is not shown to the model again + self.assertNotIn("it is in calc.py", json.dumps(s.requests[1]["messages"])) + + def test_verify_ends_only_when_the_check_passes(self): + self.fake_gitnext() + res, s = self.run_agent([call("edit_file", path="calc.py", old="a + b", new="a * b"), call("finish", answer="fixed"), + call("edit_file", path="calc.py", old="a * b", new="a - b"), call("finish", answer="fixed now")], mode="verify") + self.assertEqual(res["gate"], {"check": 1}) + self.assertEqual(res["answer"], "fixed now") + self.assertIn("The check of your change failed", s.seen()) + self.assertIn("test_add failed", s.seen()) + self.assertIn("look", [t["function"]["name"] for t in s.requests[0]["tools"]]) # the gitnext tools are there + + def test_verify_lets_a_change_no_test_reaches_through(self): + self.fake_gitnext() + res, s = self.run_agent([call("edit_file", path="calc.py", old="a + b", new="a / b"), call("finish", answer="changed")], mode="verify") + self.assertNotIn("gate", res) + self.assertEqual(res["answer"], "changed") + + def test_run_uses_the_projects_own_environment(self): + (self.root / ".venv" / "bin").mkdir(parents=True) + tool = self.root / ".venv" / "bin" / "projtool" + tool.write_text("#!/bin/sh\necho from-venv\n") + tool.chmod(0o755) + self.assertIn("from-venv", agent.call_tool("run", {"command": "projtool"}, self.root, "python")) + + def test_long_failing_output_comes_back_as_its_digest(self): + self.fake_gitnext() + noisy = "seq 1 400; exit 1" + _, s = self.run_agent([call("run", command=noisy), say("it fails")], mode="gitnext") + self.assertIn("tests: 1 failed", s.seen()) + self.assertIn("the whole output: 401 lines", s.seen()) + self.assertNotIn("399", s.seen()) + # without gitnext the model gets the output itself; a short or a passing one is never digested + _, s = self.run_agent([call("run", command=noisy), say("it fails")], mode="base") + self.assertIn("399", s.seen()) + _, s = self.run_agent([call("run", command="echo short; exit 1"), call("run", command="seq 1 400"), say("ok")], mode="gitnext") + self.assertIn("short", s.seen()) + self.assertIn("399", s.seen()) + + def test_check_with_a_test_name_tells_why_it_fails(self): + self.fake_gitnext() + res, s = self.run_agent([call("check", test="add"), say("the bug is in add")], mode="gitnext") + self.assertIn("why: test_add — FAILS", s.seen()) + self.assertEqual(res["tools"], {"check": 1}) + self.assertNotIn("check", [t["function"]["name"] for t in self.run_agent([say("x")], mode="base")[1].requests[0]["tools"]]) + + def test_lite_mode_has_six_tools_and_they_work(self): + self.fake_gitnext() + res, s = self.run_agent([call("check", test="add"), call("check"), call("finish", answer="done"), call("finish", answer="done")], mode="lite") + self.assertEqual([t["function"]["name"] for t in s.requests[0]["tools"]], ["look", "replace", "add_after", "rename", "check", "finish"]) + self.assertIn("five tools", s.requests[0]["messages"][0]["content"]) + self.assertIn("why: test_add — FAILS", s.seen()) + self.assertIn("test_add failed", s.seen()) # `check` without a test: the verdict on the change + self.assertEqual(res["answer"], "done") + self.assertEqual(res["gate"], {"nochange": 1}) # lite has the whole gate + + def test_a_tool_name_written_as_the_answer_is_sent_back(self): + self.fake_gitnext() + res, s = self.run_agent([say("look"), say("`check`"), call("check"), call("finish", answer="add")], mode="gitnext") + self.assertEqual(res["gate"], {"bare": 2}) + self.assertEqual(res["answer"], "add") + self.assertIn("`look` is a tool, not an answer: call it with its arguments.", s.seen()) + + def test_a_function_written_in_the_answer_is_put_in_place_and_checked(self): + self.fake_gitnext() + wrong = "The bug is in add. Fixed:\n```python\ndef add(a, b):\n return a * b\n```\nThis should work." + right = "Sorry, here:\n```python\ndef add(a, b):\n return a - b\n```" + res, s = self.run_agent([say(wrong), say(right), say("fixed add")], mode="gitnext") + self.assertEqual((self.root / "calc.py").read_text(), "def add(a, b):\n return a - b\n") + self.assertEqual(res["text_code"], 2) + self.assertEqual(res["answer"], "fixed add") + seen = s.seen() + self.assertIn("The function `add` you wrote was put in place (calc.py:1-2)", seen) + self.assertIn("It failed: write the whole corrected function again.", seen) + self.assertIn("verdict: ok", seen) + + def test_the_same_code_written_again_is_not_checked_again(self): + self.fake_gitnext() + same = "Fixed:\n```python\n" + (self.root / "calc.py").read_text() + "```" + res, s = self.run_agent([call("grep", pattern="add"), say(same), say("done")], mode="gitnext") + self.assertIn("is the same as the code already in the file", s.seen()) + self.assertNotIn("The check:", s.seen()) + + def test_code_in_the_answer_is_left_alone_when_it_is_not_a_function_of_the_project(self): + self.fake_gitnext() + before = (self.root / "calc.py").read_text() + other = "Try this:\n```python\ndef brand_new(x):\n return x\n```\nand this test:\n```python\ndef test_add():\n assert add(1, 2) == 3\n```" + res, _ = self.run_agent([say(other), say(other)], mode="gitnext") + self.assertNotIn("text_code", res) + self.assertEqual((self.root / "calc.py").read_text(), before) + # and without gitnext nothing is applied at all + fix = "```python\ndef add(a, b):\n return a - b\n```" + res, _ = self.run_agent([say(fix)], mode="base") + self.assertNotIn("text_code", res) + self.assertEqual((self.root / "calc.py").read_text(), before) + + def test_other_modes_have_only_the_first_part_of_the_gate(self): + self.fake_gitnext() + res, s = self.run_agent([say("it is in calc.py"), call("grep", pattern="add"), say("calc.py")], mode="gitnext") + self.assertEqual(res["answer"], "calc.py") + self.assertEqual(res["gate"], {"tool": 1}) # no "No file was changed", no check + res, _ = self.run_agent([say("it is in calc.py")], mode="base") + self.assertEqual(res["answer"], "it is in calc.py") + self.assertNotIn("gate", res) + + # ---- a task card + + def test_task_card_is_judged_by_its_accept_command(self): + card = self.root.parent / f"card-{self.root.name}.json" + card.write_text(json.dumps({"repo": str(self.root), "prompt": "make add subtract", "accept": "grep -q 'a - b' calc.py"})) + s = Script([say("```sh\nsed -i 's/a + b/a - b/' calc.py\n```"), say("DONE: changed")]) + try: + res = agent.run_card(card, "cmd", s.host, 10, 2, "") + finally: + s.close() + self.assertTrue(res["passed"]) + self.assertIn("- return a + b", card.with_suffix(".patch").read_text()) + self.assertTrue(json.loads(card.with_suffix(".result.json").read_text())["passed"]) + # the same card with a model that does nothing fails the accept command + subprocess.run(["git", "checkout", "-q", "--", "."], cwd=self.root, check=True) + s = Script([say("DONE: nothing to do")]) + try: + res = agent.run_card(card, "cmd", s.host, 10, 2, "") + finally: + s.close() + self.assertFalse(res["passed"]) + self.assertEqual(json.loads(card.with_suffix(".trace.json").read_text())[-1]["content"], "DONE: nothing to do") + for f in (card, card.with_suffix(".patch"), card.with_suffix(".result.json"), card.with_suffix(".trace.json")): + f.unlink() + + +if __name__ == "__main__": + unittest.main() diff --git a/eval/why_rank.py b/eval/why_rank.py new file mode 100644 index 0000000..a72ae6b --- /dev/null +++ b/eval/why_rank.py @@ -0,0 +1,130 @@ +#!/usr/bin/env python3 +"""Where does `gitnext why ` put the function that is really at fault? + +A bug is seeded into a project the way eval/agent.py does it (one operator changed inside a +function, kept if some test starts failing), committed, and `gitnext why --json` +is asked for its list. The answer is known: the function that was changed. Measured: how often +it is first, in the first 3, in the first 8 (what the text output lists), or in the list at all. + + GITNEXT=$PWD/target/release/gitnext python3 eval/why_rank.py --repos click,sqlparse,semver,cobra --bugs 12 + … --learn `gitnext learn-tests` on the clean code first (Python repos) + … --variants static,nochange,default compare (GITNEXT_WHY_RANK, for measuring only): the call graph + alone; learned coverage without the "changed since the map + was learned" mark; everything + +The bugs found for a repo are kept in eval/.work/why-bugs-.json: the next run asks only gitnext. +Results: eval/results/why-rank.json / .md. +""" +from __future__ import annotations + +import argparse +import json +import random +import subprocess +import sys +import time +from pathlib import Path + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import agent # noqa: E402 +import run as ev # noqa: E402 + + +def bugs_of(repo: dict, root: Path, n: int, seed: int) -> list[dict]: + """`n` seeded bugs with different targets: patch, the changed function, a test that fails.""" + store = ev.WORK / f"why-bugs-{repo['name']}.json" + have = json.loads(store.read_text()) if store.exists() else {} + key = f"{repo['commit'][:12]}:{seed}" + bugs = have.get(key, []) + syms = ev.symbols(root) + k = len(bugs) + tries = 0 + while len(bugs) < n and tries < n * 3: + tries += 1 + b = agent.seed_bug(repo, root, syms, random.Random(seed * 1000 + k)) + k += 1 + if b and not any(x["target"] == b["target"] for x in bugs): + bugs.append({"target": b["target"], "patch": b["patch"], "tests": b["failing"]}) + have[key] = bugs + store.write_text(json.dumps(have, ensure_ascii=False, indent=1)) + print(f" bug {len(bugs)}: {b['target']} ({len(b['failing'])} failing tests)", flush=True) + # a test that fails on the untouched code as well (a permission test run as root) explains nothing + L = ev.LANG[repo["lang"]] + before = set(L["failed"](ev.sh(L["tests"], root, timeout=1800)[1], root)) + kept = [{**b, "tests": [t for t in b["tests"] if t not in before]} for b in bugs[:n]] + return [b for b in kept if b["tests"]] + + +def rank(root: Path, bug: dict, variant: str) -> dict: + """The place of the changed function in the list for the first failing test `why` can find.""" + env = {"GITNEXT_WHY_RANK": variant} if variant else {} + import os + for test in bug["tests"][:3]: + name = test.split("::")[-1].split("[")[0].split("/")[0] + p = subprocess.run([ev.GITNEXT, "why", name, "--json"], cwd=root, capture_output=True, text=True, env={**os.environ, **env}, timeout=900) + try: + d = json.loads(p.stdout) + except ValueError: + continue + if not d.get("failed"): + continue + names = [s["symbol"] for s in d["suspects"]] + place = names.index(bug["target"]) + 1 if bug["target"] in names else None + return {"test": name, "place": place, "listed": len(names), "named": bool(place and d["suspects"][place - 1]["named"]), "learned": bool(d.get("learned"))} + return {"test": None, "place": None, "listed": 0, "named": False, "learned": False} + + +def main() -> None: + ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + ap.add_argument("--repos", default="click,sqlparse,semver,cobra") + ap.add_argument("--bugs", type=int, default=12) + ap.add_argument("--seed", type=int, default=1) + ap.add_argument("--variants", default="", help="comma-separated GITNEXT_WHY_RANK values; empty = the default order only") + ap.add_argument("--learn", action="store_true", help="learn the coverage map on the clean code before the bugs are put in") + ap.add_argument("--out", default=str(HERE / "results" / "why-rank.json")) + a = ap.parse_args() + variants = a.variants.split(",") if a.variants else [""] + repos = [r for r in json.loads((HERE / "repos.json").read_text()) if r["name"] in a.repos.split(",")] + rows = [] + t0 = time.time() + for repo in repos: + print(f"== {repo['name']} ({repo['lang']})", flush=True) + root = ev.prepare(repo) + base = ev.sh("git rev-parse HEAD", root)[1].strip() + clean = lambda: (ev.sh(f"git reset -q --hard {base}", root), ev.restore(root)) # noqa: E731 + clean() + ev.gx(["index"], root, timeout=1800) + bugs = bugs_of(repo, root, a.bugs, a.seed) + clean() + (root / ".gitnext" / "tests.db").unlink(missing_ok=True) + if a.learn: + ev.gx(["index"], root) + print(" " + (ev.gx(["learn-tests"], root, timeout=3600)[1].strip().splitlines() or ["learn-tests: no output"])[0], flush=True) + for b in bugs: + clean() + subprocess.run(["git", "apply"], input=b["patch"], text=True, cwd=root) + ev.sh("git -c user.name=eval -c user.email=eval@example.invalid -c commit.gpgsign=false commit -qam 'seeded bug'", root) + ev.gx(["index"], root) + for v in variants: + r = rank(root, b, v) + rows.append({"repo": repo["name"], "lang": repo["lang"], "target": b["target"], "variant": v or "default", **r}) + clean() + (root / ".gitnext" / "tests.db").unlink(missing_ok=True) + ev.gx(["index"], root) + Path(a.out).write_text(json.dumps(rows, ensure_ascii=False, indent=1)) + md = ["| order | repo | bugs | first | in 3 | in 8 | in the list | empty list | named in the failure | from the learned map |", "|---|---|---:|---:|---:|---:|---:|---:|---:|---:|"] + for v in [x or "default" for x in variants]: + for name in [r["name"] for r in repos] + ["all"]: + rs = [r for r in rows if r["variant"] == v and (name == "all" or r["repo"] == name)] + if not rs: + continue + n = len(rs) + top = lambda k: sum(1 for r in rs if r["place"] and r["place"] <= k) # noqa: E731 + md.append(f"| {v} | {name} | {n} | {top(1)} ({100 * top(1) // n}%) | {top(3)} ({100 * top(3) // n}%) | {top(8)} ({100 * top(8) // n}%) | {top(10**9)} | {sum(1 for r in rs if r['listed'] == 0)} | {sum(1 for r in rs if r['named'])} | {sum(1 for r in rs if r['learned'])} |") + Path(a.out).with_suffix(".md").write_text("\n".join(md) + f"\n\n{len(rows)} answers in {round(time.time() - t0)} s.\n") + print("\n".join(md)) + + +if __name__ == "__main__": + main() diff --git a/packaging/README.md b/packaging/README.md new file mode 100644 index 0000000..07462a1 --- /dev/null +++ b/packaging/README.md @@ -0,0 +1,54 @@ +# Packaging gitnext + +Everything here downloads the binaries that `.github/workflows/release.yml` +attaches to a GitHub release (`gitnext-.tar.gz` + `.sha256` for +`aarch64-apple-darwin`, `x86_64-apple-darwin`, `aarch64-unknown-linux-gnu`, +`x86_64-unknown-linux-gnu`). Release first, then publish. + +## Homebrew — `brew install pnnnx/tap/gitnext` + +One time: create the tap repository. + +```sh +gh repo create pnnnx/homebrew-tap --public --description "Homebrew formulae" +git clone https://github.com/pnnnx/homebrew-tap ~/Developer/homebrew-tap +mkdir -p ~/Developer/homebrew-tap/Formula +``` + +For each release (after the release workflow has finished and the assets are up): + +```sh +cd ~/Developer/gitnext +sh packaging/homebrew/update.sh v0.3.0 > ~/Developer/homebrew-tap/Formula/gitnext.rb +cd ~/Developer/homebrew-tap +git add Formula/gitnext.rb && git commit -m "gitnext 0.3.0" && git push +brew install pnnnx/tap/gitnext && gitnext --version # check +``` + +`update.sh` reads the real sha256 sums from the release; it refuses to write a +formula while any asset is missing. + +## npm — `npx -y gitnext setup` + +`packaging/npm` is a 3-file package: on install (or on first run, if install +scripts are disabled) it downloads the binary for the machine from the release +of the same version, checks the sha256 and runs it. + +For each release: + +```sh +cd ~/Developer/gitnext/packaging/npm +npm version 0.3.0 --no-git-tag-version # must match the release tag (v0.3.0) +npm login # once +npm publish +npx -y gitnext --version # check +``` + +Mirrors or tests: `GITNEXT_DOWNLOAD_BASE=`; +another fork: `GITNEXT_REPO=owner/name`; another release: `GITNEXT_VERSION=v0.3.1`. + +## Other ways (see the plan document) + +- `curl … | sh` — `scripts/install.sh` (already works with the release). +- Claude Desktop one-click: a `.mcpb` bundle with the binary — not done yet. +- `pip` / `uvx` (maturin wheel with the binary) — not done yet. diff --git a/packaging/homebrew/gitnext.rb b/packaging/homebrew/gitnext.rb new file mode 100644 index 0000000..12db2f3 --- /dev/null +++ b/packaging/homebrew/gitnext.rb @@ -0,0 +1,43 @@ +# Homebrew formula for gitnext — lives in the tap repository pnnnx/homebrew-tap +# as Formula/gitnext.rb. Users install with: brew install pnnnx/tap/gitnext +# +# The binaries come from the GitHub release of the same version (built by +# .github/workflows/release.yml). Do not edit the sha256 lines by hand: +# sh packaging/homebrew/update.sh v0.2.0 > Formula/gitnext.rb +# fills them from the release's *.sha256 files. +class Gitnext < Formula + desc "git that understands code: code map, symbol graph and plain-language git for AI agents and people" + homepage "https://github.com/pnnnx/gitnext" + version "0.2.0" + license "MIT" + + on_macos do + on_arm do + url "https://github.com/pnnnx/gitnext/releases/download/v0.2.0/gitnext-aarch64-apple-darwin.tar.gz" + sha256 "SHA256_AARCH64_APPLE_DARWIN" + end + on_intel do + url "https://github.com/pnnnx/gitnext/releases/download/v0.2.0/gitnext-x86_64-apple-darwin.tar.gz" + sha256 "SHA256_X86_64_APPLE_DARWIN" + end + end + + on_linux do + on_arm do + url "https://github.com/pnnnx/gitnext/releases/download/v0.2.0/gitnext-aarch64-unknown-linux-gnu.tar.gz" + sha256 "SHA256_AARCH64_UNKNOWN_LINUX_GNU" + end + on_intel do + url "https://github.com/pnnnx/gitnext/releases/download/v0.2.0/gitnext-x86_64-unknown-linux-gnu.tar.gz" + sha256 "SHA256_X86_64_UNKNOWN_LINUX_GNU" + end + end + + def install + bin.install "gitnext" + end + + test do + assert_match "gitnext", shell_output("#{bin}/gitnext --version") + end +end diff --git a/packaging/homebrew/update.sh b/packaging/homebrew/update.sh new file mode 100644 index 0000000..3305a81 --- /dev/null +++ b/packaging/homebrew/update.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# Print the Homebrew formula for a released version, with real sha256 sums: +# sh packaging/homebrew/update.sh v0.3.0 > ../homebrew-tap/Formula/gitnext.rb +set -e +TAG=${1:?usage: update.sh vX.Y.Z} +REPO=${GITNEXT_REPO:-pnnnx/gitnext} +HERE=$(cd "$(dirname "$0")" && pwd) +sed_args="" +for t in aarch64-apple-darwin x86_64-apple-darwin aarch64-unknown-linux-gnu x86_64-unknown-linux-gnu; do + sum=$(curl -fsSL "https://github.com/$REPO/releases/download/$TAG/gitnext-$t.tar.gz.sha256" | awk '{print $1}') + [ ${#sum} -eq 64 ] || { echo "no sha256 for $t in release $TAG — has the release workflow finished?" >&2; exit 1; } + key=$(echo "SHA256_$t" | tr 'a-z-' 'A-Z_') + sed_args="$sed_args -e s/$key/$sum/" +done +sed $sed_args -e "s/v0\.2\.0/$TAG/g" -e "s/version \"0\.2\.0\"/version \"${TAG#v}\"/" -e "s#pnnnx/gitnext#$REPO#g" "$HERE/gitnext.rb" diff --git a/packaging/npm/.gitignore b/packaging/npm/.gitignore new file mode 100644 index 0000000..d0b6126 --- /dev/null +++ b/packaging/npm/.gitignore @@ -0,0 +1,3 @@ +vendor/ +node_modules/ +*.tgz diff --git a/packaging/npm/README.md b/packaging/npm/README.md new file mode 100644 index 0000000..d22b5c3 --- /dev/null +++ b/packaging/npm/README.md @@ -0,0 +1,13 @@ +# gitnext (npm) + +`gitnext` — git that understands code: a code map and symbol graph for AI agents, +plain-language git for people. This package downloads the prebuilt binary for +your machine (macOS / Linux, x64 / arm64) from the matching GitHub release. + +```sh +npx -y gitnext init # index the repo, write the code map +npx -y gitnext setup # connect Claude Code / Cursor / Codex +npm i -g gitnext # or install the command +``` + +Project and docs: https://github.com/pnnnx/gitnext diff --git a/packaging/npm/bin/gitnext.js b/packaging/npm/bin/gitnext.js new file mode 100755 index 0000000..93f1f41 --- /dev/null +++ b/packaging/npm/bin/gitnext.js @@ -0,0 +1,20 @@ +#!/usr/bin/env node +// `npx gitnext …` / the `gitnext` command from npm: runs the native binary, +// downloading it first if the install step was skipped. +"use strict"; +const { spawnSync } = require("child_process"); +const { install } = require("../install.js"); + +install() + .then((bin) => { + const r = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" }); + if (r.error) { + process.stderr.write(`gitnext: ${r.error.message}\n`); + process.exit(1); + } + process.exit(r.status === null ? 1 : r.status); + }) + .catch((e) => { + process.stderr.write(`${e.message}\n`); + process.exit(1); + }); diff --git a/packaging/npm/install.js b/packaging/npm/install.js new file mode 100755 index 0000000..6f4ed3c --- /dev/null +++ b/packaging/npm/install.js @@ -0,0 +1,91 @@ +#!/usr/bin/env node +// Downloads the gitnext binary for this machine from the GitHub release that +// matches this package's version, checks its sha256 and puts it in vendor/. +// Runs on postinstall, and again from bin/gitnext.js if postinstall was skipped +// (npm --ignore-scripts). Overrides: GITNEXT_VERSION=v0.2.0, GITNEXT_REPO=owner/name, +// GITNEXT_DOWNLOAD_BASE= (mirrors, tests). +"use strict"; +const fs = require("fs"); +const path = require("path"); +const crypto = require("crypto"); +const { execFileSync } = require("child_process"); + +const TARGETS = { + "darwin-arm64": "aarch64-apple-darwin", + "darwin-x64": "x86_64-apple-darwin", + "linux-arm64": "aarch64-unknown-linux-gnu", + "linux-x64": "x86_64-unknown-linux-gnu", +}; +const VENDOR = path.join(__dirname, "vendor"); +const BIN = path.join(VENDOR, "gitnext"); + +function fail(msg) { + const err = new Error(msg); + err.gitnext = true; + throw err; +} + +function get(url, redirects = 5) { + const lib = url.startsWith("https:") ? require("https") : require("http"); + return new Promise((resolve, reject) => { + lib + .get(url, { headers: { "User-Agent": "gitnext-npm" } }, (res) => { + if ([301, 302, 303, 307, 308].includes(res.statusCode) && res.headers.location && redirects > 0) { + res.resume(); + return resolve(get(new URL(res.headers.location, url).toString(), redirects - 1)); + } + if (res.statusCode !== 200) { + res.resume(); + return reject(new Error(`HTTP ${res.statusCode} for ${url}`)); + } + const chunks = []; + res.on("data", (c) => chunks.push(c)); + res.on("end", () => resolve(Buffer.concat(chunks))); + }) + .on("error", reject); + }); +} + +async function install({ quiet = false } = {}) { + if (fs.existsSync(BIN)) return BIN; + const key = `${process.platform}-${process.arch}`; + const target = TARGETS[key]; + if (!target) { + fail(`gitnext has no prebuilt binary for ${key}. Build it from source: cargo install --git https://github.com/pnnnx/gitnext gitnext-cli`); + } + const version = process.env.GITNEXT_VERSION || `v${require("./package.json").version}`; + const repo = process.env.GITNEXT_REPO || "pnnnx/gitnext"; + const base = process.env.GITNEXT_DOWNLOAD_BASE || `https://github.com/${repo}/releases/download/${version}`; + const name = `gitnext-${target}.tar.gz`; + if (!quiet) process.stderr.write(`gitnext: downloading ${name} (${version})…\n`); + let tarball, sums; + try { + [tarball, sums] = await Promise.all([get(`${base}/${name}`), get(`${base}/${name}.sha256`)]); + } catch (e) { + fail(`gitnext: could not download ${base}/${name}: ${e.message}`); + } + const want = sums.toString().trim().split(/\s+/)[0]; + const got = crypto.createHash("sha256").update(tarball).digest("hex"); + if (want !== got) fail(`gitnext: checksum mismatch for ${name} (expected ${want}, got ${got})`); + fs.mkdirSync(VENDOR, { recursive: true }); + const tmp = path.join(VENDOR, name); + fs.writeFileSync(tmp, tarball); + try { + execFileSync("tar", ["-xzf", tmp, "-C", VENDOR]); + } finally { + fs.rmSync(tmp, { force: true }); + } + if (!fs.existsSync(BIN)) fail(`gitnext: ${name} did not contain a gitnext binary`); + fs.chmodSync(BIN, 0o755); + if (!quiet) process.stderr.write(`gitnext: installed ${BIN}\n`); + return BIN; +} + +module.exports = { install, BIN }; + +if (require.main === module) { + install({ quiet: process.argv.includes("--quiet") }).catch((e) => { + process.stderr.write(`${e.message}\n`); + process.exit(1); + }); +} diff --git a/packaging/npm/package.json b/packaging/npm/package.json new file mode 100644 index 0000000..7dd5e99 --- /dev/null +++ b/packaging/npm/package.json @@ -0,0 +1,15 @@ +{ + "name": "gitnext", + "version": "0.3.0", + "description": "git that understands code: code map, symbol graph and plain-language git for AI agents and people", + "license": "MIT", + "homepage": "https://github.com/pnnnx/gitnext", + "repository": { "type": "git", "url": "git+https://github.com/pnnnx/gitnext.git" }, + "keywords": ["git", "mcp", "ai-agents", "code-graph", "tree-sitter", "claude", "cursor", "codex"], + "bin": { "gitnext": "bin/gitnext.js" }, + "scripts": { "postinstall": "node install.js --quiet || true" }, + "files": ["bin/", "install.js", "README.md"], + "os": ["darwin", "linux"], + "cpu": ["x64", "arm64"], + "engines": { "node": ">=18" } +}