Deep Forest and Pruned Syntax Tree-Based Classification Method for Java Code Vulnerability
Jiaman Ding,
Weikang Fu and
Lianyin Jia ()
Additional contact information
Jiaman Ding: Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming 650500, China
Weikang Fu: Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming 650500, China
Lianyin Jia: Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming 650500, China
Mathematics, 2023, vol. 11, issue 2, 1-18
Abstract:
The rapid development of J2EE (Java 2 Platform Enterprise Edition) has brought unprecedented severe challenges to vulnerability mining. The current abstract syntax tree-based source code vulnerability classification method does not eliminate irrelevant nodes when processing the abstract syntax tree, resulting in a long training time and overfitting problems. Another problem is that different code structures will be translated to the same sequence of tree nodes when processing abstract syntax trees using depth-first traversal, so in this process, the depth-first algorithm will lead to the loss of semantic structure information which will reduce the accuracy of the model. Aiming at these two problems, we propose a deep forest and pruned syntax tree-based classification method (PSTDF) for Java code vulnerability. First, the breadth-first traversal of the abstract syntax tree obtains the sequence of statement trees, next, pruning statement trees removes irrelevant nodes, then we use a depth-first based encoder to obtain the vector, and finally, we use deep forest as the classifier to get classification results. Experiments on publicly accessible vulnerability datasets show that PSTDF can reduce the loss of semantic structure information and effectively remove the impact of redundant information.
Keywords: vulnerability classification; abstract syntax tree; code representation; deep forest (search for similar items in EconPapers)
JEL-codes: C (search for similar items in EconPapers)
Date: 2023
References: View references in EconPapers View complete reference list from CitEc
Citations:
Downloads: (external link)
https://www.mdpi.com/2227-7390/11/2/461/pdf (application/pdf)
https://www.mdpi.com/2227-7390/11/2/461/ (text/html)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:gam:jmathe:v:11:y:2023:i:2:p:461-:d:1036703
Access Statistics for this article
Mathematics is currently edited by Ms. Emma He
More articles in Mathematics from MDPI
Bibliographic data for series maintained by MDPI Indexing Manager ().