Operations 16 min read

How Bugly Auto‑Fix Uses AI to Turn Crash Discovery into One‑Click Code Repairs

Bugly Auto‑Fix tackles the long‑standing crash‑management loop of incomplete discovery and slow remediation by automatically identifying high‑impact crashes, performing deep root‑cause analysis with AI, generating fix code, and submitting merge requests, leaving developers only to approve the changes.

Tencent TDS Service
Tencent TDS Service
Tencent TDS Service
How Bugly Auto‑Fix Uses AI to Turn Crash Discovery into One‑Click Code Repairs

Problem: Incomplete Crash Discovery and Slow Fixes

Bugly monitors thousands of apps and finds that many crashes are missed in testing and that teams focus only on top crashes, leaving long‑tail issues unnoticed. Production crashes can arise from OOM on specific devices, ROM lifecycle differences, or background‑process kills that never appear in test environments.

Data from bugstack 2026 shows a single production bug takes 2‑10 hours to fix, with only 10‑15 % of that time spent writing code; the rest is spent locating the problem. Fix‑time varies widely between senior and junior developers.

Impact of New Releases

New version roll‑outs generate dozens to hundreds of new crash issues. Teams can only address top issues, causing long‑tail crashes to accumulate and potentially explode later.

Bugly Auto‑Fix Solution

The platform closes the loop by automatically discovering crashes, performing deep AI‑driven root‑cause analysis, generating fix code, and creating merge requests (MRs). Developers only need to confirm the fix plan and review the MR.

Automatic Discovery: Uses accumulated crash data to pinpoint issues worth fixing across scenarios such as new‑version releases, metric spikes, and long‑tail backlogs.

Deep Attribution: Combines stack traces, source context, logs, process and thread info, FD data, and user actions to answer “why” a crash happened, not just “where”.

Code Generation & MR Submission: AI produces the patch, runs compilation checks, and opens a separate MR per issue; developers perform code review.

Three Core Capabilities

Capability 1 – Intelligent Scoping: Filters out noise and selects crashes that are newly introduced, cause metric spikes, or are low‑frequency but high‑value for fixing.

Capability 2 – Deep Attribution: Distinguishes logical exceptions (solvable by stack and source) from runtime exceptions that require full runtime context; leverages Bugly’s complete crash metadata (tombstones, ANR traces, memory snapshots, etc.).

Capability 3 – Automated Fix & MR: After developer approval, AI generates code, runs checks, and submits an MR. Options include forced fix, collaborative fix, or falling back to manual repair.

End‑to‑End Workflow

Discover issue → AI analyses root cause → AI proposes fix → Developer confirms plan → AI generates code & opens MR → Developer reviews → MR merged

The workflow repeats for each issue, supports batch confirmation, and records all analysis steps for traceability.

Case Study: New‑Version Crash Repair

After a new release, Bugly scans for added crashes for seven days, continuously updating the report. Issues are labeled as “auto‑fixable”, “needs local analysis”, or “manual fix recommended”. Developers view the generated root‑cause, code, and risk assessment, then approve or request re‑analysis.

For “needs local analysis” issues, developers run a local agent with a single command to analyze the codebase and sync the fix back to the cloud report.

cd xx/skills/bugly-issue-analyze && xx/binaries/python/versions/3.14.3/bin/python3 scripts/run.py report-analyze --product-id xxxxxx --report-id 146 --code-root xx/BuglyProDemo

After confirming the plan, a similar command executes the batch repair.

cd xx/skills/bugly-issue-analyze && xx/binaries/python/versions/3.14.3/bin/python3 scripts/run.py report-repair --product-id xxxxxx --report-id 146 --code-root xx/BuglyProDemo

Applicable Scenarios

New‑version crash influx – full‑scale automated handling.

Historical long‑tail cleanup – prioritize low‑risk, high‑value fixes.

Metric‑alert emergency – fast identification and remediation of top‑impact crashes.

Daily development‑stage issues – automatic post‑build scanning to prevent regressions.

The goal is to fix problems while they are still small, preventing them from becoming major incidents.

Bugly (https://bugly.tds.qq.com) is a professional monitoring and analysis platform that provides end‑to‑end, AI‑enhanced crash management for developers.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DevOpsroot cause analysisCrash ManagementBuglyAutomated Code RepairAI Auto Fix
Tencent TDS Service
Written by

Tencent TDS Service

TDS Service offers client and web front‑end developers and operators an intelligent low‑code platform, cross‑platform development framework, universal release platform, runtime container engine, monitoring and analysis platform, and a security‑privacy compliance suite.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.