Font Size: a A A

The Research For Mining API Call Patterns Based On Examples

Posted on:2022-01-09Degree:MasterType:Thesis
Country:ChinaCandidate:J J MoFull Text:PDF
GTID:2518306497452084Subject:Software engineering
Abstract/Summary:PDF Full Text Request
In the process of software development,developers usually use API to improve development efficiency and code reuse rate.API provides developers with a set of accessible services,and developers do not need to care about the internal source code of API,which greatly reduces the workload of developers.Due to the increasing scale and complexity of modern software,more and more APIs are used by developers in software.However,many APIs are lack of documents,or the explanation and description of the documents are general,and lack of code examples,which causes some obstacles for developers to learn the rules of API use.In order to further improve the efficiency of software development,researchers began to focus on the analysis of large-scale open source code,and according to the rules to mine the API call patterns.These automatically mined API call patterns can effectively help developers quickly find,understand and use the API,thus solving the problem of insufficient api code examples or incomplete documents,reducing the number of developers The workload of coding and debugging is reduced,and the efficiency of software development is improved.Frequent sequential pattern mining plays a key role in the research of API call pattern mining.However,frequent sequential pattern mining usually has a problem: if the threshold is set low,although the recall rate of the returned call pattern is relatively high,there will be a large number of redundant call patterns,which makes the accuracy rate lower;if the threshold is set high,although the accuracy rate of the returned call pattern is improved,its integrity will be reduced,which may be lost Some API call patterns reduce the recall rate of the results.Among them,the recall rate is the ratio of the number of correct call patterns and the number of correct call patterns.Therefore,researchers propose various methods to solve this problem,and use F-measure value to measure the comprehensive performance of accuracy and recall of mining tools.For example,up miner uses clustering algorithm to divide the samples,and conducts secondary clustering on the mining results,trying to solve the problem of excessive redundancy caused by sequential pattern mining,which improves the accuracy rate.However,the API calling patterns with fewer times will still be missed,and the recall rate needs to be improved.In order to solve the problem of insufficient recall rate in up miner,this paper proposes an API call pattern mining method based on examples,be miner(based examples),which collects data from some Q & A websites,such as stack Overflow,which extracts the API call sequences from some code examples,uses these API call sequences to mine the API call patterns that appear less frequently in the project,and does not produce a large number of redundant results.According to the voting number and score of the code examples on the Q & a website,as well as the frequency of use in the source code and other factors,the returned API calls are analyzed The recommended order of patterns is sorted.The experimental results show that the API call pattern mining method based on example can effectively mine the call patterns that appear less frequently in the project from the source program,and be miner has higher recall rate and F-measure value than UP-Miner and MAPO.
Keywords/Search Tags:API call pattern, sequential pattern mining, classification algorithm
PDF Full Text Request
Related items