Python program type defect detection method based on abstract syntax trees

An abstract syntax tree, defect detection technology, applied in the computer field, can solve problems such as failure to detect defect error types, lack of type defect analysis, etc.

Active Publication Date: 2018-12-04
NANJING UNIV
View PDF4 Cites 49 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The present invention aims to solve the existing problems of lack of type defect analysis for Python language and the inability to detect possible defect and error types, thereby guiding the management of software quality and improving the maintainability of software

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
  • Python program type defect detection method based on abstract syntax trees
  • Python program type defect detection method based on abstract syntax trees
  • Python program type defect detection method based on abstract syntax trees

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0056] In order to better illustrate the technical content of the present invention, the following description is made in conjunction with the accompanying drawings.

[0057] figure 1This is a flowchart of an abstract syntax tree-based Python type defect detection method according to an embodiment of the present invention. A kind of Python type defect detection method based on abstract syntax tree proposed by the present invention is characterized in that, comprises the following 6 steps:

[0058] Step 1: Collect Python software defect report information and extract defect error types. Gather information on bug reports in Python software that have been fixed from the bug tracking system, including bug identifiers, summaries, and descriptions. Determines whether the following 9 built-in Python exception types appear in the summary and description: ArithmeticError, AttributeError, KeyError, IndexError, IOError, NameError, SyntaxError, TypeError, ValueError. Add the error type...

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 provides a Python program type defect detection method based on abstract syntax trees. The method comprises the steps of (1) collecting Python software defect report information and extracting a defect identifier and a defect error type, (2) obtaining source codes of two versions of programs before and after defect repair, (3) generating abstract syntax trees corresponding to the twoversions of source codes, matching and obtaining a change function node and marking the defect error type, (4) generating a feature vector of a defect code according to the context information of thechange function node, (5) training a multi-classification models on a defect code feature vector by using the machine learning technology, and (6) reminding a developers of possible type defect information in testing a Python program file. The invention aims to solve the problems of the lack of the type defect analysis for a Python language and the inability to detect a possible defect error typeat present, thus the management of software quality is guided, and the maintainability of the software is improved.

Description

technical field [0001] The invention belongs to the field of computer technology, in particular to the field of software technology, and in particular relates to a Python program type defect detection method based on an abstract syntax tree. Background technique [0002] A software defect is a problem or error that exists in a computer program or system that will destroy the normal operation capability of the software, and is the failure or violation of a certain function that the system needs to achieve. In the process of software development and maintenance, due to the influence of various factors, software defects are difficult to avoid and often appear. In the software development stage, software defects accompany each process of the software development process. If the requirements are not fully clarified in the requirements analysis, it will bring many unnecessary software defects. If the development process does not adopt excellent management methods, it will also lea...

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
CPCG06F8/71G06F8/75G06F11/3608
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