Graph Neural Network for Critical Class Identification in Software System
摘要
Most performance enhancements in software engineering practice are made by optimizing a few key codes. A key class identification method for software systems based on a graph neural network is proposed to identify these key codes in software systems effectively. First, a directed weighted class dependency network with classes as nodes and dependencies as edges is constructed based on the dependency degree in the software system and the dependency relationship between classes. Second, the initial feature of class nodes is the embedding vector generated by network embedding learning for each class node. Then, the GraphSAGE model, which is used to learn the hidden features of class nodes, is further explained. Moreover, a multi-layer perceptron turns the learned feature vector into a scalar score. By descending sorting the node scores, the key classes are then identified. Two open datasets are used to test the proposed approach. The experimental results show that our proposed method can improve the recall and accuracy of the top 10% of key node classes by more than 10%, compared with the current work and three graph neural network methods.