Method for automatically generating Java code annotations based on Graph2Seq of deep reinforcement learning

A reinforcement learning and automatic generation technology, applied in the direction of creating/generating source code, etc., can solve problems such as untimely, code label mismatch, error update, etc.

Active Publication Date: 2019-07-16
BINHAI IND TECH RES INST OF ZHEJIANG UNIV
View PDF4 Cites 37 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although there are many technologies to help programmers implement and test the developed software, it is a labor-intensive task to ensure high-quality code comments during the development process. However, in fact, due to tight project schedules or other reasons, Code annotations often have mismatches, errors, or untimely updates. As a result, developers have to spend a lot of time understanding the functions of the code in the later maintenance phase.

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
  • Method for automatically generating Java code annotations based on Graph2Seq of deep reinforcement learning
  • Method for automatically generating Java code annotations based on Graph2Seq of deep reinforcement learning
  • Method for automatically generating Java code annotations based on Graph2Seq of deep reinforcement learning

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0066] It should be noted that, in the case of no conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.

[0067] In describing the present invention, it should be understood that the terms "center", "longitudinal", "transverse", "upper", "lower", "front", "rear", "left", "right", " The orientations or positional relationships indicated by "vertical", "horizontal", "top", "bottom", "inner" and "outer" are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and Simplified descriptions, rather than indicating or implying that the device or element referred to must have a particular orientation, be constructed and operate in a particular orientation, and thus should not be construed as limiting the invention. In addition, the terms "first", "second", etc. are used for descriptive purposes only, and should not be understood ...

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 method for automatically generating Java code annotations based on Graph2Seq of deep reinforcement learning At the encoder end, codes are firstly converted into a form of a code graph, a graph structure is utilized to express structured information of the codes, and then a graph neural network is utilized to encode a program graph to obtain structured semantic informationof the codes. At the decoder end, the decoder improved based on the deep reinforcement learning framework is used for obtaining the natural language annotation content corresponding to the decoder, the problem of high deviation caused by the fact that no real sequence word guidance exists in the reasoning stage in a traditional method is solved, and therefore code annotation natural generation isaccurate and natural.

Description

technical field [0001] The invention belongs to the technical field of automatic generation of Java code annotations, and in particular relates to a method for automatically generating Java code annotations based on Graph2Seq of deep reinforcement learning. Background technique [0002] With the rapid development of the Internet, computer software, mobile phone applications, etc. have become the pillar products of the Internet era. It has been widely used in all aspects of people's lives. Countless outstanding developers have participated in it and contributed a large number of high-level codes. Code is a language that is close to machine language, with abstraction, complexity, and variability, and is inherently difficult to understand. With the rapid expansion of software scale, the ever-increasing code development and maintenance work has become a problem faced by programmers. How to assist developers to understand the code to help them better complete the development pro...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/30
CPCG06F8/30
Inventor 李莹高建伟张凌飞
Owner BINHAI IND TECH RES INST OF ZHEJIANG 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