Program source code automatic generation function descriptive annotation method

A technology of automatic generation and source code, applied in the computer field, can solve problems such as defects in source code feature extraction, failure to extract programming language features and characteristics, etc., to achieve the effect of promoting maintenance and development, and describing comprehensively

Inactive Publication Date: 2018-07-31
SHANGHAI JIAO TONG UNIV
View PDF1 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Iyer (see Iyer, S.; Konstas, I.; Cheung, A.; and Zettlemoyer, L. 2016. Summarizing source code using ing a neural attention model. In ACL, 2073–2083) proposed a method using neural networks The method of training data to ...

Method used

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
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Program source code automatic generation function descriptive annotation method
  • Program source code automatic generation function descriptive annotation method
  • Program source code automatic generation function descriptive annotation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0046] The present invention will be described in detail below in conjunction with specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0047] like figure 1 As shown, a method for automatically generating function descriptive annotations for program source codes provided by the present invention includes:

[0048] Step 1: Extract the features of the source code;

[0049]Step 2: Analyze the extracted features, and automatically express the features about functions in natural language.

[0050] Step 1 includes:

[0051] Step 1.1: Construct the corresponding parse tree according to the structural information of the source code and the c...

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

PUM

No PUM Login to view more

Abstract

The invention provides a program source code automatic generation function descriptive annotation method. The method comprises the steps of 1, extracting features of source codes; and 2, analyzing theextracted features, and expressing the features about functions automatically by using a natural language. According to the method, corresponding function descriptive annotations can be automaticallygenerated for various different program design languages; the effects and functions of the source codes are well expressed; and the maintenance and development of software can be effectively promoted. Compared with the prior art, the method has the following beneficial effects that 1, an analysis tree of the source codes is processed and the features are extracted, so that the features, not merely the local partial features, of the source codes can be represented more comprehensively in comparison with other methods; 2, the annotation generation no longer depends on a fixed template, so thatthe flexibility and diversity are higher in comparison with other methods, the generated annotation can express more functions, and the description is more comprehensive; and 3, the method is suitablefor various program design languages, and has universality.

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

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F8/41
CPCG06F8/427
Inventor 朱其立梁玉鼎
Owner SHANGHAI JIAO TONG UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products