Skip to content
Open access

Mining Long Tail Bugs: Identifying Rare and Overlooked Issues in Code

Jun 2026 · Proceedings of the ACM on Software Engineering · Vol 3, pp. 943 - 966 · 0 citations · 87 references

TL;DR

LTMiner, which mines rare patterns from large-scale projects and detects potential bugs by checking for violations of these patterns, effectively curbs pattern explosion and false positives, uncovering previously unknown bugs in large-scale projects at an acceptable cost.

Abstract

Using data mining to extract frequent code patterns for bug detection has proven effective. However, prior studies have overlooked the prevalence of infrequent (rare) patterns, even though violations of such patterns can also lead to bugs. In this paper, we present LTMiner, which mines rare patterns from large-scale projects and detects potential bugs by checking for violations of these patterns. In practice, rare patterns far outnumber frequent ones and lack strong statistical support. Consequently, we face a pattern explosion, and many rare patterns and their violations are uninteresting. LTMiner addresses this by using instance-based ranking and filtering to prioritize violations of rare patterns. It further employs a large language model (LLM) as a domain expert to audit top-ranked violations; mined information supports in-context learning, and task decomposition and self-reflection mitigate possible hallucinations. This pipeline effectively curbs pattern explosion and false positives, uncovering previously unknown bugs in large-scale projects at an acceptable cost. Applied to Linux kernel 6.12.1, LTMiner identified 42 previously unknown bugs, 27 of which have been confirmed by developers. These results indicate that, although rare-pattern bugs are sparse, a considerable number remain and exhibit a non-negligible long tail. We believe that rare-pattern bugs constitute a promising blue ocean for bug detection.

Read PDF

Similar papers

#software testing Open access Nov 2026

Exception handling bugs in Python: An empirical study of root causes, fix patterns, and anti-patterns

Analysis of exception handling bugs in Python projects reveals systematic relationships between root causes and repair strategies, indicating that exception handling bugs often follow predictable patterns.

Jairo Souza, Eric Coelho, J. Correia et al. · 0 citations
Book Open access Jul 2026

An Empirical Study on the Prevalence of Rare Logs and its Impact of Log Parsing

It is shown that strong overall accuracy can coexist with poor performance on rare but operationally critical log templates, and the need for evaluation protocols that explicitly account for template frequency when assessing log parsers in real-world settings is highlighted.

Sepideh Hodaeian · 0 citations
Jul 2026

How Do LLMs Read Bug Reports? An Empirical Study of Attention in LLMs for Automated Program Repair

The first empirical study of attention patterns in LLM-based program repair is presented, providing interpretable insights into how models process bug reports and where their attention is concentrated during repair, and indicates that stronger alignment between model attention and developer-identified key sections and...

Ramtin Ehsani, Irene Manotas, Saurabh Pujar et al. · 0 citations
Open access Aug 2026

Selecting and Combining Large Language Models in Scalable Code Clone Detection

Findings indicate that ensembling approaches can be statistically significant and effective on larger datasets, where the best-performing ensemble improved performance by 37% over its individual LLMs on the commercial large-scale code.

M. Chochlov, Gul Aftab Ahmed, J. Patten et al. · 1 citation
Open access Aug 2026

Improving Bug Detection in LLM-Generated Unit Tests: Revisiting Test-Oracle Reliability Across Modern Large Language Models

This paper presents a formal mathematical model for categorizing the outcome of generated-tests into four classes, a couple of basic metrics: Bug-Revealing Rate (BRR) and Bug-Validating Rate (BVR); and two basic statistical tests to ensure that the results are rigorous.

Zeyad Farooq Lutfi · 0 citations
Open access Aug 2026

An Exploratory Study on Code Smells Detection and Refactoring using LLMs

This paper focuses on four common smells and considers five prompts of diverse complexity, asking the model for detecting and removing the identified code smells, and suggests that general-purpose LLMs cannot be reliably used for that.

Giorgia Paisi, Francesca Arcelli Fontana, Bartosz Walter · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.