Font Size: a A A

Research On API Recommendation Method Integrating Stack Overflow And API Document Information

Posted on:2022-08-17Degree:MasterType:Thesis
Country:ChinaCandidate:C L XuFull Text:PDF
GTID:2518306740482664Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
With the continuous growth of the demand for software development,more and more types and scales of reusable codes are generated.How to help software developers find the appropriate application programming interface(API)for current programming tasks quickly and accurately is an important research direction in the field of intelligent software engineering.Most of the existing API recommendation methods only make indirect recommendations from the user's perspective,e.g.,recommend related APIs using word embedding technique to find historical questions that are semantically similar to the programming task in software development discussion communities such as Stack Overflow.In this case,as the semantic information of the API document is not effectively utilized and the word embedding model is not capable of representing the deep semantic information at the sentence level,the effect of API recommendation still needs to be further improved.To address the above problems,this thesis proposes a hybrid API recommendation approach that integrates Stack Overflow with API document information,which improves the accuracy of API recommendation by incorporating the document information of API entities and improving the calculation method of question query similarity.Given a programming task,our approach first collects the title information and tag information of Stack Overflow questions,calculates the similarity between the query and questions through the Sentence-BERT model and the tag prediction model,searches for historical questions similar to the programming task,obtains candidate APIs in historical questions,calculates the similarity of question querying of all candidate APIs,and obtains an indirect API recommendation list.After that,itcalculates document similarity of API entities and through the Sentence-BERT model and the API knowledge graph and obtains a direct API recommendation list using the semantic information of the description text of the API entity and the conceptual information of the API entity in the API document.Finally,a comprehensive score is calculated for all candidate APIs in the indrect and direct recommendation lists,and perform ranking and API recommendation.On the basis of the above work,this thesis implements an API hybrid recommendation tool—HAPIR,which integrates Stack Overflow and API documentation information.In order to verify the effectiveness of HAPIR,a total of 486 Java core API-related programming tasks were selected as query data for experimental research.The Experimental results show that HAPIR effectively improves the accuracy of API recommendation with high user query efficiency.The MRR and MAP achieved by HAPIR outperform BIKER on method-level API recommendation by 31.97% and 29.27% respectively while they do by 108.95% and 111.54%on method-level API recommendation.
Keywords/Search Tags:API recommendation, Stack Overflow, API document, Word embedding
PDF Full Text Request
Related items