Edit Banana: A framework for converting statistical formats into editable.
This report summarizes scanner evidence for BIT-DataLab/Edit-Banana, a Python project with 5,498 GitHub stars. SynthScan examined 12,725 lines of code across 55 source files, recording 166 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 15.6 (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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 59 finding(s).
Are imports declared and package/API names verified? 66 finding(s).
Are wrappers, guards, and repeated structures necessary? 57 finding(s).
Which changes need focused human review? 166 finding(s).
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.
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.
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.
The scanner identified 166 distinct pattern matches across 10 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | main.py | 34 | CODE | |
| LOW | main.py | 34 | CODE | |
| LOW | main.py | 34 | CODE | |
| LOW | sam3_service/__init__.py | 1 | CODE | |
| LOW | sam3_service/__init__.py | 1 | CODE | |
| LOW | modules/xml_merger.py | 42 | CODE | |
| LOW | modules/xml_merger.py | 42 | CODE | |
| LOW | modules/xml_merger.py | 46 | CODE | |
| LOW | modules/__init__.py | 6 | CODE | |
| LOW | modules/__init__.py | 6 | CODE | |
| LOW | modules/__init__.py | 7 | CODE | |
| LOW | modules/__init__.py | 7 | CODE | |
| LOW | modules/__init__.py | 7 | CODE | |
| LOW | modules/__init__.py | 7 | CODE | |
| LOW | modules/__init__.py | 7 | CODE | |
| LOW | modules/__init__.py | 7 | CODE | |
| LOW | modules/__init__.py | 15 | CODE | |
| LOW | modules/__init__.py | 16 | CODE | |
| LOW | modules/__init__.py | 19 | CODE | |
| LOW | modules/__init__.py | 20 | CODE | |
| LOW | modules/__init__.py | 21 | CODE | |
| LOW | modules/__init__.py | 22 | CODE | |
| LOW | modules/metric_evaluator.py | 133 | CODE | |
| LOW | modules/metric_evaluator.py | 139 | CODE | |
| LOW | modules/sam3_info_extractor.py | 13 | CODE | |
| LOW | modules/sam3_info_extractor.py | 14 | CODE | |
| LOW | modules/basic_shape_processor.py | 43 | CODE | |
| LOW | modules/basic_shape_processor.py | 43 | CODE | |
| LOW | modules/basic_shape_processor.py | 43 | CODE | |
| LOW | modules/basic_shape_processor.py | 43 | CODE | |
| LOW | modules/basic_shape_processor.py | 44 | CODE | |
| LOW | modules/basic_shape_processor.py | 47 | CODE | |
| LOW | modules/base.py | 20 | CODE | |
| LOW | modules/base.py | 20 | CODE | |
| LOW | modules/base.py | 20 | CODE | |
| LOW | modules/utils/__init__.py | 3 | CODE | |
| LOW | modules/utils/__init__.py | 3 | CODE | |
| LOW | modules/utils/__init__.py | 8 | CODE | |
| LOW | modules/utils/__init__.py | 8 | CODE | |
| LOW | modules/utils/__init__.py | 8 | CODE | |
| LOW | modules/utils/__init__.py | 8 | CODE | |
| LOW | modules/utils/__init__.py | 15 | CODE | |
| LOW | modules/utils/__init__.py | 19 | CODE | |
| LOW | modules/utils/__init__.py | 19 | CODE | |
| LOW | modules/utils/__init__.py | 19 | CODE | |
| LOW | modules/utils/__init__.py | 19 | CODE | |
| LOW | modules/utils/__init__.py | 19 | CODE | |
| LOW | modules/utils/xml_utils.py | 7 | CODE | |
| LOW | modules/utils/xml_utils.py | 7 | CODE | |
| LOW | modules/text/__init__.py | 16 | CODE | |
| LOW | modules/text/__init__.py | 17 | CODE | |
| LOW | modules/text/__init__.py | 18 | CODE | |
| LOW | modules/text/__init__.py | 18 | CODE | |
| LOW | modules/text/restorer.py | 14 | CODE | |
| LOW | modules/text/ocr/__init__.py | 6 | CODE | |
| LOW | modules/text/ocr/__init__.py | 6 | CODE | |
| LOW | modules/text/ocr/__init__.py | 7 | CODE | |
| LOW | modules/text/ocr/pix2text.py | 174 | CODE | |
| LOW | modules/text/ocr/local_ocr.py | 9 | CODE | |
| LOW | modules/text/ocr/local_ocr.py | 9 | CODE | |
| 6 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | server_pa.py | 76 | except Exception: | CODE |
| LOW | server_pa.py | 80 | except Exception as e: | CODE |
| LOW | main.py | 180 | except Exception as e: | CODE |
| LOW | main.py | 271 | except Exception as e: | CODE |
| MEDIUM⚡ | main.py | 388 | print(f"Error: file not found {args.input}") | STRING |
| MEDIUM⚡ | main.py | 396 | print(f"Error: input directory does not exist: {input_dir}") | STRING |
| MEDIUM⚡ | main.py | 406 | print(f"Error: no supported image files in {input_dir}") | STRING |
| LOW | sam3_service/server.py | 262 | except Exception as exc: # pragma: no cover - defensive log path | CODE |
| LOW | sam3_service/rmbg_client.py | 31 | except Exception as exc: # pragma: no cover | CODE |
| LOW | sam3_service/rmbg_client.py | 63 | except Exception: | CODE |
| LOW | sam3_service/client.py | 63 | except Exception: | CODE |
| LOW | sam3_service/rmbg_server.py | 90 | except Exception as exc: # pragma: no cover | CODE |
| MEDIUM | scripts/merge_xml.py | 32 | print(f"Error: file not found {args.input}") | CODE |
| LOW | modules/icon_picture_processor.py | 114 | except Exception as e: | CODE |
| LOW | modules/icon_picture_processor.py | 177 | except Exception as e: | CODE |
| LOW | modules/icon_picture_processor.py | 201 | except Exception as e2: | CODE |
| LOW | modules/icon_picture_processor.py | 298 | except Exception as e: | CODE |
| LOW | modules/xml_merger.py | 258 | except Exception as e: | CODE |
| LOW | modules/xml_merger.py | 333 | except Exception as e: | CODE |
| LOW | modules/xml_merger.py | 497 | except Exception as e: | CODE |
| LOW | modules/xml_merger.py | 614 | except Exception as e: | CODE |
| LOW | modules/refinement_processor.py | 224 | except Exception as e: | CODE |
| LOW | modules/__init__.py | 27 | except Exception as e: | CODE |
| LOW | modules/sam3_info_extractor.py | 745 | except Exception as e: | CODE |
| LOW | modules/basic_shape_processor.py | 1405 | except Exception as e: | CODE |
| LOW | modules/utils/xml_utils.py | 54 | except Exception: | CODE |
| LOW | modules/text/restorer.py | 70 | except Exception as e: | CODE |
| LOW | modules/text/restorer.py | 270 | except Exception as e: | CODE |
| LOW | modules/text/restorer.py | 558 | except Exception as e: | CODE |
| LOW | modules/text/ocr/pix2text.py | 216 | except Exception as e: | CODE |
| MEDIUM | flowchart_text/main.py | 35 | print(f"Error: file not found {args.input}") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | main.py | 142 | CODE | |
| LOW | main.py | 277 | CODE | |
| LOW | sam3_service/server.py | 177 | CODE | |
| LOW | scripts/setup_rmbg.py | 16 | CODE | |
| LOW | modules/xml_merger.py | 152 | CODE | |
| LOW | modules/xml_merger.py | 224 | CODE | |
| LOW | modules/xml_merger.py | 285 | CODE | |
| LOW | modules/xml_merger.py | 459 | CODE | |
| LOW | modules/xml_merger.py | 527 | CODE | |
| LOW | modules/metric_evaluator.py | 345 | CODE | |
| LOW | modules/metric_evaluator.py | 613 | CODE | |
| LOW | modules/metric_evaluator.py | 1160 | CODE | |
| LOW | modules/metric_evaluator.py | 1243 | CODE | |
| LOW | modules/metric_evaluator.py | 1262 | CODE | |
| LOW | modules/sam3_info_extractor.py | 677 | CODE | |
| LOW | modules/sam3_info_extractor.py | 748 | CODE | |
| LOW | modules/sam3_info_extractor.py | 889 | CODE | |
| LOW | modules/basic_shape_processor.py | 82 | CODE | |
| LOW | modules/basic_shape_processor.py | 393 | CODE | |
| LOW | modules/basic_shape_processor.py | 456 | CODE | |
| LOW | modules/basic_shape_processor.py | 818 | CODE | |
| LOW | modules/basic_shape_processor.py | 1601 | CODE | |
| LOW | modules/basic_shape_processor.py | 1700 | CODE | |
| LOW | modules/text/restorer.py | 263 | CODE | |
| LOW | modules/text/ocr/paddle_ocr.py | 50 | CODE | |
| LOW | modules/text/processors/style.py | 86 | CODE | |
| LOW | modules/text/processors/font_family.py | 172 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | server_pa.py | 76 | except Exception: | CODE |
| HIGH | modules/xml_merger.py | 586 | except: | CODE |
| HIGH | modules/xml_merger.py | 316 | except (ValueError, TypeError): | CODE |
| HIGH | modules/basic_shape_processor.py | 351 | except: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | modules/icon_picture_processor.py | 415 | def calculate_image_complexity(image_arr: np.ndarray) -> tuple: | CODE |
| LOW | modules/xml_merger.py | 262 | def _scale_fragment_coordinates(self, fragment: XMLFragment, scale: float) -> XMLFragment: | CODE |
| LOW | modules/xml_merger.py | 285 | def _extract_text_fragments_from_xml(self, text_xml: str) -> List[XMLFragment]: | CODE |
| LOW | modules/refinement_processor.py | 532 | def refine_from_rendered_comparison(elements: List[ElementInfo], | CODE |
| LOW | modules/metric_evaluator.py | 510 | def _extract_text_bboxes_from_xml(self, text_xml: str, img_width: int, img_height: int) -> List[List[int]]: | CODE |
| LOW | modules/metric_evaluator.py | 613 | def _detect_complex_image_regions(self, | CODE |
| LOW | modules/metric_evaluator.py | 1160 | def _save_uncovered_visualization(self, | CODE |
| LOW | modules/metric_evaluator.py | 1628 | def detect_missing_from_rendered_diff(original_path: str, | CODE |
| LOW | modules/sam3_info_extractor.py | 541 | def extract_with_custom_prompts(self, context: ProcessingContext, | CODE |
| LOW | modules/sam3_info_extractor.py | 640 | def _deduplicate_within_group(self, elements: List[ElementInfo], | CODE |
| LOW | modules/sam3_info_extractor.py | 677 | def _analyze_region_complexity(self, image_path: str, bbox: List[int]) -> dict: | CODE |
| LOW | modules/sam3_info_extractor.py | 748 | def _deduplicate_cross_groups(self, elements: List[ElementInfo]) -> List[ElementInfo]: | CODE |
| LOW | modules/sam3_info_extractor.py | 889 | def _filter_contained_elements(self, elements: List[ElementInfo]) -> List[ElementInfo]: | CODE |
| LOW | modules/sam3_info_extractor.py | 1054 | def remove_prompts_from_group(self, group_type: PromptGroup, prompts: List[str]): | CODE |
| LOW | modules/text/restorer.py | 407 | def _is_refinement_meaningful(self, original: str, new_latex: str) -> bool: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | modules/text/restorer.py | 143 | # Step 1: OCR | COMMENT |
| LOW⚡ | modules/text/restorer.py | 146 | # Step 2: Formula (layout OCR + Pix2Text) | COMMENT |
| LOW | modules/text/restorer.py | 158 | # Step 3: Coord transform | COMMENT |
| LOW⚡ | modules/text/restorer.py | 173 | # Step 4: Font size | COMMENT |
| LOW⚡ | modules/text/restorer.py | 177 | # Step 5: Font family | COMMENT |
| LOW⚡ | modules/text/restorer.py | 182 | # Step 6: Style (bold/color) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | modules/text/restorer.py | 143 | # Step 1: OCR | COMMENT |
| LOW⚡ | modules/text/restorer.py | 146 | # Step 2: Formula (layout OCR + Pix2Text) | COMMENT |
| LOW | modules/text/restorer.py | 158 | # Step 3: Coord transform | COMMENT |
| LOW⚡ | modules/text/restorer.py | 173 | # Step 4: Font size | COMMENT |
| LOW⚡ | modules/text/restorer.py | 177 | # Step 5: Font family | COMMENT |
| LOW⚡ | modules/text/restorer.py | 182 | # Step 6: Style (bold/color) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | sam3_service/__init__.py | 3 | __all__ = ["Sam3ServiceClient", "Sam3ServicePool"] | CODE |
| LOW | modules/__init__.py | 32 | __all__ = [ | CODE |
| LOW | modules/utils/__init__.py | 27 | __all__ = [ | CODE |
| LOW | modules/text/__init__.py | 20 | __all__ = [ | CODE |
| LOW | modules/text/ocr/__init__.py | 19 | __all__ = [ | CODE |
| LOW | modules/text/processors/__init__.py | 18 | __all__ = [ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | requirements.txt | 21 | # pip install onnxruntime # or onnxruntime-gpu | COMMENT |
| LOW | modules/sam3_info_extractor.py | 801 | # 【新增】基础图形和图片类重叠的智能判断 | COMMENT |
| LOW | modules/sam3_info_extractor.py | 821 | # keep.append(elem_j) | COMMENT |
| LOW | flowchart_text/src/__init__.py | 1 | # OCR & text extraction — source layer for alignment and config. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | modules/text/xml_generator.py | 235 | CODE |