API misuse defect detection system based on sequence pattern matching

A sequential mode and defect detection technology, applied in error detection/correction, program code conversion, software testing/debugging, etc., can solve problems such as process complexity, false positives, dependence, etc., and achieve the effect of improving accuracy

Active Publication Date: 2021-01-12
北京京航计算通讯研究所
View PDF8 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Among them, the "explicit" specification is described based on a strict formal method. The construction process of the formal specification needs to take into account all the usage conditions of the API. The process is quite complicated, and some API specifications have their own defects.
The method of thought learning using big data is "implicit" specification. There are two problems in these methods: 1) the accuracy of defect detection depends on the accuracy of the specification; 2) when a correct calling pattern does not appear in the mined samples , the corresponding rules cannot be learned, and at this time, the violation detection based on the protocol will cause false positives

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
  • API misuse defect detection system based on sequence pattern matching
  • API misuse defect detection system based on sequence pattern matching

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0046] In order to make the purpose, content, and advantages of the present invention clearer, the specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments.

[0047] Aiming at the problems in the prior art, the present invention does not analyze the API usage protocol, but describes the API misuse pattern (referring to a certain API) according to the found examples of API misuse defects, combined with the code information before and after the defect repair in the patch file. Inappropriate calling of wrong program behavior, and there are definite error causes and repair measures, and this pattern will appear repeatedly in different software products), and then use the improved AC algorithm to search for the matching error in the target software under test. Similar flaws are detected using a patterned sequence of API calls. Compared with the protocol-based detection method, th...

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 belongs to the field of software defect detection, and particularly relates to an API misuse defect detection system based on sequence pattern matching. According to the invention, an API misuse mode is described according to discovered API misuse defect instances in combination with code information before and after defect repair in a patch file instead of analyzing API use protocols, and then an API call sequence conforming to the misuse mode is searched for in target tested software by utilizing an improved AC algorithm, so that similar defects are detected. Compared with a detection method based on a protocol, the scheme of the invention effectively avoids the problems that the defect detection accuracy depends on the protocol description accuracy, and part of API protocols have defects and the like. And the accuracy of API misuse defect detection is improved.

Description

technical field [0001] The invention belongs to the field of software defect detection, in particular to an API misuse defect detection system based on sequence pattern matching. Background technique [0002] With the advent of the big data era, code resources have exploded in the open source community. It has become normal for developers to share and copy code with each other, and use API (application programming interface, application programming interface) as an existing code base or application The access interface of the framework realizes the reuse of high-quality code modules. The provider of the API explains how to use the API through the specification in the API document, such as the JavaDoc document commonly used in Java programming. However, the survey shows that developers often program without being familiar with the API specification. When the use of the API violates the usage rules in the API specification, causing the program to fail to execute correctly, th...

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/36G06F8/41
CPCG06F11/3628G06F11/3688G06F8/42
Inventor 孙文靖李晓伟曾杰贲可荣苏建敏洪楠张清杨洋李春静王赢超
Owner 北京京航计算通讯研究所
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