Repository Analysis

pjialin/py12306

🚂 12306 购票助手,支持集群,多账号,多任务购票以及 Web 页面管理

16.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pjialin/py12306, a Python project with 14,895 GitHub stars. SynthScan v2.0 examined 8,427 lines of code across 60 source files, recording 112 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 16.5 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

16.5
Adjusted Score
16.5
Raw Score
100%
Time Factor
2026-07-10
Last Push
14.9K
Stars
Python
Language
8.4K
Lines of Code
60
Files
112
Pattern Hits
2026-07-14
Scan Date
0.07
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 4MEDIUM 1LOW 107

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 112 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Unused Imports54 hits · 54 pts
SeverityFileLineSnippetContext
LOWmain.py4CODE
LOWpy12306/config.py2CODE
LOWpy12306/config.py7CODE
LOWpy12306/app.py5CODE
LOWpy12306/order/order.py8CODE
LOWpy12306/order/order.py9CODE
LOWpy12306/cluster/redis.py1CODE
LOWpy12306/cluster/redis.py4CODE
LOWpy12306/cluster/redis.py7CODE
LOWpy12306/cluster/cluster.py4CODE
LOWpy12306/cluster/cluster.py7CODE
LOWpy12306/cluster/cluster.py12CODE
LOWpy12306/web/web.py2CODE
LOWpy12306/web/web.py6CODE
LOWpy12306/web/web.py11CODE
LOWpy12306/web/handler/user.py6CODE
LOWpy12306/web/handler/query.py1CODE
LOWpy12306/web/handler/query.py5CODE
LOWpy12306/web/handler/log.py1CODE
LOWpy12306/web/handler/log.py10CODE
LOWpy12306/web/handler/log.py11CODE
LOWpy12306/web/handler/stat.py1CODE
LOWpy12306/web/handler/app.py4CODE
LOWpy12306/web/handler/app.py4CODE
LOWpy12306/web/handler/app.py9CODE
LOWpy12306/web/handler/app.py10CODE
LOWpy12306/user/user.py1CODE
LOWpy12306/user/user.py4CODE
LOWpy12306/user/job.py7CODE
LOWpy12306/user/job.py8CODE
LOWpy12306/user/job.py11CODE
LOWpy12306/log/query_log.py4CODE
LOWpy12306/log/query_log.py10CODE
LOWpy12306/log/cluster_log.py2CODE
LOWpy12306/log/user_log.py2CODE
LOWpy12306/log/common_log.py2CODE
LOWpy12306/log/common_log.py3CODE
LOWpy12306/log/order_log.py2CODE
LOWpy12306/log/redis_log.py2CODE
LOWpy12306/log/base.py1CODE
LOWpy12306/log/base.py7CODE
LOWpy12306/query/query.py5CODE
LOWpy12306/query/job.py11CODE
LOWpy12306/helpers/auth_code.py8CODE
LOWpy12306/helpers/auth_code.py9CODE
LOWpy12306/helpers/auth_code.py10CODE
LOWpy12306/helpers/event.py1CODE
LOWpy12306/helpers/notification.py4CODE
LOWpy12306/helpers/request.py2CODE
LOWpy12306/helpers/request.py4CODE
LOWpy12306/helpers/type.py1CODE
LOWpy12306/helpers/station.py4CODE
LOWpy12306/helpers/cdn.py3CODE
LOWpy12306/helpers/cdn.py10CODE
Cross-Language Confusion4 hits · 28 pts
SeverityFileLineSnippetContext
HIGHpy12306/order/order.py78 'async () => {let i = 3 * 10; while (!csessionid && i >= 0) await new Promise(resolve => setTimeout(resolve,CODE
HIGHpy12306/order/order.py135 'async () => {let i = 3 * 10; while (!csessionid && i >= 0) await new Promise(resolve => setTimeout(resolve,CODE
HIGHpy12306/helpers/func.py177 if value: return trueCODE
HIGHpy12306/helpers/func.py178 return falseCODE
Hyper-Verbose Identifiers21 hits · 24 pts
SeverityFileLineSnippetContext
LOWpy12306/config.py186 def update_configs_from_remote(self, envs, first=False):CODE
LOWpy12306/app.py92 def check_user_account_is_empty(cls):CODE
LOWpy12306/order/order.py577 def make_passenger_ticket_str(self):CODE
LOWpy12306/user/user.py82 def get_passenger_for_members(cls, members, key):CODE
LOWpy12306/user/job.py551 def get_passengers_by_members(self, members):CODE
LOWpy12306/log/query_log.py118 def print_ticket_num_less_than_specified(cls, rest_num, job):CODE
LOWpy12306/log/query_log.py128 def print_ticket_seat_available(cls, left_date, train_number, seat_type, rest_num):CODE
LOWpy12306/log/user_log.py71 def print_user_passenger_init_success(cls, passengers):CODE
LOWpy12306/log/order_log.py45 def print_passenger_did_deleted(cls, passengers):CODE
LOWpy12306/log/order_log.py60 def get_order_success_notification_info(cls, query):CODE
LOWpy12306/query/job.py363 def get_info_of_arrive_station(self):CODE
LOWpy12306/query/job.py372 def get_info_of_train_left_time(self):CODE
LOWpy12306/query/job.py375 def get_info_of_train_arrive_time(self):CODE
LOWpy12306/helpers/notification.py61 def send_voice_code_of_yiyuan(self, phone, name='', content=''):CODE
LOWpy12306/helpers/notification.py93 def send_voice_code_of_dingxin(self, phone, name='', info={}):CODE
LOWpy12306/helpers/notification.py142 def send_email_by_smtp_with_qrcode(self, to, title, qrcode_path):CODE
LOWpy12306/helpers/OCR.py32 def get_img_position_by_ruokuai(self, img):CODE
LOWpy12306/helpers/OCR.py43 def get_image_position_by_offset(self, offsets):CODE
LOWpy12306/helpers/func.py156def objects_find_object_by_key_value(objects, key, value, default=None):CODE
LOWpy12306/helpers/func.py171def array_dict_find_by_key_value(data, key, value, default=None):CODE
LOWpy12306/helpers/func.py181def sleep_forever_when_in_test():CODE
Excessive Try-Catch Wrapping20 hits · 21 pts
SeverityFileLineSnippetContext
LOWpy12306/order/order.py139 except Exception as e:CODE
LOWpy12306/order/order.py143 except Exception:CODE
LOWpy12306/order/order.py147 except Exception:CODE
LOWpy12306/order/order.py214 except Exception:CODE
LOWpy12306/user/job.py177 except Exception:CODE
LOWpy12306/user/job.py192 except Exception as e:CODE
LOWpy12306/user/job.py200 except Exception as e:CODE
LOWpy12306/user/job.py275 except Exception as e:CODE
LOWpy12306/user/job.py355 except Exception:CODE
LOWpy12306/user/job.py381 except Exception:CODE
LOWpy12306/user/job.py622 except Exception:CODE
MEDIUMpy12306/user/job.py251def download_code(self):CODE
LOWpy12306/query/query.py150 except Exception:CODE
LOWpy12306/query/query.py176 except Exception:CODE
LOWpy12306/query/query.py216 except Exception:CODE
LOWpy12306/helpers/notification.py139 except Exception as e:CODE
LOWpy12306/helpers/notification.py179 except Exception as e:STRING
LOWpy12306/helpers/notification.py226 except Exception as e:STRING
LOWpy12306/helpers/notification.py236 except Exception as e:STRING
LOWpy12306/helpers/request.py52 except Exception:CODE
Deep Nesting11 hits · 11 pts
SeverityFileLineSnippetContext
LOWpy12306/config.py186CODE
LOWpy12306/order/order.py494CODE
LOWpy12306/cluster/cluster.py202CODE
LOWpy12306/user/job.py162CODE
LOWpy12306/user/job.py360CODE
LOWpy12306/user/job.py551CODE
LOWpy12306/query/query.py155CODE
LOWpy12306/query/job.py113CODE
LOWpy12306/query/job.py201CODE
LOWpy12306/helpers/request.py81CODE
LOWpy12306/helpers/qrcode.py6CODE
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWpy12306/web/static/js/vendor.aebd1de04bf90e88d9c7.js12var n=Object.freeze({});function i(e){return void 0===e||null===e}function r(e){return void 0!==e&&null!==e}function o(eCODE
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippetContext
LOWpy12306/query/query.py221 self.request_device_id(True)COMMENT