A Method of Automatically Generating Functional Descriptive Comments for Program Source Code

An automatic generation and source code technology, applied in the computer field, can solve the problems of source code feature extraction defects, failure to extract programming language features and characteristics, etc., to achieve the effect of promoting maintenance and development, and comprehensive description
CN108345457BInactive Publication Date: 2021-03-09SHANGHAI JIAOTONG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI JIAOTONG UNIV
Publication Date
2021-03-09
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention provides a method for automatically generating function descriptive annotations for program source codes, comprising: step 1: extracting features of source code; step 2: analyzing the extracted features, and automatically expressing features about functions in natural language. The invention can automatically generate corresponding function descriptive comments for various programming languages, well expresses the functions and functions of source codes, and can effectively promote software maintenance and development. Compared with the prior art, the present invention has the following beneficial effects: 1. Compared with other methods, the present invention can characterize the characteristics of the source code more comprehensively by processing the parse tree of the source code and extracting features, not only 2. The present invention no longer relies on fixed templates when generating annotations. Compared with other methods, it is more flexible and diverse, and the generated annotations can also express more functions, and the description is more comprehensive; 3. The present invention is applicable to Various programming languages ​​are universal.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the field of computer technology, in particular to a method for automatically generating function descriptive annotations for program source codes. Background technique

[0002] With the rapid development of the Internet, software development has become more and more popular and accompanied by a large number of open source code libraries. Reading and understanding other people's source code in the software development process is a time-consuming and labor-intensive task. If the source code can have corresponding functional descriptive comments, this process will be greatly simplified and the speed of software development will be accelerated. At the same time, perfect comments can also improve the maintainability of the software system. However, in the current situation, less than 20% of the code has corresponding comments, so the majority of program developers urgently need a method to automatically generate functional descrip...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More