Fine-granularity method for generating API substitution rules based on frequent item set mining

A frequent itemset mining, fine-grained technology, applied in program control devices and other directions, can solve problems such as increasing the development cost of class libraries, single replacement rules, etc., to reduce inaccuracy problems and reduce false positives.

Active Publication Date: 2015-08-05
NANJING UNIV
View PDF4 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Existing technologies often have the following problems: the participation of class library developers is required, which increases the development cost of the class library; the change of the call relationship in units of methods is prone to false positives (False Positive), because the call replacement relationship It often occurs in the local code segment of the program; the generated replacement rules are relatively simple

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
  • Fine-granularity method for generating API substitution rules based on frequent item set mining
  • Fine-granularity method for generating API substitution rules based on frequent item set mining

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] Below in conjunction with specific embodiment, further illustrate the present invention, should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention, after having read the present invention, those skilled in the art will understand various equivalent forms of the present invention All modifications fall within the scope defined by the appended claims of the present application.

[0032] The first step is to extract the signatures of all methods defined in the new and old versions and other methods called, and also need to record the file names where they are located and the position and length of their appearance in the file. The specific steps are as follows: parse each file in the source code of the class library using the Parser provided by the JDT plug-in of Eclipse to generate an Abstract Syntax Tree (AST). Then traverse the AST, record the fully qualified name of eac...

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 present invention discloses a fine-granularity method for generating API substitution rules based on frequent item set mining. The method is characterized by deducing the substitution rules of old and new versions of API in application by using a frequent item set mining algorithm according to the change of the dispatching of the earlier and latest versions of APIs in a class library. When services are extracted from each matched method pair, original codes of the matched method pair are compared by an LCS algorithm, a plurality of matched code segment pairs are generated by taking a point in which the number of same code lines is greater than the Range of the specified threshold as a division point, then the services are generated by change of the dispatching relation of each pair of code segments. Compared against the solution of generating the change of the dispatching relation by taking the method as a unit, the context information of the dispatching method is retained to a certain extent; the accuracy of the services is improved; according to the method, frequency item sets are generated by applying the frequent item set mining algorithm to the generated service sets, then association rules are generated, such that more various API substitution rules can be generated.

Description

technical field [0001] The invention relates to how the application program should adapt to the use of the new version API when the application program using the class library is migrated to a new version, specifically a fine-grained method for generating API replacement rules based on frequent itemset mining, which belongs to computer software development technology field. Background technique [0002] In the process of software development, third-party class libraries are often used, and the APIs provided by them will inevitably be modified during the evolution of the class libraries, which will cause the application to fail to compile or produce wrong running results, and software developers must spend a lot of money. Time to modify the application to correctly use the new version of the API. [0003] Among existing technologies, CatchUp! Such tools require the developers of the class library to record the refactoring operations during the evolution of the class library...

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): G06F9/44
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