Font Size: a A A

Research On Code Comprehension Based On Deep Learning

Posted on:2021-07-23Degree:MasterType:Thesis
Country:ChinaCandidate:Y Y LiFull Text:PDF
GTID:2518306047986589Subject:Master of Computer Engineering
Abstract/Summary:PDF Full Text Request
Code review is an indispensable manual software testing method in the development of high-reliability embedded software.In recent years,with the increase in the complexity of software and hardware and the diversity of development needs,the traditional manual code review method has gradually failed to meet the existing engineering development needs in terms of efficiency.In order to reduce the pressure on reviewers and improve efficiency,code review urgently needs breakthroughs in technology.At the same time,the AI technology represented by deep learning has shined in many fields such as CV,NLP,robotics,etc.,which has made scholars notice its wide practicality.In recent years,some researchers have used machine learning in code comprehension and achieved good results.Methods based on machine learning have gradually become the mainstream in the field of code comprehension.Although deep learning technology has achieved great results in various fields,there is almost no precedent for its application in high-reliability software code review.Our research aims to start from the complex issues in code review work and actively explore the possibility of applying deep learning technology to code review work.The research content consists of two parts,one is the feasibility analysis of deep learning applied to high-reliability software code review,and the other is the design and implementation of program understanding methods based on deep learning.In the feasibility analysis research of applying deep learning to high-reliability software code review,starting from the actual work of high-reliability embedded software code review,this research deeply investigates many aspects of the code review and the work process.While summarizing the theoretical knowledge of code review and code comprehension,this study sorts out the development of related technologies and analyzes the feasibility and application prospects of deep learning technology in code review.In the research on the design and implementation of the code comprehension method based on deep learning,this research is based on the cognitive learning model,and proposes a code comprehension method to solve the common code comprehension problem in code review-the source code function classification problem.This proves the applicability of deep learning technology in code review.This research divides the code comprehension in the source code function classification task of code review into two subtasks,namely program recognition and program classification.In order to achieve an algorithm that can accomplish these two tasks,this research uses attention network and convolutional neural network algorithms.Program recognition algorithms can convert codes into code semantic feature vectors,and program classification algorithms use these feature vectors for program classification.In order to verify the performance of the proposed algorithm,this research used a total of 30M open source code in the experiment to test the effect of the proposed algorithm.It proved that the program recognition algorithm proposed in this study has the potential to classify source code,and its classification accuracy on a smaller test set has reached nearly 70%.The program classification algorithm has achieved better classification results in actual code classification tasks,and has obtained a considerable improvement compared with the text-based convolutional neural network classification algorithm.This not only proves that the program understanding method proposed in this research is effective,but also verifies the application potential of deep learning technology in code review work;This research has verified the feasibility and potential of deep learning code understanding in code review in theory and practice.We believe it is a meaningful exploration of high-reliability embedded software code review.
Keywords/Search Tags:code review, code comprehension, code classification, embedded software, deep learning
PDF Full Text Request
Related items