Font Size: a A A

The Mining Of API Usage Pattern Based On Frequent Closed Partial Order

Posted on:2018-12-12Degree:MasterType:Thesis
Country:ChinaCandidate:S Y WangFull Text:PDF
GTID:2348330515474738Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the development of software technology and network application technology,the use of computer software becomes more and more widely in daily life and business.The growing demand for available data and software requirements has made software development become a challenging task.In the software development process,developers often need to interact with libraries which belong to the develop tools or third-party libraries to complete the development task.And the reuse of the software component which can reduce the cost of software development as well as shorten the software development cycle has been respected by modern software engineering.However,on the one hand,libraries are often highly abstract,and for the convenience of development and maintenance,library developers often break down the developed libraries into different basic functional units.To call a certain function provided with the library often need to access to the basic functional units of the library following the rules of the library.This leads to a result that developers need to spend a lot of time to learn the relationship between the methods and the relationship between the classes,and this would reduce the efficiency of the developer.On the other hand,as the increase of local open source code and the open source code on the Internet,the gain of the source code is being easier.Most of these source codes are well tested,and they show the use of API details as well as include the API usage pattern,it has great potential value for software development work.Therefore,it is one of the hotspots to study how to analyze the open source code and extract the API usage pattern.This thesis will focus on how to mine the API usage pattern from the existing source code,and propose a way to mine the API usage pattern from the source code.The main work is as follows:(1)The source code analysis technique is used to extract the API method call sequences from the source code corpus.In the process of extraction,the abstract syntax tree of the source code is constructed according to the composition of the source code,and then its directed acyclic graph is constructed with the granularity of the method body.Extract the API method call sequences by traversing the generated directed acyclic graph.(2)In the process of sequence preprocessing,hierarchical clustering is used to reduce the interaction between different API usage scenarios and to improve the support of API method call sequences.(3)When mining the API usage pattern,the order relation between the method calls is extended to the partial order relation between the method calls.An algorithm of frequent closed partial order mining called DFP is proposed,and mining the API usage patterns from the method call sequences in the partial order form.(4)This thesis validates the proposed API usage pattern mining process through experiments.On the same dataset,we use the method proposed in this thesis to compare with the API usage pattern mining tool MAPO,and verify the validity of the proposed method by comparing the pattern accuracy in the mining result.In order to verify the simplicity of the results of frequent closed partial order algorithm,the results of SPADE algorithm and BIDE algorithm are compared with the results of frequent closed partial order mining algorithm DFP.Finally,the DFP algorithm is compared with the efficiency of the Frecpo algorithm.The result found that as the dataset increases,the DFP algorithm is more efficient,and the run time is shorter.
Keywords/Search Tags:API usage pattern, sequential pattern mining, hierarchical clustering, partial order
PDF Full Text Request
Related items