AI Slop Code RIsk Monitor

castorini/pyserini

Pyserini is a Python toolkit for reproducible information retrieval research with sparse and dense representations.

10.1 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for castorini/pyserini, a Python project with 2,170 GitHub stars. SynthScan examined 133,646 lines of code across 687 source files, recording 1049 pattern matches distributed across 18 syntactic categories. The legacy adjusted pattern signal is 10.1 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

10.1
Adjusted Signal
10.1
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
2.2K
Stars
Python
Language
133.6K
Lines of Code
687
Files
1.0K
Pattern Hits
2026-10-12
Scan Date
0.08
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 27.4/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 803 finding(s).

Hallucinated Dependency & Supply Chain Risk 4.7/100 · LOW

Are imports declared and package/API names verified? 128 finding(s).

Agent Over-Engineering Ratio 25.4/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 510 finding(s).

PR Review Velocity Impact 39.9/100 · MEDIUM

Which changes need focused human review? 1049 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 53MEDIUM 24LOW 972

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1049 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers383 hits · 406 pts
SeverityFileLineSnippetContext
LOWpyserini/_jvm.py55def is_jvm_already_running_error(exception):CODE
LOWpyserini/_jvm.py65def suppress_jvm_startup_stderr():CODE
LOWpyserini/util.py109def _archive_name_to_dir_name(archive_name):CODE
LOWpyserini/util.py208def compare_trec_strings_with_tolerance(trec_strings1, trec_strings2, tolerance=1e-4):CODE
LOWpyserini/util.py246def compare_trec_files_with_tolerance(file1_path, file2_path, tolerance=1e-4):CODE
LOWpyserini/util.py346def _rewrite_mbeir_instruction_config(instruction_config_path, instructions_dir):CODE
LOWpyserini/util.py373def get_mbeir_instruction_config(instr_file=None):CODE
LOWpyserini/util.py405def download_and_unpack_archive(url, output_dir='indexes', local_filename=False, md5=None,CODE
LOWpyserini/prebuilt_index_info.py29def _import_from_lucene_prebuilt_inverted_index_json(index_metadata):CODE
LOWpyserini/2cr/m_beir.py55def print_results_by_metric_position(table, position, metric_name):CODE
LOWpyserini/2cr/_base.py39def compare_reproduction_score(observed: float, expected: float) -> ReproductionStatus:CODE
LOWpyserini/2cr/_base.py60def format_reproduction_status(status: ReproductionStatus, expected: float, *, precision: int = 4) -> str:CODE
LOWpyserini/2cr/_base.py103def run_eval_and_return_metric(metric, eval_key, defs, runfile, display_command=False):CODE
LOWpyserini/2cr/_base.py120def run_dpr_retrieval_eval_and_return_metric(defs, json_file):CODE
LOWpyserini/2cr/_base.py141def convert_trec_run_to_dpr_retrieval_json(topics,index,runfile,output):CODE
LOWpyserini/2cr/miracl.py206def extract_topic_fn_from_cmd(cmd):CODE
LOWpyserini/2cr/ciral.py144def extract_topic_fn_from_cmd(cmd):CODE
LOWpyserini/2cr/mmeb.py67def print_results_by_metric_position(table, position, metric_name):CODE
LOWpyserini/2cr/odqa.py84def format_hybrid_search_command(raw):CODE
LOWpyserini/encode/_dpr.py90 def _normalize_legacy_wordpiece(text):CODE
LOWpyserini/encode/_dse.py57def patch_processor_for_batching(processor):CODE
LOWpyserini/encode/_dse.py64 def patched_convert_images_texts_to_inputs(self, images, texts, padding=False, truncation=None, max_length=None, retCODE
LOWpyserini/encode/_unicoil.py196 def _get_encoded_query_token_wight_dicts(self, tok_weights):CODE
LOWpyserini/encode/_slim.py89 def _get_encoded_query_token_wight_dicts(self, tok_weights):CODE
LOWpyserini/encode/_splade.py28def _from_pretrained_without_safetensors_conversion(model_name_or_path):CODE
LOWpyserini/encode/_splade.py53 def _get_encoded_query_token_wight_dicts(self, tok_weights):CODE
LOWpyserini/encode/optional/_uniir.py24def _ensure_transformers_additional_special_token_ids():CODE
LOWpyserini/encode/optional/_uniir.py40def _ensure_transformers_tied_weights_keys():CODE
LOWpyserini/encode/optional/_uniir.py80def _ensure_transformers_compatibility():CODE
LOWpyserini/server/document_format.py75def truncate_document_payload(CODE
LOWpyserini/server/backend.py254 def _params_require_searcher_rebuild(CODE
LOWpyserini/server/backend.py412 def _doc_store_lucene_searcher(self, start_index_name: str, *, allow_local_index: bool) -> LuceneSearcher:CODE
LOWpyserini/server/backend.py427 def _bulk_fetch_and_format_documents(CODE
LOWpyserini/server/backend.py467 def _resolve_mbeir_instruction_config(self, index_name: str) -> str | None:CODE
LOWpyserini/server/config.py237def load_token_issuance_config(config_path: str | None) -> TokenIssuanceConfig | None:CODE
LOWpyserini/server/rest/app.py187 def _sync_counts_from_hits_if_needed(self) -> None:CODE
LOWpyserini/server/rest/app.py329def _compute_token_fingerprint(token: str | None) -> str:CODE
LOWpyserini/server/rest/app.py373def _build_uvicorn_log_config(CODE
LOWpyserini/server/rest/app.py498 async def rest_api_key_and_access_log(request: Request, call_next):CODE
LOWpyserini/server/rest/app.py578 async def unhandled_exception_handler(request: Request, exc: Exception):CODE
LOWpyserini/server/rest/app.py583 async def starlette_http_exception_handler(request: Request, exc: StarletteHTTPException):CODE
LOWpyserini/server/rest/app.py595 async def validation_exception_handler(request: Request, exc: RequestValidationError):CODE
LOWpyserini/server/rest/routes/v1.py67def _parse_optional_positive_int(raw: str | None, name: str) -> tuple[int | None, JSONResponse | None]:CODE
LOWpyserini/search/lucene/_impact_searcher.py49def _reader_has_stored_raw_field(reader) -> bool:CODE
LOWpyserini/search/lucene/_impact_searcher.py373 def _init_query_encoder_from_str(query_encoder):CODE
LOWpyserini/search/lucene/querybuilder.py47def get_boolean_query_builder():CODE
LOWpyserini/search/faiss/_searcher.py141 def _normalize_to_unit_interval(self, distances: np.ndarray) -> np.ndarray:CODE
LOWpyserini/search/faiss/_searcher.py509 def _read_legacy_binary_idmap_index(index_path: str):CODE
LOWpyserini/index/lucene/_base.py509 def compute_query_document_score(self, docid: str, query: str, similarity=None):CODE
LOWpyserini/index/lucene/_base.py515 def convert_internal_docid_to_collection_docid(self, docid: int) -> str:CODE
LOWpyserini/index/lucene/_base.py530 def convert_collection_docid_to_internal_docid(self, docid: str) -> int:CODE
LOWpyserini/eval/msmarco_doc_eval_raw.py31def load_reference_from_stream(f):CODE
LOWpyserini/eval/msmarco_doc_eval_raw.py61def validate_candidate_has_enough_ranking(qid_to_ranked_candidate_documents):CODE
LOWpyserini/eval/msmarco_doc_eval_raw.py67def load_candidate_from_stream(f):CODE
LOWpyserini/eval/msmarco_doc_eval_raw.py167def compute_metrics_from_files(path_to_reference, path_to_candidate, exclude_qids, perform_checks=True):CODE
LOWpyserini/eval/msmarco_passage_eval_raw.py18def load_reference_from_stream(f):CODE
LOWpyserini/eval/msmarco_passage_eval_raw.py46def load_candidate_from_stream(f):CODE
LOWpyserini/eval/msmarco_passage_eval_raw.py140def compute_metrics_from_files(path_to_reference, path_to_candidate, perform_checks=True):CODE
LOWtests/core/test_hybrid_search.py44 def test_hybrid_searcher_batch(self):CODE
LOW⚡tests/core/test_fusion.py240 def test_reciprocal_rank_fusion_simple(self):CODE
323 more matches not shown…
Over-Commented Block283 hits · 281 pts
SeverityFileLineSnippetContext
LOWpyserini/_jvm.py1#COMMENT
LOWpyserini/encoded_corpus_info.py1#COMMENT
LOWpyserini/util.py1#COMMENT
LOWpyserini/output_writer.py1#COMMENT
LOWpyserini/external_query_info.py1#COMMENT
LOWpyserini/prebuilt_index_info.py1#COMMENT
LOWpyserini/query_iterator.py1#COMMENT
LOWpyserini/tokenize_json_collection.py1#COMMENT
LOWpyserini/encoded_query_info.py1#COMMENT
LOWpyserini/query_iterator_order_info.py1#COMMENT
LOWpyserini/pyclass.py1#COMMENT
LOWpyserini/multithreading.py1#COMMENT
LOWpyserini/fusion/_base.py1#COMMENT
LOWpyserini/fusion/__init__.py1#COMMENT
LOWpyserini/fusion/__main__.py1#COMMENT
LOWpyserini/demo/miracl.py1#COMMENT
LOWpyserini/demo/acl.py1#COMMENT
LOWpyserini/demo/dpr.py1#COMMENT
LOWpyserini/demo/atomic.py1#COMMENT
LOWpyserini/demo/msmarco.py1#COMMENT
LOWpyserini/2cr/m_beir.py1#COMMENT
LOWpyserini/2cr/_base.py1#COMMENT
LOWpyserini/2cr/miracl.py1#COMMENT
LOWpyserini/2cr/ciral.py1#COMMENT
LOWpyserini/2cr/__init__.py1#COMMENT
LOWpyserini/2cr/mmeb.py1#COMMENT
LOWpyserini/2cr/dse.py1#COMMENT
LOWpyserini/2cr/atomic.py1#COMMENT
LOWpyserini/2cr/bright.py1#COMMENT
LOWpyserini/2cr/msmarco.py1#COMMENT
LOWpyserini/2cr/beir.py1#COMMENT
LOWpyserini/2cr/mrtydi.py1#COMMENT
LOWpyserini/2cr/odqa.py1#COMMENT
LOWpyserini/collection/_base.py1#COMMENT
LOWpyserini/collection/_collection_support.py1#COMMENT
LOWpyserini/collection/__init__.py1#COMMENT
LOWpyserini/analysis/_base.py1#COMMENT
LOWpyserini/analysis/__init__.py1#COMMENT
LOWpyserini/vectorizer/_base.py1#COMMENT
LOWpyserini/vectorizer/__init__.py1#COMMENT
LOWpyserini/trectools/_base.py1#COMMENT
LOWpyserini/trectools/__init__.py1#COMMENT
LOWpyserini/encode/_dpr.py1#COMMENT
LOWpyserini/encode/_dkrr.py1#COMMENT
LOWpyserini/encode/_base.py1#COMMENT
LOWpyserini/encode/_auto.py1#COMMENT
LOWpyserini/encode/query.py1#COMMENT
LOWpyserini/encode/_clip.py1#COMMENT
LOWpyserini/encode/_aggretriever.py1#COMMENT
LOWpyserini/encode/_bpr.py1#COMMENT
LOWpyserini/encode/__init__.py1#COMMENT
LOWpyserini/encode/_openai.py1#COMMENT
LOWpyserini/encode/_tct_colbert.py1#COMMENT
LOWpyserini/encode/_cosdpr.py1#COMMENT
LOWpyserini/encode/_dse.py1#COMMENT
LOWpyserini/encode/_unicoil.py1#COMMENT
LOWpyserini/encode/_cached_data.py1#COMMENT
LOWpyserini/encode/_ance.py1#COMMENT
LOWpyserini/encode/merge_faiss_index.py1#COMMENT
LOWpyserini/encode/_slim.py1#COMMENT
223 more matches not shown…
Cross-File Repetition47 hits · 235 pts
SeverityFileLineSnippetContext
HIGHpyserini/demo/miracl.py0this script provides an interactive web interface demo for retrieval on the atomic dataset. it requires `flask` (`pip inSTRING
HIGHpyserini/demo/acl.py0this script provides an interactive web interface demo for retrieval on the atomic dataset. it requires `flask` (`pip inSTRING
HIGHpyserini/demo/atomic.py0this script provides an interactive web interface demo for retrieval on the atomic dataset. it requires `flask` (`pip inSTRING
HIGHpyserini/search/lucene/_impact_searcher.py0display information about available prebuilt indexes.STRING
HIGHpyserini/search/lucene/_searcher.py0display information about available prebuilt indexes.STRING
HIGHpyserini/search/faiss/_searcher.py0display information about available prebuilt indexes.STRING
HIGHpyserini/index/lucene/_base.py0display information about available prebuilt indexes.STRING
HIGHpyserini/search/lucene/_searcher.py0wrapper class for ``indexreaderutils`` in anserini. parameters ---------- index_dir : str path to lucene index directorySTRING
HIGHpyserini/search/lucene/_hnsw_searcher.py0wrapper class for ``indexreaderutils`` in anserini. parameters ---------- index_dir : str path to lucene index directorySTRING
HIGHpyserini/search/lucene/_geo_searcher.py0wrapper class for ``indexreaderutils`` in anserini. parameters ---------- index_dir : str path to lucene index directorySTRING
HIGHpyserini/index/lucene/_base.py0wrapper class for ``indexreaderutils`` in anserini. parameters ---------- index_dir : str path to lucene index directorySTRING
HIGHpyserini/eval/evaluate_qa_overlap_retrieval.py0returns the original text (with whitespace reinserted).STRING
HIGHpyserini/eval/evaluate_dpr_retrieval.py0returns the original text (with whitespace reinserted).STRING
HIGHscripts/dse/evaluate_wiki_ss_run.py0returns the original text (with whitespace reinserted).STRING
HIGHpyserini/eval/evaluate_qa_overlap_retrieval.py0returns a list of the text of each token args: uncased: lower cases textSTRING
HIGHpyserini/eval/evaluate_dpr_retrieval.py0returns a list of the text of each token args: uncased: lower cases textSTRING
HIGHscripts/dse/evaluate_wiki_ss_run.py0returns a list of the text of each token args: uncased: lower cases textSTRING
HIGHpyserini/eval/evaluate_qa_overlap_retrieval.py0returns a list of [start, end) character offsets of each token.STRING
HIGHpyserini/eval/evaluate_dpr_retrieval.py0returns a list of [start, end) character offsets of each token.STRING
HIGHscripts/dse/evaluate_wiki_ss_run.py0returns a list of [start, end) character offsets of each token.STRING
HIGHpyserini/eval/evaluate_qa_overlap_retrieval.py0returns a list of named-entity-recognition tags of each token. returns none if this annotation was not included.STRING
HIGHpyserini/eval/evaluate_dpr_retrieval.py0returns a list of named-entity-recognition tags of each token. returns none if this annotation was not included.STRING
HIGHscripts/dse/evaluate_wiki_ss_run.py0returns a list of named-entity-recognition tags of each token. returns none if this annotation was not included.STRING
HIGHpyserini/eval/evaluate_qa_overlap_retrieval.py0returns a list of the lemmatized text of each token. returns none if this annotation was not included.STRING
HIGHpyserini/eval/evaluate_dpr_retrieval.py0returns a list of the lemmatized text of each token. returns none if this annotation was not included.STRING
HIGHscripts/dse/evaluate_wiki_ss_run.py0returns a list of the lemmatized text of each token. returns none if this annotation was not included.STRING
HIGHpyserini/eval/evaluate_qa_overlap_retrieval.py0returns a list of all ngrams from length 1 to n. args: n: upper limit of ngram length uncased: lower cases text filter_fSTRING
HIGHpyserini/eval/evaluate_dpr_retrieval.py0returns a list of all ngrams from length 1 to n. args: n: upper limit of ngram length uncased: lower cases text filter_fSTRING
HIGHscripts/dse/evaluate_wiki_ss_run.py0returns a list of all ngrams from length 1 to n. args: n: upper limit of ngram length uncased: lower cases text filter_fSTRING
HIGHpyserini/eval/evaluate_qa_overlap_retrieval.py0group consecutive entity tokens with the same ner tag.STRING
HIGHpyserini/eval/evaluate_dpr_retrieval.py0group consecutive entity tokens with the same ner tag.STRING
HIGHscripts/dse/evaluate_wiki_ss_run.py0group consecutive entity tokens with the same ner tag.STRING
HIGHpyserini/eval/evaluate_qa_overlap_retrieval.py0base tokenizer class. tokenizers implement tokenize, which should return a tokens class.STRING
HIGHpyserini/eval/evaluate_dpr_retrieval.py0base tokenizer class. tokenizers implement tokenize, which should return a tokens class.STRING
HIGHscripts/dse/evaluate_wiki_ss_run.py0base tokenizer class. tokenizers implement tokenize, which should return a tokens class.STRING
HIGHpyserini/eval/evaluate_qa_overlap_retrieval.py0args: annotators: none or empty set (only tokenizes).STRING
HIGHpyserini/eval/evaluate_dpr_retrieval.py0args: annotators: none or empty set (only tokenizes).STRING
HIGHscripts/dse/evaluate_wiki_ss_run.py0args: annotators: none or empty set (only tokenizes).STRING
HIGHpyserini/eval/evaluate_qa_overlap_retrieval.py0test if a regex pattern is contained within a text.STRING
HIGHpyserini/eval/evaluate_dpr_retrieval.py0test if a regex pattern is contained within a text.STRING
HIGHscripts/dse/evaluate_wiki_ss_run.py0test if a regex pattern is contained within a text.STRING
HIGHscripts/tokenize_corpus.py0replace original contents fields with bert tokenizationSTRING
HIGHscripts/beir/tokenize_queries.py0replace original contents fields with bert tokenizationSTRING
HIGHscripts/beir/tokenize_corpus.py0replace original contents fields with bert tokenizationSTRING
HIGHscripts/beir/tokenize_queries.py0obtain a space separated re-tokenized text. :param tokenizer: a tokenizer that has the function tokenize that returns anSTRING
HIGHscripts/beir/tokenize_corpus.py0obtain a space separated re-tokenized text. :param tokenizer: a tokenizer that has the function tokenize that returns anSTRING
HIGHscripts/ltr_msmarco/convert_common.py0obtain a space separated re-tokenized text. :param tokenizer: a tokenizer that has the function tokenize that returns anSTRING
Unused Imports128 hits · 128 pts
SeverityFileLineSnippetContext
LOWpyserini/fusion/__init__.py17CODE
LOWpyserini/fusion/__init__.py17CODE
LOWpyserini/fusion/__init__.py17CODE
LOWpyserini/fusion/__init__.py17CODE
LOWpyserini/fusion/__init__.py17CODE
LOWpyserini/collection/__init__.py17CODE
LOWpyserini/collection/__init__.py17CODE
LOWpyserini/collection/__init__.py17CODE
LOWpyserini/collection/__init__.py18CODE
LOWpyserini/analysis/__init__.py17CODE
LOWpyserini/analysis/__init__.py17CODE
LOWpyserini/analysis/__init__.py17CODE
LOWpyserini/analysis/__init__.py17CODE
LOWpyserini/analysis/__init__.py17CODE
LOWpyserini/analysis/__init__.py17CODE
LOWpyserini/vectorizer/__init__.py17CODE
LOWpyserini/vectorizer/__init__.py17CODE
LOWpyserini/trectools/_base.py17CODE
LOWpyserini/trectools/_base.py18CODE
LOWpyserini/trectools/__init__.py17CODE
LOWpyserini/trectools/__init__.py17CODE
LOWpyserini/trectools/__init__.py17CODE
LOWpyserini/trectools/__init__.py17CODE
LOWpyserini/encode/__init__.py20CODE
LOWpyserini/encode/__init__.py20CODE
LOWpyserini/encode/__init__.py20CODE
LOWpyserini/encode/__init__.py20CODE
LOWpyserini/encode/__init__.py24CODE
LOWpyserini/encode/__init__.py28CODE
LOWpyserini/encode/__init__.py29CODE
LOWpyserini/encode/__init__.py29CODE
LOWpyserini/encode/__init__.py30CODE
LOWpyserini/encode/__init__.py35CODE
LOWpyserini/encode/__init__.py36CODE
LOWpyserini/encode/__init__.py37CODE
LOWpyserini/encode/__init__.py39CODE
LOWpyserini/encode/__init__.py40CODE
LOWpyserini/encode/__init__.py40CODE
LOWpyserini/encode/_dse.py21CODE
LOWpyserini/encode/_dse.py21CODE
LOWpyserini/encode/_dse.py21CODE
LOWpyserini/encode/_dse.py23CODE
LOWpyserini/encode/optional/__init__.py17CODE
LOWpyserini/encode/optional/__init__.py18CODE
LOWpyserini/server/document_format.py23CODE
LOWpyserini/server/backend.py17CODE
LOWpyserini/server/config.py19CODE
LOWpyserini/server/token_delivery.py19CODE
LOWpyserini/server/mcp/extension.py17CODE
LOWpyserini/server/rest/app.py34CODE
LOWpyserini/server/rest/routes/v1.py24CODE
LOWpyserini/search/__init__.py17CODE
LOWpyserini/search/__init__.py17CODE
LOWpyserini/search/__init__.py17CODE
LOWpyserini/search/__init__.py17CODE
LOWpyserini/search/lucene/__init__.py28CODE
LOWpyserini/search/lucene/__init__.py28CODE
LOWpyserini/search/lucene/__init__.py29CODE
LOWpyserini/search/lucene/__init__.py29CODE
LOWpyserini/search/lucene/__init__.py29CODE
68 more matches not shown…
Deep Nesting101 hits · 101 pts
SeverityFileLineSnippetContext
LOWpyserini/util.py208CODE
LOWpyserini/util.py267CODE
LOWpyserini/util.py461CODE
LOWpyserini/util.py512CODE
LOWpyserini/prebuilt_index_info.py54CODE
LOWpyserini/query_iterator.py97CODE
LOWpyserini/query_iterator.py233CODE
LOWpyserini/query_iterator.py321CODE
LOWpyserini/demo/msmarco.py56CODE
LOWpyserini/2cr/m_beir.py78CODE
LOWpyserini/2cr/m_beir.py182CODE
LOWpyserini/2cr/miracl.py212CODE
LOWpyserini/2cr/miracl.py283CODE
LOWpyserini/2cr/ciral.py150CODE
LOWpyserini/2cr/ciral.py219CODE
LOWpyserini/2cr/mmeb.py92CODE
LOWpyserini/2cr/mmeb.py163CODE
LOWpyserini/2cr/dse.py51CODE
LOWpyserini/2cr/dse.py143CODE
LOWpyserini/2cr/atomic.py96CODE
LOWpyserini/2cr/atomic.py172CODE
LOWpyserini/2cr/bright.py80CODE
LOWpyserini/2cr/bright.py147CODE
LOWpyserini/2cr/msmarco.py281CODE
LOWpyserini/2cr/msmarco.py357CODE
LOWpyserini/2cr/msmarco.py510CODE
LOWpyserini/2cr/beir.py103CODE
LOWpyserini/2cr/beir.py218CODE
LOWpyserini/2cr/mrtydi.py168CODE
LOWpyserini/2cr/mrtydi.py216CODE
LOWpyserini/2cr/odqa.py179CODE
LOWpyserini/2cr/odqa.py321CODE
LOWpyserini/analysis/_base.py54CODE
LOWpyserini/trectools/_base.py141CODE
LOWpyserini/encode/_base.py206CODE
LOWpyserini/encode/query.py45CODE
LOWpyserini/encode/_tct_colbert.py76CODE
LOWpyserini/encode/_unicoil.py118CODE
LOWpyserini/encode/_slim.py62CODE
LOWpyserini/server/backend.py196CODE
LOWpyserini/server/backend.py274CODE
LOWpyserini/server/backend.py303CODE
LOWpyserini/server/backend.py471CODE
LOWpyserini/server/backend.py562CODE
LOWpyserini/server/config.py379CODE
LOWpyserini/server/config.py431CODE
LOWpyserini/server/mcp/pyserini_bridge.py66CODE
LOWpyserini/server/mcp/pyserini_bridge.py237CODE
LOWpyserini/server/mcp/extension.py72CODE
LOWpyserini/server/rest/app.py421CODE
LOWpyserini/server/rest/app.py498CODE
LOWpyserini/server/rest/app.py617CODE
LOWpyserini/search/lucene/_impact_searcher.py168CODE
LOWpyserini/search/lucene/_impact_searcher.py259CODE
LOWpyserini/search/lucene/_impact_searcher.py373CODE
LOWpyserini/search/lucene/_searcher.py464CODE
LOWpyserini/search/lucene/__main__.py34CODE
LOWpyserini/search/faiss/_searcher.py165CODE
LOWpyserini/search/faiss/_searcher.py353CODE
LOWpyserini/search/faiss/__main__.py249CODE
41 more matches not shown…
Decorative Section Separators15 hits · 50 pts
SeverityFileLineSnippetContext
MEDIUMscripts/bright/dataset_analysis.py33# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/bright/dataset_analysis.py35# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/bright/dataset_analysis.py60# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/bright/dataset_analysis.py62# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/bright/dataset_analysis.py162# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/bright/dataset_analysis.py164# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/bright/dataset_analysis.py193# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/bright/dataset_analysis.py195# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/bright/dataset_analysis.py234 # -------------------------------------------------------------------COMMENT
MEDIUMscripts/bright/dataset_analysis.py236 # -------------------------------------------------------------------COMMENT
MEDIUMscripts/bright/dataset_analysis.py270 # -------------------------------------------------------------------COMMENT
MEDIUMscripts/bright/dataset_analysis.py272 # -------------------------------------------------------------------COMMENT
MEDIUM⚡scripts/bright/dataset_analysis.sh14# ------------------------------------------------------------COMMENT
MEDIUM⚡scripts/bright/dataset_analysis.sh16# ------------------------------------------------------------COMMENT
MEDIUM⚡scripts/bright/dataset_analysis.sh20# ------------------------------------------------------------COMMENT
Excessive Try-Catch Wrapping29 hits · 32 pts
SeverityFileLineSnippetContext
LOWpyserini/util.py157 except Exception as e:CODE
LOWpyserini/util.py395 except Exception as e:CODE
LOWpyserini/query_iterator.py286 except Exception as e:CODE
LOWpyserini/query_iterator.py305 except Exception as e:CODE
LOWpyserini/pyclass.py36except Exception as e:CODE
LOWpyserini/encode/_base.py56 except Exception:CODE
LOWpyserini/encode/_clip.py81 except Exception as e:CODE
MEDIUMpyserini/encode/_clip.py82 print(f"Error loading image {image}: {e}")CODE
LOWpyserini/encode/__init__.py49except Exception as e:CODE
LOWpyserini/encode/_openai.py41 except Exception as e:CODE
LOWpyserini/server/backend.py88 except Exception:CODE
LOWpyserini/server/backend.py179 except Exception:CODE
LOWpyserini/server/backend.py347 except Exception as e:CODE
LOWpyserini/server/mcp/pyserini_bridge.py60 except Exception as e:CODE
LOWpyserini/server/mcp/pyserini_bridge.py138 except Exception as e:CODE
LOWpyserini/server/mcp/pyserini_bridge.py213 except Exception as e:CODE
LOWpyserini/server/mcp/pyserini_bridge.py271 except Exception as e:CODE
LOWpyserini/server/mcp/mcpyserini.py66 except Exception as e:CODE
LOWpyserini/server/rest/app.py565 except Exception:CODE
LOWpyserini/server/rest/app.py668 except Exception:CODE
LOWpyserini/search/lucene/rerank/reranker_base.py34 except Exception:CODE
LOWpyserini/search/faiss/_searcher.py324 except Exception as e:CODE
LOWpyserini/index/lucene/_base.py369 except Exception as e:CODE
MEDIUMpyserini/index/lucene/_base.py118def _get_generator(self):CODE
MEDIUMscripts/run_jobs_with_load.py38 print(f"Error executing the command: {e}")CODE
LOWscripts/kilt/anserini_retriever.py109 except Exception as e:CODE
LOW…ripts/verify_encoded_queries/verify_encoded_queries.py537 except Exception as e:CODE
LOWscripts/dse/download_slidevqa_corpus.py46 except Exception:CODE
LOWscripts/dse/download_slidevqa_corpus.py130 except Exception as e:CODE
Empty Error Handlers6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHpyserini/server/config.py75except OSError:CODE
HIGHpyserini/server/config.py85except FileNotFoundError:CODE
HIGHpyserini/server/config.py70except PermissionError:CODE
HIGHpyserini/eval/trec_eval.py50except:CODE
HIGHscripts/dse/download_wiki_ss_corpus.py66except:CODE
HIGHscripts/dse/download_slidevqa_corpus.py46except Exception:CODE
Modern Structural Boilerplate21 hits · 21 pts
SeverityFileLineSnippetContext
LOWpyserini/util.py44logger = logging.getLogger(__name__)CODE
LOWpyserini/pyclass.py55__all__ = [CODE
LOWpyserini/collection/_base.py26logger = logging.getLogger(__name__)CODE
LOWpyserini/trectools/__init__.py19__all__ = ['AggregationMethod', 'RescoreMethod', 'TrecRun', 'Qrels']CODE
LOWpyserini/encode/_dse.py33logger = logging.getLogger(__name__)CODE
LOWpyserini/server/backend.py41logger = logging.getLogger(__name__)CODE
LOWpyserini/server/mcp/tools.py31logger = logging.getLogger(__name__)CODE
LOWpyserini/server/mcp/extension.py36logger = logging.getLogger(__name__)CODE
LOWpyserini/server/rest/app.py72logger = logging.getLogger(__name__)CODE
LOWpyserini/server/rest/app.py813__all__ = ['RestBackpressure', 'app', 'create_app', 'main', 'VERSION', 'API_VERSION']CODE
LOWpyserini/search/lucene/_impact_searcher.py39logger = logging.getLogger(__name__)CODE
LOWpyserini/search/lucene/_searcher.py34logger = logging.getLogger(__name__)CODE
LOWpyserini/search/lucene/_hnsw_searcher.py23logger = logging.getLogger(__name__)CODE
LOWpyserini/search/lucene/_geo_searcher.py28logger = logging.getLogger(__name__)CODE
LOWpyserini/search/lucene/querybuilder.py27logger = logging.getLogger(__name__)CODE
LOWpyserini/search/faiss/_searcher.py50logger = logging.getLogger(__name__)CODE
LOWpyserini/index/lucene/_base.py36logger = logging.getLogger(__name__)CODE
LOWpyserini/index/lucene/_indexer.py22logger = logging.getLogger(__name__)CODE
LOWpyserini/eval/evaluate_qa_overlap_retrieval.py33logger = logging.getLogger(__name__)CODE
LOWpyserini/eval/evaluate_dpr_retrieval.py32logger = logging.getLogger(__name__)CODE
LOWscripts/dse/evaluate_wiki_ss_run.py12logger = logging.getLogger(__name__)CODE
Verbosity Indicators6 hits · 14 pts
SeverityFileLineSnippetContext
LOW⚡pyserini/trectools/_base.py253 # Step 1: Collect all dataframes from all runsCOMMENT
LOW⚡pyserini/trectools/_base.py263 # Step 2: Concatenate all dataframes at once (vectorized)COMMENT
LOW⚡pyserini/trectools/_base.py266 # Step 3: Group by topic and docid, sum scores (vectorized aggregation)COMMENT
LOW⚡pyserini/trectools/_base.py269 # Step 4: Sort by topic (ascending), score (descending), docid (ascending for tie-breaking)COMMENT
LOW⚡pyserini/trectools/_base.py274 # Step 5: Apply k limit per topic if specified (vectorized)COMMENT
LOW⚡pyserini/trectools/_base.py278 # Step 6: Add required columns and assign ranks (vectorized)COMMENT
Structural Annotation Overuse6 hits · 14 pts
SeverityFileLineSnippetContext
LOW⚡pyserini/trectools/_base.py253 # Step 1: Collect all dataframes from all runsCOMMENT
LOW⚡pyserini/trectools/_base.py263 # Step 2: Concatenate all dataframes at once (vectorized)COMMENT
LOW⚡pyserini/trectools/_base.py266 # Step 3: Group by topic and docid, sum scores (vectorized aggregation)COMMENT
LOW⚡pyserini/trectools/_base.py269 # Step 4: Sort by topic (ascending), score (descending), docid (ascending for tie-breaking)COMMENT
LOW⚡pyserini/trectools/_base.py274 # Step 5: Apply k limit per topic if specified (vectorized)COMMENT
LOW⚡pyserini/trectools/_base.py278 # Step 6: Add required columns and assign ranks (vectorized)COMMENT
AI Structural Patterns9 hits · 9 pts
SeverityFileLineSnippetContext
LOWpyserini/server/backend.py650CODE
LOWpyserini/server/mcp/tools.py39CODE
LOWpyserini/server/rest/app.py421CODE
LOWpyserini/server/rest/routes/v1.py97CODE
LOWpyserini/server/rest/routes/v1.py181CODE
LOWpyserini/search/lucene/_impact_searcher.py299CODE
LOWpyserini/search/lucene/_searcher.py511CODE
LOWscripts/beir/compare_domains.py52CODE
LOWscripts/beir/compare_domains.py66CODE
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMscripts/es/create_es_ann.py19# Create the client instanceCOMMENT
MEDIUMscripts/es/create_es.py18# Create the client instanceCOMMENT
MEDIUMscripts/es/check_status.py18# Create the client instanceCOMMENT
AI Slop Vocabulary3 hits · 6 pts
SeverityFileLineSnippetContext
LOWpyserini/util.py281 # Check to see if file already exists, if so, simply return (quietly) unless force=True, in which case we removeCOMMENT
LOWpyserini/eval/trec_eval.py137 # Obvious question here: why we *not* just call the trec_eval main (Java) class, which already wraps the executable?COMMENT
MEDIUMpyserini/eval/evaluate_kilt_retrieval.py135 # 2. check what's the minimum number of predicted pages needed to get a robust P/R@kCOMMENT
Modern AI Meta-Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMpyserini/server/mcp/mcp-client/README.md2# MCP Client for RAGCOMMENT
MEDIUMdocs/experiments-msmarco-v2.1.md14## Batch Runs on TREC 2024 RAG TopicsCOMMENT
Example Usage Blocks4 hits · 6 pts
SeverityFileLineSnippetContext
LOWpyserini/eval/trec_eval.py17# Example usage:COMMENT
LOWscripts/msmarco_v2/generate_train_triplet.py19# Usage:COMMENT
LOWscripts/msmarco_v2/convert_passage_run_to_doc_run.py23# Usage:COMMENT
LOWscripts/msmarco_v2/build_passage_to_doc_id_map.py19# Usage:COMMENT
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWscripts/dse/download_slidevqa_corpus.py70 # Check if page exists and is not NoneCOMMENT
LOWscripts/dse/download_slidevqa_corpus.py82 # Check if we've already processed this pageCOMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/base/encoder/test_encoder_model_arctic.py45 #TODO: Implement test_arctic_query_encoder after beir regression incorporatedCOMMENT