Incremental code defect detection method and system based on graph network model
A network model and code defect technology, applied in the incremental code defect detection method and system field based on the graph network model, can solve problems such as low timeliness and insufficient representation of defect codes
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment
[0102] combine figure 1 , this implementation presents an incremental code defect detection method based on graph network model, which specifically includes model training phase S1 and testing phase S2.
[0103] The model training phase S1 includes the following specific steps:
[0104] S1.1 Data processing: Collect Commit information in the software development process, obtain the corresponding Java source code in the Commit information, and mark the Java source code to obtain a data set;
[0105] S1.2 Code composition: In units of functions, the Java source code in the data set obtained in S1.1 is parsed into AST, and the AST composition is performed to obtain a training set in graph data format;
[0106] S1.3 Construct a graph convolutional neural network model: use the training set to train the GCN network;
[0107] Model testing phase S2 includes the following steps:
[0108] S2.1 Incremental code generation: using the function as a unit, using the method of graph simi...
example 1
[0126] Following the above scheme, in the incremental code defect detection experiment, a total of 20 versions of historical data of 6 projects were selected. The description of each project and the specific version number used are shown in Table 1. We select the historical version data and divide them into training set and test set according to 8:2, and then use the current version data as the test data to obtain the results in Table 2, where acc represents the accuracy of the model, and f1 is the harmony of accuracy and recall The average value is a comprehensive evaluation index, and recall is the recall rate. From the table below, it can be found that the defect detection accuracy of the GNN model in these 6 items can reach 52.1% at the lowest and 77.2% at the highest. Both machine learning models use manually extracted features, and we control the test data of GCN, LR, and TNB by using VPT-based correlation code analysis. Finally, it is found that GCN is better than tradi...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More - R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com



