AI Slop Code RIsk Monitor

PDFMathTranslate/PDFMathTranslate

[EMNLP 2025 Demo] PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero

18.0 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for PDFMathTranslate/PDFMathTranslate, a Python project with 37,471 GitHub stars. SynthScan examined 12,874 lines of code across 64 source files, recording 161 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 18.0 (Elevated 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.

18.0
Adjusted Signal
18.0
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
37.5K
Stars
Python
Language
12.9K
Lines of Code
64
Files
161
Pattern Hits
2026-10-12
Scan Date
0.25
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 34.1/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 20.6/100 · LOW

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

Agent Over-Engineering Ratio 42.2/100 · MEDIUM

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

PR Review Velocity Impact 62.6/100 · HIGH

Which changes need focused human review? 161 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 16MEDIUM 6LOW 139

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 161 distinct pattern matches across 12 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 Identifiers73 hits · 72 pts
SeverityFileLineSnippetContext
LOWtest/test_translator.py52 def test_add_cache_impact_parameters(self):CODE
LOWtest/test_translator.py80 def test_base_translator_throw(self):CODE
LOWtest/test_translator.py94 def test_missing_base_url_raises_error(self):CODE
LOWtest/test_translator.py103 def test_missing_model_raises_error(self):CODE
LOWtest/test_translator.py116 def test_initialization_with_valid_envs(self):CODE
LOWtest/test_translator.py135 def test_default_api_key_fallback(self):CODE
LOWtest/test_ultrafast.py14def test_ultrafast_rejects_other_backends():CODE
LOWtest/test_ultrafast.py26def test_worker_defaults_and_overrides():CODE
LOWtest/test_ultrafast.py39def test_ultrafast_cli_without_models_rendering_or_ocr(tmp_path, rotation, caplog):CODE
LOWtest/test_ultrafast.py144def test_no_cache_bypasses_reads_and_writes():CODE
LOWtest/test_ocr_layout.py18 def test_interleaved_columns_group_by_detection_region(self):CODE
LOWtest/test_ocr_layout.py44 def test_fragmented_lines_rejoin_soft_hyphen_and_use_median_font(self):CODE
LOWtest/test_ocr_layout.py63 def test_translation_fits_escaped_text_and_preserves_figure_pixels(self):CODE
LOWtest/test_text_spacing.py9 def test_inserts_one_space_in_both_directions_for_supported_scripts(self):CODE
LOWtest/test_text_spacing.py28 def test_supports_precomposed_and_decomposed_accented_latin(self):CODE
LOWtest/test_text_spacing.py39 def test_preserves_existing_whitespace_and_unrelated_boundaries(self):CODE
LOW⚡test/test_kernel.py319 def test_legacy_version_matches_package(self):CODE
LOW⚡test/test_kernel.py326 def test_experimental_version_is_string(self):CODE
LOW⚡test/test_kernel.py334 def test_experimental_version_semver_when_available(self):CODE
LOWtest/test_kernel.py17 def test_translate_request_defaults(self):CODE
LOWtest/test_kernel.py29 def test_translate_result_defaults(self):CODE
LOWtest/test_kernel.py37 def test_translate_result_with_paths(self):CODE
LOWtest/test_kernel.py73 def test_get_nonexistent_raises(self):CODE
LOWtest/test_kernel.py79 def test_switch_and_active_name(self):CODE
LOWtest/test_kernel.py90 def test_switch_unavailable_raises(self):CODE
LOWtest/test_kernel.py101 def test_available_filters_correctly(self):CODE
LOWtest/test_kernel.py149 def test_is_available_without_venv(self):CODE
LOWtest/test_kernel.py198 def test_cli_args_vfont_vchar(self):CODE
LOWtest/test_kernel.py226 def test_cli_args_ignore_cache(self):CODE
LOWtest/test_kernel.py245 def test_cli_args_service_model_split(self):CODE
LOWtest/test_kernel.py253 def test_service_name_mapping(self):CODE
LOWtest/test_kernel.py266 def test_request_to_env_maps_envs(self):CODE
LOWtest/test_kernel.py282 def test_request_to_env_service_model(self):CODE
LOWtest/test_kernel.py351 def test_translate_single_file(self, mock_model_inst, mock_onnx, mock_translate):CODE
LOWtest/test_kernel.py370 def test_translate_passes_all_params(CODE
LOWtest/test_kernel.py405 def test_translate_with_prompt_wraps_template(CODE
LOWtest/test_kernel.py434 def test_translate_single_file(self, mock_venv, mock_avail, mock_popen):CODE
LOWtest/test_kernel.py464 def test_translate_subprocess_failure_raises(self, mock_venv, mock_popen):CODE
LOWtest/test_kernel.py488 def test_translate_progress_callback(self, mock_venv, mock_avail, mock_popen):CODE
LOWtest/test_kernel.py531 def test_all_services_produce_cli_flag(self):CODE
LOWtest/test_kernel.py601 def test_output_defaults_to_input_parent(self):CODE
LOWtest/test_kernel.py611 def test_output_resolved_to_absolute_path(self):CODE
LOWtest/test_kernel.py623 def test_explicit_output_resolved_to_absolute(self):CODE
LOWtest/test_kernel.py643 def test_cli_fast_mode_routes_through_kernel(CODE
LOWtest/test_kernel.py664 def test_cli_precise_mode_routes_through_kernel(CODE
LOWtest/test_kernel.py685 def test_cli_service_model_syntax_passed_through(CODE
LOWtest/test_doclayout.py31 def test_resize_and_pad_image(self):CODE
LOWtest/test_ocr.py98 def test_selection_skips_native_blank_and_existing_layers(self):CODE
LOWtest/test_ocr.py125 def test_ocr_failure_has_actionable_error(self):CODE
LOWtest/test_ocr.py140 def test_cancellation_stops_before_ocr(self):CODE
LOW⚡test/test_ocr.py151 def test_no_candidate_does_not_resolve_tessdata(self):CODE
LOW⚡test/test_ocr.py159 def test_tessdata_explicit_override_skips_download(self):CODE
LOW⚡test/test_ocr.py166 def test_tessdata_rejects_invalid_language(self):CODE
LOW⚡test/test_ocr.py172 def test_tessdata_missing_optional_dependency_is_actionable(self):CODE
LOW⚡test/test_ocr.py180 def test_tessdata_downloads_each_language_and_reuses_cache(self):CODE
LOWtest/test_ocr.py226 def test_translate_stream_ocr_masks_body_and_preserves_source(self):CODE
LOWtest/test_converter.py56 def test_translator_initialization(self):CODE
LOWtest/test_converter.py83 def test_receive_layout_with_complex_formula(self):CODE
LOWtest/test_converter.py98 def test_invalid_translation_service(self):CODE
LOWtest/test_cli.py19 def test_importing_package_does_not_eagerly_load_translation_pipeline(self):CODE
13 more matches not shown…
Magic Placeholder Names9 hits · 45 pts
SeverityFileLineSnippetContext
HIGHdocs/PROXY_CONFIGURATION.md22 "GROK_API_KEY": "your-api-key",CODE
HIGHdocs/PROXY_CONFIGURATION.md56 "OPENAILIKED_API_KEY": "your-api-key",CODE
HIGHdocs/PROXY_CONFIGURATION.md70 "OPENAI_API_KEY": "your-api-key",CODE
HIGHdocs/PROXY_CONFIGURATION.md86 -H "Authorization: Bearer your-api-key"CODE
HIGHdocs/PROXY_CONFIGURATION.md168export GROK_API_KEY="your-api-key"CODE
HIGHdocs/PROXY_CONFIGURATION.md189 "GROK_API_KEY": "your-api-key",CODE
HIGHdocs/PROXY_CONFIGURATION.md198 "OPENAILIKED_API_KEY": "your-api-key",CODE
HIGHdocs/ADVANCED.md291 "GROK_API_KEY": "your-api-key",CODE
HIGHdocs/ADVANCED.md350 "GROK_API_KEY": "your-api-key",CODE
Empty Error Handlers6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHpdf2zh/pdfinterp.py244except Exception:CODE
HIGHpdf2zh/high_level.py463except Exception:CODE
HIGHpdf2zh/pdf2zh.py548except OSError:CODE
HIGHpdf2zh/converter.py450except Exception:CODE
HIGHpdf2zh/translator.py130except AttributeError: # `prompt_template` is NoneCODE
HIGHpdf2zh/mcp_server.py63except OSError:CODE
Excessive Try-Catch Wrapping21 hits · 22 pts
SeverityFileLineSnippetContext
LOWpdf2zh/pdfinterp.py244 except Exception:CODE
LOWpdf2zh/high_level.py463 except Exception:CODE
LOWpdf2zh/high_level.py611 except Exception as e:CODE
LOWpdf2zh/high_level.py650 except Exception:CODE
LOWpdf2zh/pdf2zh.py341 except Exception:CODE
LOWpdf2zh/pdf2zh.py438 except Exception:CODE
LOWpdf2zh/cache.py89 except Exception as e:STRING
LOWpdf2zh/converter.py440 except Exception:CODE
LOWpdf2zh/converter.py450 except Exception:CODE
LOWpdf2zh/translator.py132 except Exception:CODE
LOWpdf2zh/translator.py397 except Exception as e:CODE
LOWpdf2zh/translator.py919 except Exception:CODE
MEDIUMpdf2zh/translator.py619def do_translate(self, text) -> str:CODE
LOWpdf2zh/gui.py192 except Exception: # filename from urlCODE
MEDIUMpdf2zh/gui.py838 print(f"Error: File '{file_path[1]}' not found.")STRING
MEDIUMpdf2zh/gui.py845 print(f"Error: File '{file_path[0]}' not found.")STRING
LOWpdf2zh/gui.py902 except Exception:CODE
LOWpdf2zh/kernel/v2_worker.py92 except Exception as e:CODE
LOWpdf2zh/kernel/precise.py56 except Exception:CODE
LOWpdf2zh/kernel/precise.py112 except Exception:CODE
LOWpdf2zh/kernel/precise.py172 except Exception:CODE
Deep Nesting16 hits · 16 pts
SeverityFileLineSnippetContext
LOWtest/test_ocr.py125CODE
LOWtest/test_ocr.py140CODE
LOWtest/test_ocr.py172CODE
LOWtest/test_ocr.py180CODE
LOWpdf2zh/pdfinterp.py67CODE
LOWpdf2zh/pdfinterp.py301CODE
LOWpdf2zh/config.py155CODE
LOWpdf2zh/high_level.py79CODE
LOWpdf2zh/high_level.py374CODE
LOWpdf2zh/high_level.py556CODE
LOWpdf2zh/converter.py175CODE
LOWpdf2zh/ocr.py13CODE
LOWpdf2zh/ocr.py108CODE
LOWpdf2zh/gui.py172CODE
LOWpdf2zh/kernel/v2_worker.py36CODE
LOWpdf2zh/kernel/precise.py122CODE
Modern Structural Boilerplate13 hits · 13 pts
SeverityFileLineSnippetContext
LOWpdf2zh/doclayout.py21logger = logging.getLogger(__name__)CODE
LOWpdf2zh/doclayout.py32def set_backend(name: str) -> None:CODE
LOWpdf2zh/high_level.py43logger = logging.getLogger(__name__)CODE
LOWpdf2zh/pdf2zh.py18logger = logging.getLogger(__name__)CODE
LOWpdf2zh/cache.py9logger = logging.getLogger(__name__)CODE
LOWpdf2zh/__init__.py7__all__ = ["translate", "translate_stream"]CODE
LOWpdf2zh/converter_docx.py9logger = logging.getLogger(__name__)CODE
LOWpdf2zh/ultrafast.py10logger = logging.getLogger(__name__)CODE
LOWpdf2zh/translator.py32logger = logging.getLogger(__name__)CODE
LOWpdf2zh/gui.py52logger = logging.getLogger(__name__)CODE
LOWpdf2zh/kernel/legacy.py12logger = logging.getLogger(__name__)CODE
LOWpdf2zh/kernel/__init__.py12__all__ = ["KernelRegistry"]CODE
LOWpdf2zh/kernel/precise.py17logger = logging.getLogger(__name__)CODE
Unused Imports10 hits · 10 pts
SeverityFileLineSnippetContext
LOWtest/test_kernel.py336CODE
LOWpdf2zh/high_level.py3CODE
LOWpdf2zh/pdf2zh.py6CODE
LOWpdf2zh/translator.py928CODE
LOWpdf2zh/kernel/v2_bridge.py8CODE
LOWpdf2zh/kernel/legacy.py3CODE
LOWpdf2zh/kernel/registry.py3CODE
LOWpdf2zh/kernel/protocol.py3CODE
LOWpdf2zh/kernel/v2_worker.py13CODE
LOWpdf2zh/kernel/precise.py3CODE
Self-Referential Comments3 hits · 7 pts
SeverityFileLineSnippetContext
MEDIUMtest/test_doclayout.py32 # Create a dummy image (100x200)COMMENT
MEDIUMtest/test_doclayout.py62 # Create a dummy imageCOMMENT
MEDIUMpdf2zh/gui.py567# The following code creates the GUISTRING
Redundant / Tautological Comments3 hits · 6 pts
SeverityFileLineSnippetContext
LOW⚡pdf2zh/pdf2zh.py262 # Check if the provided path is a directoryCOMMENT
LOW⚡pdf2zh/pdf2zh.py271 # Check if the file is a PDFCOMMENT
LOWpdf2zh/gui.py123# Check if this is a public demo, which has resource limitsCOMMENT
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHpdf2zh/pdfinterp.py364 self.push(obj)CODE
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWpdf2zh/high_level.py79CODE
LOWpdf2zh/high_level.py374CODE
LOWpdf2zh/high_level.py556CODE
LOWpdf2zh/converter.py135CODE
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtest/test_cache.py161 # cache_instance = cache.TranslationCache("test_engine")COMMENT
LOWtest/test_cache.py181 # # Read operation - verify our own writeCOMMENT