A defect positioning-oriented code searching method

A defect-oriented and search method technology, applied in the field of code search for defect location, can solve the problems of difficult to accurately determine parameters, reduce the number of data processing, and reduce the pertinence and accuracy, so as to improve pertinence, accuracy, and processing efficiency Improve and simplify the effect of processing

Active Publication Date: 2019-04-02
YANGZHOU UNIV
View PDF4 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, this method only processes codes from two aspects of semantics and features. The connection between codes and bug reports is limited to the semantic level. This processing method is more dependent on classifier behavior parameters (such as how to process codes, how to weight keywords ) definition, due to the large range of parameters, it is difficult to accurately determine which parameters should be ignored
In addition, the code processing object in this work is the entire code file, and the huge amount of data processing reduces the pertinence and accuracy of the work

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
  • A defect positioning-oriented code searching method
  • A defect positioning-oriented code searching method
  • A defect positioning-oriented code searching method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0043] combine figure 1 , the code search method oriented to defect location of the present invention includes the following content:

[0044] Step 1. Use the bug report information in the APACHE project to extract the source code file corresponding to the bug report, create ASTpaser, and then parse the source code file to construct the abstract syntax tree of the code file. In this embodiment, a part of the code of the source code file is taken as an example:

[0045]

[0046] Using ASTpaser to analyze, the abstract syntax tree of the code can be obtained as follows Figure 5 shown.

[0047] Step 2. Modify the continuous code in the codediff file as a chunk, use the abstract syntax tree obtained in step 1, traverse the abstract syntax tree for different codediff files, mark and retain the nodes related to the chunk on the tree diagram, and delete irrelevant of nodes. In this embodiment, take the example code in the above step 1 as an example. In the codediff file, 1, 3, ...

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 defect positioning-oriented code searching method. The method comprises the following steps of: firstly, constructing a source code file abstract syntax tree corresponding toa bug report in a software history library; secondly, extracting all code diff files related to bugs, defining continuous code modification lines in the code diff files as chunks, and establishing achunks relation graph of each code diff file; then, obtaining an importance score detree of each node in the chunk relation graph; then, the relation between the bug report and the chunk is established; Bug-is established by using a knowledge base establishing tool; A chunk knowledge base; then, for a new bug report, obtaining the new bug report and the new bug-, wherein the similarity sim of thebug report in the chunk knowledge base; and finally, generating a chunk list by combining the importance score detree and the similarity sim of the chunk to realize defect positioning. The processingobject takes the chunk as a unit, and is oriented to a continuous code block, so that the processing data volume is reduced, the chunk is a modified code line, the pertinence is better in the calculation process, and the pertinence and the accuracy of bug positioning are improved.

Description

technical field [0001] The invention belongs to the field of software maintenance, in particular to a code search method oriented to defect location. Background technique [0002] In the process of software development and maintenance, many projects face a large number of bugs every day. For example, Mozilla receives an average of 152 new bug reports per day, and the IBM Jazz project receives an average of 105 new bug reports per day. Development and maintenance personnel need to spend a lot of time In terms of bug location and resolution, more and more bug location tools are developed to help developers quickly solve bug-related problems. [0003] Currently, many bug locators based on information retrieval models are widely used, such as VectorSpace Model (VDM), Latent Symantic Indexing, Latent Dirichlet Allocation (LDA), etc. Among them, Lukis et al. used the LDA model to locate bugs. Based on the bug report data on Mozilla, they used LSI and LDA models to build two class...

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/75G06F8/41
CPCG06F8/42G06F8/427G06F8/436G06F8/75
Inventor 孙小兵常建明张庆辉
Owner YANGZHOU 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