Java function annotation automatic generation method based on program analysis

A technique of automatic generation and program analysis, applied in software and computer fields, to solve problems such as accuracy, understandability, and fluency defects

Active Publication Date: 2021-03-02
NANJING UNIV
View PDF9 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

At the same time, common problems in the process of distributed collaborative development are: when developers develop or review code, they often spend more time understanding the code written by other developers
However, the previous work did not make full use of the information contained in the project that is beneficial to annotation generation and the advantages of deep learning, resulting in certain defects in the accuracy, comprehensibility and fluency of the generated annotations.

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
  • Java function annotation automatic generation method based on program analysis
  • Java function annotation automatic generation method based on program analysis
  • Java function annotation automatic generation method based on program analysis

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] The present invention specifically comprises the following steps:

[0021] 1) First use the GitHub API to sort the number of Java project Stars, get the top 2000 Java projects, and use the static analysis tool JDT to extract the function information in the project, traverse each statement in each function under each Java class, Extract lexical and grammatical features to form a function information table.

[0022] 2) Enter the project directory and execute [mvn package-DskipTests], compile the project and filter out all the unit tests in it, then generate the compilation process .class file for each Java file, and traverse all methods of the Java class and their Call relationship bytecode, extract the call relationship and call type between functions in it, and form a function call relationship table.

[0023] 3) According to the function modifier, function name, function class name, parameter type and other information, the function is uniquely determined, and the map...

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 relates to a Java function annotation automatic generation method based on program analysis, which comprises the following steps of: firstly, collecting a large number of open source projects on GitHub, and extracting Java function information and a calling relationship based on a program analysis technology to form a training data set; then training a translation model from a function to annotation based on a recurrent neural network technology in the deep learning field, automatically generating annotation for the function, and the effect is obvious; the problems of scarcity, non-standardization, inconsistency and the like of existing function annotations in a current project are effectively solved, and code readability and maintainability are improved.

Description

technical field [0001] The invention belongs to the field of computer technology, especially the field of software technology. The invention proposes a method for automatically generating annotations of Java functions based on program analysis, which can automatically generate annotations for functions by constructing a recurrent neural network model. It effectively solves the scarcity, irregularity, and inconsistency of existing function annotations in the current project, thereby improving code readability and maintainability. Background technique [0002] With the rapid development of Internet technology and the rapid changes in the software industry, more and more projects have begun to use the distributed collaborative development model. Developers usually create their own branches, develop on their own branches, and then merge the branches into the main branch. In this way, the characteristics of distributed development can be utilized to the greatest extent, and dev...

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/73G06N3/04G06N3/08G06F8/30
CPCG06F8/73G06N3/08G06F8/315G06N3/045
Inventor 许蕾周航
Owner NANJING 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