GraphSAGE and LDA-based software defect prediction method
The invention provides a defect prediction method based on GraphSAGE and LDA, belongs to the technical field of computers, and solves the problem that a manual feature method does not consider natural language information software defect prediction of code items. According to the technical scheme, t...
Saved in:
Main Authors | , , , , |
---|---|
Format | Patent |
Language | Chinese English |
Published |
26.05.2023
|
Subjects | |
Online Access | Get full text |
Cover
Summary: | The invention provides a defect prediction method based on GraphSAGE and LDA, belongs to the technical field of computers, and solves the problem that a manual feature method does not consider natural language information software defect prediction of code items. According to the technical scheme, the method comprises the following steps: (1) collecting a defect instance data set from Githhub, and carrying out preprocessing operation on the data set; (2) extracting subject description information of the project by using LDA; (3) analyzing the code snippets into an abstract syntax tree, and extracting a relation matrix between tokens; (4) the token and the subject term information are coded into feature vectors through BERT, and the vectors are spliced; (5) inputting the vector into GraphSAGE training to obtain the feature representation of each node; and (6) inputting the node representation into an mlp classifier, and performing defect prediction. The method has the beneficial effect that the reliability and |
---|---|
Bibliography: | Application Number: CN202310211242 |