Font Size: a A A

The Design And Implementation Of API Precondition Mining System

Posted on:2020-01-23Degree:MasterType:Thesis
Country:ChinaCandidate:Y M WuFull Text:PDF
GTID:2518305735485464Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
Modern software systems are becoming increasingly complex,relying on a lot of frameworks and libraries which provide application programming interfaces(APIs)via classes and their methods.To be able to correctly use these APIs,programmers must conform to their specifications.For each API method,there are conditions that must hold whenever it is invoked.These are called the preconditions of the API.This thesis studied how to extract the preconditions for API usage from a very large code corpus in open-source repositories.To be specific,the method of APIs' preconditions extraction,APIs' preconditions mining and APIs' preconditions evaluation are proposed.Above all,program analysis technology is applied to analyze massive client code so as to extract a large amount of condition data before APIs' invocation.Then,a model with data mining technology is constructed to mine the condition data before APIs' invocation in the client code.Finally,to evaluate the validity of the mined preconditions,two schemes are proposed to obtain the test data sets.For one thing,extracting APIs' preconditions from APIs' definition source code with program analysis technology;For another,extracting APIs'preconditions from APIs' documents with natural language processing technology.At the phase of coding and testing,the APIs' preconditions are capable of helping software engineers confirm the conditions before APIs' invocation in a quick way.By comparing the extracted conditions with the preconditions of APIs' description in the APIs'documents,the possible defects in APIs' documents,such as incorrect or inaccurate description of APIs' preconditions,can be detected.In general,this thesis contributes to improve the working efficiency of software engineers and the reliability of software projects,and also provide a new idea for the way of mining APIs' information.
Keywords/Search Tags:Software engineering, Program analysis, API, Precondition, Data mining
PDF Full Text Request
Related items