Supercharge Your Innovation With Domain-Expert AI Agents!

Graph-based statement-level program repairing method and system

A repair method, statement-level technology, applied in the direction of program code conversion, model-driven code, other database retrieval, etc., can solve the problems of unable to retain grammatical and semantic information, ignoring implicit semantics, low learning efficiency, etc., to improve the model Universality, avoiding inefficiencies, and accelerating the effect of training convergence

Pending Publication Date: 2021-12-03
YANGZHOU UNIV
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although NMT-based methods have great advantages over traditional techniques, there are still deficiencies in such methods.
The code representations adopted by current NMT-based methods are still unable to preserve rich syntactic and semantic information
Meanwhile, since they tend to represent the source code as a sequence and apply a sequence-to-sequence model to generate patches, such methods ignore the implicit semantics in the source code
Additionally, these models learn inefficiently when the input sequence is too long

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
  • Graph-based statement-level program repairing method and system
  • Graph-based statement-level program repairing method and system
  • Graph-based statement-level program repairing method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0060] In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, not to limit the present application.

[0061] In one embodiment, combined with figure 1 , the present invention proposes a graph-based statement-level program repair method, the method comprising the following steps:

[0062] Step 1, dataset extraction. Crawl data from the open source community to build pre-trained data sets for training translation models and programming language models;

[0063] Step 2, training data set preprocessing and programming language model pre-training. Use the pre-trained data set to train the programming language model, and preprocess the training data set for training the translation model to 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 discloses a graph-based statement-level program repairing method and system, and belongs to the field of software debugging. The method comprises the following steps of: firstly, extracting defect codes, patches and standard codes to construct training and pre-training data sets; preprocessing the data sets and pre-training a programming language model; performing data embedding by utilizing the programming language model, and constructing and training a translation model based on a Graph-to-Sequence architecture; and generating a patch of a defect statement by using the trained translation model. According to the invention, codes are represented by using a code graph fusing various features of a source code, the code specification is learned by using a pre-trained model, the training convergence speed of the translation model is increased, the context representation of a defect statement can be optimized, the translation model can better learn grammar and semantic association information between the defect statement and a correct statement, so that the semantic meaning of defect repair is better represented, a high-quality repair patch following the programming language specification is generated to automatically repair a defect program, and the cost of defect repair can be greatly reduced.

Description

technical field [0001] The invention belongs to the field of software debugging, in particular to a graph-based statement-level program repair method and system. Background technique [0002] Program defects are inevitable in the software development process, and developers need to spend a lot of energy to fix these defects. As the scale of modern software continues to increase, the number of program defects and the difficulty of repairing increase accordingly, and program defects have caused huge economic losses to enterprises. To improve software reliability and reduce development costs, researchers have proposed many automatic program repair (APR) techniques to automate defective programs. [0003] Traditional defect repair methods rely on expert knowledge and require domain experts to spend a lot of effort to build repair templates or repair strategies, so they do not have the ability to generalize. Due to the recurring characteristics of software defects, the research...

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/35G06F8/41G06F8/72G06F16/951G06K9/62
CPCG06F8/35G06F8/42G06F8/72G06F16/951G06F18/214
Inventor 李斌唐奔孙小兵薄莉莉
Owner YANGZHOU UNIV
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More