Unlock instant, AI-driven research and patent intelligence for your innovation.

A method for automatic detection of inconsistencies between java API program exceptions and document descriptions

A technology of program abnormality and automatic detection, applied in error detection/correction, software testing/debugging, instruments, etc., to achieve the effect of improving accuracy and software quality

Active Publication Date: 2018-10-12
NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

There are currently no more studies applying the method to detecting other types of constraints on documents

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 method for automatic detection of inconsistencies between java API program exceptions and document descriptions
  • A method for automatic detection of inconsistencies between java API program exceptions and document descriptions
  • A method for automatic detection of inconsistencies between java API program exceptions and document descriptions

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] The technical solutions of the present invention will be described in detail below in conjunction with the accompanying drawings.

[0031] refer to figure 1 Shown, the present invention provides a kind of Java API program exception and the description inconsistent automatic detection method of document, comprise following content:

[0032] (1) Core data structure

[0033] Based on the detection strategy of the present invention, we define a basic metadata structure for storing possible exceptions and related information in the code. Let's name it InfoBox. Each InfoBox needs to store exception type, exception trigger condition, involved parameters, and method information to which the exception belongs. The code analysis mentioned later in this article is based on such a metadata structure.

[0034] Since each InfoBox only records one exception-related information, for each API method, we may extract multiple InfoBox data, and these exception information should be exp...

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 an automatic detection method for the inconsistency between Java API program abnormality and document description. The type of exception thrown by each method and its triggering conditions, and the call relationship library between the methods of the target project source code is established; the data extracted from the target project is analyzed again. For each method, the current exception triggering conditions are first analyzed, Then, according to the call relationship, recursively analyze the abnormal trigger conditions in the calling method; for each method in the target project, use the heuristic method to analyze its annotation documents, compare the extracted abnormal information with the step document description information, and then detect There is a problem of inconsistency between the two. This detection method can improve the accuracy of the description of the thrown exception in the Java API document, thereby improving the quality of the software.

Description

technical field [0001] The invention belongs to the technical field of software engineering, and in particular relates to a method for detecting the inconsistency between the description of parameter constraint conditions related to thrown exceptions in Java API annotation documents and the actual constraint conditions of parameters in execution codes. Background technique [0002] As the scale of software projects continues to increase, efficient code reuse has become the pursuit of the industry, and the use of APIs is one of the important technical means. Application Programming Interface (Application Programming Interface), that is, API, is generally some open function interfaces, and its underlying code implementation is transparent to developers, so as to concentrate on business logic and improve development efficiency. [0003] Developers understand the constraints of the interface through the API documentation to achieve the purpose of using the API correctly. In the...

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 Patents(China)
IPC IPC(8): G06F11/36
CPCG06F11/3608
Inventor 周宇古睿航赵洪达
Owner NANJING UNIV OF AERONAUTICS & ASTRONAUTICS