// Source: https://github.com/vortex-data/vortex/blob/4c1ae92d20856fbea29ed92d8554a3832b5a540c/vortex-buffer/src/bit/mod.rs
// License: Apache-2.0
// Note: minimal extract of one top-level `pub fn get_bit` item from vortex-data/vortex@4c1ae92d20856fbea29ed92d8554a3832b5a540c vortex-buffer/src/bit/mod.rs (v0.70.0 release tag, Apache-2.0). `pub fn get_bit(buf: &[u8], index: usize) -> bool` at upstream line 33 (corpus line 11 after the 3-line provenance header + 1 blank-line offset) carries a `///` doc block whose `# Panics` section reads `Panics if index is not between 0 and length of buf * 8.` After `docs/spec/comment-code-v0.md` F2 rendering (each `///` line's prefix stripped, lines joined with newline, result case-folded) the doc text contains the substring `panic` (within both `# panics` and `panics if`), which is spec F4's Pattern B trigger; the body `buf[index / 8] & (1 << (index % 8)) != 0` contains NONE of the Pattern B body markers (panic-bang, unwrap, expect-paren, unreachable-bang, assert-bang, assert-eq-bang, assert-ne-bang, todo-bang, unimplemented-bang, debug-assert), so spec F4's body-marker negation passes and Pattern B fires. The function body DOES panic on the documented out-of-bounds condition (slice bracket indexing on `&[u8]` panics when `index / 8 >= buf.len()`, equivalent to `index >= buf.len() * 8` modulo the upstream `buf * 8` typo for `buf.len() * 8`), but the panic is implicit in the `core::ops::Index` impl for `[T]` rather than expressed via any of cntrdct's syntactic body-marker substrings, so cntrdct's spec F4 fires on syntactic substring rule rather than semantic correctness. The textbook Tan SOSP 2007 §3.2 Pattern B ("bad comment": panic claim without panicking constructs in the body) bug shape, the same one cntrdct's batch-14 `zarrs/zarrs@3b944c57` `round_bytes_*` family flags and batch-16 `Amanieu/parking_lot@d7828fff` `unpark_one` / `unpark_requeue` pair flag on the panic-mismatch direction. This is the THIRD Pattern B upstream in the audit corpus, introducing the implicit-indexing-panic sub-shape (body uses bracket indexing that panics on OOB through the slice `Index` impl, without any of cntrdct's body-marker substrings) alongside batch 14's zarrs silent-drop-on-mismatch sub-shape (body uses `as_chunks_mut().0` which silently drops the trailing remainder rather than panicking on non-multiple-of-N lengths — the documented panic never fires) and batch 16's parking_lot_core callback-contract sub-shape (doc says "must not panic" as a contract on the supplied callback, the function body itself has no panic-producing constructs). All three are syntactic Pattern B hits — the body lacks the marker substrings — regardless of whether the implementation panics correctly on the documented condition (vortex via slice indexing), absorbs the documented condition without panicking (zarrs via as_chunks_mut drop), or expresses a callback contract rather than an implementation claim (parking_lot_core). The function signature `pub fn get_bit(buf: &[u8], index: usize) -> bool` has primitive `bool` return so spec F3's return-type negation passes, but the doc contains NONE of the six Pattern A trigger phrases (returns-err / returns-result / may-fail / fallible / returns-option / may-return-none), so Pattern A does NOT fire on this function. The doc contains no `deprecated` substring, so spec F5 Pattern C does NOT fire — only Pattern B fires on this function. The `#[inline(always)]` attribute sits between the doc block and the `pub fn get_bit` item; cntrdct's `collect_preceding_doc` walker skips `attribute_item` nodes per the attribute_item passthrough confirmed by batch 13's `rust-lang/pkg-config-rs` `find_library` entry (the walker continues past `attribute_item` to gather all `///` doc lines), so all four doc lines are rendered into the case-folded doc text the Pattern B trigger checks. SHA-256 is of the audit-corpus file as committed (minimal extract, per `benchmarks/audit-corpus/README.md` `Per-detector seed targets` item 4).

/// Get the bit value at `index` out of `buf`.
///
/// # Panics
///
/// Panics if `index` is not between 0 and length of `buf * 8`.
#[inline(always)]
pub fn get_bit(buf: &[u8], index: usize) -> bool {
    buf[index / 8] & (1 << (index % 8)) != 0
}
