fine-GRAPE

Fine-Grained APi usage Extractor An Approach and Dataset to Investigate API Usage

More Info
expand_more

Abstract

An Application Programming Interface (API) provides a specific set of functionalities to a developer, with the aim of enabling reuse. APIs have been investigated from different angles such as popularity usage and evolution, to get a better understanding of their various characteristics. For such studies software repositories are mined for API usage examples. However, the mining algorithms used for such purposes do not take type information into account, thus making the results imprecise. In this thesis, we aim to rectify this by introducing fine-GRAPE, an approach that produces fine-grained API usage information by taking advantage of type information while mining API method invocations and annotations. fine-GRAPE establishes a connection between a method invocation and the class of the API to which the method belongs. By means of fine-GRAPE, we investigate API usages from Java projects hosted on GitHub. We select five of the most popular APIs across GitHub Java projects and collect historical API usage information by mining both the release history of these APIs and the code history of every project that uses them. We use the resulting dataset to perform four separate analyses. The first measures the lag time of each client by leveraging the version information that has been collected. We see that in most cases clients do not upgrade the version of the API that they are using to the latest version. The consequence of this is that the lag time that each client displays is quite high. The second study investigates the percentage of API features that are used by using the type information in the dataset. The results of this study show that a very small percentage of an API is actually used by clients in the real world. Our third study aims to show the relation between popular features and software quality. Finally, the fourth study analyzes the reaction of clients to the deprecation of API artifacts. Our deprecation study shows that most clients do not really react to deprecated entities.