SGT: Aging-related bug prediction via semantic feature learning based on graph-transformer
Journal of Systems and Software, 2024•Elsevier
Software aging, characterized by an increasing failure rate or performance decline in long-
running software systems, poses significant risks including financial losses and potential
harm to human life. This is primarily attributed to the accumulation of runtime errors,
commonly referred to as aging-related bugs (ARBs). ARBP aims to detect and address
ARBs before software release, optimizing testing resource allocation. However, ARBP's
effectiveness relies heavily on dataset quality. Prior research often relied on manually …
running software systems, poses significant risks including financial losses and potential
harm to human life. This is primarily attributed to the accumulation of runtime errors,
commonly referred to as aging-related bugs (ARBs). ARBP aims to detect and address
ARBs before software release, optimizing testing resource allocation. However, ARBP's
effectiveness relies heavily on dataset quality. Prior research often relied on manually …
Abstract
Software aging, characterized by an increasing failure rate or performance decline in long-running software systems, poses significant risks including financial losses and potential harm to human life. This is primarily attributed to the accumulation of runtime errors, commonly referred to as aging-related bugs (ARBs). ARBP aims to detect and address ARBs before software release, optimizing testing resource allocation. However, ARBP’s effectiveness relies heavily on dataset quality. Prior research often relied on manually designed metrics that lack semantic features, resulting in low prediction accuracy. Some studies construct models to learn semantic features from source code, but typically focus on token-level features from abstract Syntax Trees, neglecting critical topological and functional connections. In this paper, we introduce the SGT model, an ARBP method based on Graph-Transformer. This model efficiently extracts semantic information and logical structures from source code, capturing data dependencies and program dependencies. We also propose sub-graph sampling based on node degree to reduce structural complexity and apply random oversampling to address class imbalance. Experiments on three projects demonstrate notable improvements. For instance, SGT achieved F1 scores of 0.726 and 0.706 on Linux and MySQL, respectively. Compared to ALW, SGT shows a 12.3% and 6.8% improvement on Linux and MySQL.
Elsevier