Supercharge Your Innovation With Domain-Expert AI Agents!

Automatic restoration method for null pointer reference of program dependency graph guided restoration template

A program dependency graph and null pointer technology, applied in the field of candidate patches, which can solve problems such as inaccurate repair locations, large patch search range, and incorrect repair patches.

Pending Publication Date: 2022-04-26
CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] Program defect repair is a tedious and inevitable work in the process of software development and maintenance, which greatly consumes and reduces the energy and efficiency of software developers. Therefore, automatic program repair technology has become a major research hotspot. The current automatic program repair technology is mainly divided into into three phases: defect location, patch generation, and patch verification
The causes of different defects and the defect impact domains are different. A common repair strategy for all program defects will often result in imprecise defect repair locations and inappropriate repair strategies, resulting in a large search range for patches and the repaired The patch is not correct, and the repair efficiency is greatly reduced

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
  • Automatic restoration method for null pointer reference of program dependency graph guided restoration template
  • Automatic restoration method for null pointer reference of program dependency graph guided restoration template
  • Automatic restoration method for null pointer reference of program dependency graph guided restoration template

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] The null pointer reference of the present invention will be further described in detail below in conjunction with examples of the present invention.

[0021] For example, the following code segment:

[0022]

[0023] (a)

[0024]

[0025] (b)

[0026] In the program fragment in (a), a null pointer fault occurs in the method call to the null object parser at line L5. At this time, it is difficult to obtain the correct patch by using the assignment mechanism. In this case, it is necessary to avoid triggering of the null object as much as possible. Through the program dependency analysis, it can be found that the fault statement node is L5, {L6, L7, L9} depends on L5 through the directed edge set data, and the directed edge set shows that both L7 and L9 are controlled by the statement node of L5 , so the defect impact domain of the fault variable parser is {L5, L6, L7, L9}. A constraint mechanism is used to perform a null check on the defect-infected field, and if...

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 null pointer reference automatic repair method of a program dependency graph guided repair template, which fully knows a complex dependency relationship among statements by utilizing the program dependency graph, so that a defect repair position is accurately selected, and different repair templates are formulated for null pointer reference under different conditions for repair. The method comprises the following steps: A, analyzing data and a control dependency relationship between programs through a program dependency graph and an extension graph thereof; b, generating a repair template of null pointer reference defects under four repair strategies; c, matching the repair template according to the context information of the defect program, and selecting a defect repair position to complete defect repair; according to the null pointer reference automatic repair method of the program dependency graph guided repair template, accurate recognition of the position dependency relationship of program defect points can be achieved, meanwhile, accurate repair of null pointer reference defects between processes and in the processes is achieved by implementing a multi-strategy repair mechanism, and the accuracy of defect repair is improved.

Description

technical field [0001] The invention relates to a method for automatically repairing a null pointer reference defect, in particular to a method for using a program dependency graph to analyze in detail the control and data dependency between programs and implement different defect repair mechanisms for null pointer reference defects to generate candidate patches. Background technique [0002] Program defect repair is a tedious and inevitable work in the process of software development and maintenance, which greatly consumes and reduces the energy and efficiency of software developers. Therefore, automatic program repair technology has become a major research hotspot. The current automatic program repair technology is mainly divided into There are three stages: defect location, patch generation and patch verification. The causes of different defects and the defect impact domains are different. A common repair strategy for all program defects will often result in imprecise def...

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): G06F11/36
CPCG06F11/3628
Inventor 王珣孙玉雪董玉坤唐道龙位欣欣张宇
Owner CHINA UNIV OF PETROLEUM (EAST CHINA)
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