Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Code readability evaluation method based on multi-dimensional features and hybrid neural network

A hybrid neural network and readability technology, applied in the field of code readability evaluation based on multi-dimensional features and hybrid neural networks, can solve the problems of high cost, inability to guarantee accuracy, low efficiency, etc. Strong generalization ability, easy to use effect

Pending Publication Date: 2021-02-26
BEIJING UNIV OF TECH
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] However, the existing methods for evaluating code readability mainly rely on the subjective judgment of front-line software development engineers (as reviewers) in the code review process, which not only has problems of low efficiency and high cost, but also cannot guarantee accuracy

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
  • Code readability evaluation method based on multi-dimensional features and hybrid neural network
  • Code readability evaluation method based on multi-dimensional features and hybrid neural network
  • Code readability evaluation method based on multi-dimensional features and hybrid neural network

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The present invention will be further described in detail below in conjunction with specific implementation examples and with reference to the accompanying drawings.

[0029] The present invention takes the readability of predicting a Java code fragment (as shown in the table below) as an example, and the specific implementation is as follows:

[0030]

[0031] Step 1: Character-level representation.

[0032] Step 1.1: Parsing the shown code snippet as a sequence of characters yields:

[0033] {p,u,b,l,i,c,,i,n,t,...}

[0034] Among them, "" represents a space.

[0035] Step 1.2: Encode the character sequence obtained in Step 1.1 using ASCII values ​​to obtain:

[0036] {112,117,98,108,105,99,32,105,110,116,…}

[0037] Step 1.3: Alignment, convert the numerical sequence obtained in step 1.2 into a 50×300 two-dimensional matrix to obtain:

[0038]

[0039] Step 2: Term-level representation.

[0040] Step 2.1: Use srcML and regular expressions to parse the sho...

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 discloses a code readability evaluation method based on multi-dimensional features and a hybrid neural network, which takes a code fragment as input and takes prediction of a readabilitylevel as output, and belongs to the fields of software theory, software engineering and service. According to the method, by integrating and applying the advantages of various single neural networksand source code representation modes, the readability information contained in the code snippets is mined from different perspectives of structure, semantics and the like, and finally, the quantitative evaluation of the code readability is realized. Compared with a traditional method, the method has the advantages that the accuracy and the generalization ability are remarkably improved, and it isproved that introduction of the multi-dimensional features and the hybrid neural network is of great significance in code readability evaluation tasks.

Description

technical field [0001] The invention belongs to the field of software theory, software engineering and services, and relates to a code readability evaluation method based on multi-dimensional features and mixed neural networks. By integrating and using the advantages of various single neural networks and source code representation methods, the structure Mining the readability information contained in the source code from different angles such as , semantics, etc., forming a breakthrough in the quantitative evaluation technology of code readability. The invention can assist front-line software development engineers to identify and optimize poorly readable codes, thereby further improving the collaboration efficiency of the development team and reducing maintenance costs in the long-term software iteration process. Background technique [0002] With the development of information technology, software has gradually become an indispensable infrastructure of society and is applie...

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/41G06F40/126G06N3/04G06N3/08
CPCG06F8/427G06F8/44G06F40/126G06N3/08G06N3/048G06N3/045
Inventor 米庆于洋
Owner BEIJING UNIV OF TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products