Software Defect Prediction via Positional Hierarchical Attention Network (S)

Xinyan Yi, Hao Xu, Lu Lu, Quanyi Zou, Zhanyu Yang · Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering · 2023

Software Defect Prediction (SDP) aims to identify defect-prone modules in advance to ensure software quality.In SDP research based on deep learning, the mainstream approach is to extract deep semantic features from an Abstract Syntax Tree (AST).Theoretically, the AST as a bi-dimensional structure encloses information at the node level, fragment level, and entire tree level.However, most existing research serializes the whole AST without considering the expression at different granularities.To address this limitation, we introduce a positional hierarchical attention network (PHAN) that acquires semantic features by simultaneously considering contexts between nodes and paths.Specifically, our model incorporates attention mechanisms to capture information of varying importance at separate hierarchies, and relative position representations to distinguish the contributions of different paths.Experimental results demonstrate that PHAN significantly outperforms existing baseline methods.

Read the paper · More papers on PaperTik