Stack Trace-Based Crash Deduplication with Transformer Adaptation

Md Afif Al Mamun, Gias Uddin, Lan Xia, Longyu Zhang · 2025

Read Stack Trace-Based Crash Deduplication with Transformer Adaptation by Md Afif Al Mamun, Gias Uddin, Lan Xia, Longyu Zhang (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-19449.txt.

Introduction

Software crashes flood development teams with duplicate reports of the same bug. Mamun, Uddin, Xia, and Zhang build dedupT, a system that sorts crash reports by reading their stack traces, the lists of function calls recorded when a program fails. Older methods compare traces as plain text or judge each frame alone, missing how the frames fit together.

Their method first adapts a pretrained language model to the special language of stack traces. A small ranking network then uses those rich representations to order likely duplicates. On four public datasets, dedupT beat both deep learning rivals and classic methods at ranking duplicates and spotting truly new crashes. Ranking quality rose by more than fifteen percent over the best learning baseline. The authors say the tool can cut the manual triage work that slows bug fixing.

Catalog record

CREATORMd Afif Al Mamun, Gias Uddin, Lan Xia, Longyu Zhang
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE59 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2508-19449

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Stack Trace-Based Crash Deduplication with Transformer Adaptation Md Afif Al Mamun, Gias Uddin, Lan Xia, Longyu Zhang Abstract Automated crash reporting systems generate large volumes of duplicate reports, overwhelming issue-tracking systems and increasing developer workload. Traditional stack trace-based deduplication methods—relying on string similarity, rule-based heuristics, or deep learning (DL) models—often fail to capture the contextual and structural relationships within stack traces. We propose dedupT , a transformer-based approach that models stack traces holistically rather than as isolated frames. dedupT first adapts a pretrained language model (PLM) to stack traces, then uses its embeddings to train a fully-connected network (FCN) to rank duplicate crashes effectively. Extensive experiments on real-world datasets show that dedupT outperforms existing DL and traditional methods (e.g., sequence alignment and information retrieval techniques) in both duplicate ranking and unique crash detection, significantly reducing manual triage effort. On four public datasets, dedupT improves Mean Reciprocal Rank (MRR) often by over 15% compared to the best DL baseline and up to 9% over traditional methods while achieving higher Receiver Operating Characteristic Area Under the Curve (ROC-AUC) in detecting unique crash reports. Our work advances the integration of modern natural language processing (NLP) techniques into software engineering, providing an effective solution for stack trace-based crash deduplication. I Introduction Software issues are generally reported through (1) human-submitted reports and (2) automated crash reports. Human-reported issues typically include textual descriptions detailing the issue, expected and observed behavior, and may include attachments such as images or videos. In contrast, automated crash reports are generated by crash reporting tools (e.g., Sentry 1 1 1 https://sentry.io/ , CrashPad 2 2 2 https://chromium.googlesource.com/crashpad/crashpad/ ) embedded within software or large-scale test pipelines, which log failures directly into an issue-tracking system (ITS). However, these automated systems often overwhelm ITS platforms by generating numerous duplicate crash reports for the same issue, requiring developers to manually review and triage them, which is a time-consuming process. For instance, Mozilla Firefox received 2.2 million issues in the first week of 2016, the majority being duplicates [ 1 ] , while 72% of crash reports in the IntelliJ Platform were found to be duplicates [ 2 ] . In such scenarios, grouping similar crashes together is essential, a process known as crash deduplication . Unlike human-written reports with detailed descriptions, automated crash reports primarily contain technical data like stack traces and crash dumps. In such cases, stack traces serve as the key source for identifying duplicate issues [ 3 , 4 , 5 , 2 , 6 ] . A stack trace S is a recorded snapshot of the sequence of function or method calls that were active at the time an error or exception occurred. Formally, a stack trace can be represented as an ordered list of frames or stack frames S=[f_{1},f_{2},...,f_{n}] , where each frame f_{i} corresponds to a function or method call in the execution stack. Each frame f_{i} typically contains information like the function/method name, file location, and line number where the call was made. Figure 1 and 2 include two examples of stack traces for Java and C++, respectively. ⬇ 1 Exception in thread "main" java . lang . NullPointerException 2 at com . example . MyClass . myMethod ( MyClass . java :10) 3 at com . example . MyClass . main ( MyClass . java :5) Fig. 1 : Example of a Java stack trace. ⬇ 1 #0 0 x40990b in crash_func () at example . c :6 2 #1 0 x40250a in inter_function () at example . c :10 3 #2 0 x40150a in main () at example . c :15 Fig. 2 : Example of C++ stack trace. Stack traces provide debugging information by capturing the call hierarchy leading to a failure [ 7 , 8 ] . While numerous stack-trace-based crash deduplication (STCD) methods exist, accuracy remains a challenge. Existing approaches mostly analyze stack frames in isolation before applying matching algorithms [ 2 , 3 , 4 , 9 ] , while some deep learning (DL) models learn frame or subframe-level representations independently before aggregating them [ 6 , 10 ] . However, we argue that stack traces should be analyzed in context rather than as isolated frames. This is similar to how developers often prioritize the topmost frames to diagnose root causes rather than examining each frame independently [ 7 ] . A similar contextual approach can improve the accuracy of crash deduplication. Recent advancements in transformer architecture [ 11 ] have revolutionized contextual analysis in textual contents. Pretrained language models (PLMs) [ 12 , 13 , 14 , 15 ] have achieved state-of-the-art (SOTA) performance across a variety of contextual NLP tasks, including sentiment analysis, text summarization, and semantic similarity [ 16 , 17 , 18 ] . Among these, SentenceBERT (SBERT) [ 19 ] stands out due to its ability to generate high-quality sentence or passage-level embeddings for textual-similarity analysis while being exponentially faster than the original BERT [ 12 ] . To the best of our knowledge, there is a lack of exploration into how these models can be specifically adapted to understand nuances in stack traces for crash deduplication. We propose dedupT ( dedup lication with T ransformer), an approach that systematically adopts transformer-based language models for crash deduplication. However, instead of simply applying a transformer model on a stack trace, we offer several improvements. First, we heuristically determine the optimal number of topmost relevant frames in a stack trace. Second, we adapt the underlying embedding model by tuning on stack traces only. We evaluated dedupT on four widely-used literature datasets and compared the results against 10 popular literature baselines. Overall, dedupT outperformed all baseline methods, including sequence matching, information retrieval (IR), and deep learning (DL) approaches, in Mean Reciprocal Rank (MRR) and various Recall Rate@k metrics, demonstrating the effectiveness of the transformer-based approach for STCD. Specifically, it achieved MRR gains of over 9% and 15% compared to the best IR and DL baselines, respectively. Additionally, dedupT proved significantly more effective in identifying unique crashes, achieving an ROC-AUC improvement of over 22% compared to most alignment-based methods, while remaining competitive with other DL models. II Related Work Sequence matching and information retrieval based techniques. Stack trace-based crash deduplication has been fairly studied in the literature. Early approaches mostly address this as a string matching problem. Brodie et al. [ 4 ] proposed Needleman-Wunch based algorithm to compare stack traces. Modani et al. [ 20 ] explored different methods for comparing stack traces including prefix matching, edit distance, etc., along with an indexing strategy for efficient retrieval. Bartz et al. [ 21 ] used logistic regression, and Dhaliwal et al. [ 5 ] introduced a two-step approach: generating stack trace signatures followed by Levenshtein distance computation to enhance similarity detection. These methods primarily rely on lexical matching, which may struggle with structurally different yet semantically similar traces. Many approaches also adopted TF-IDF to find similar crash reports [ 22 , 1 , 2 ] . Among these, Tracesim [ 23 ] is the first to combine TF-IDF, Levensthein distance, and machine learning (ML) to optimize hyperparameters. The same authors later proposed another version of Tracesim [ 2 ] that provides a pipeline to evaluate a lot of existing approaches, including

Read the complete text