ebook img

fine-GRAPE: fine-Grained APi usage Extractor An Approach and Dataset to Investigate API Usage PDF

84 Pages·2015·0.67 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview fine-GRAPE: fine-Grained APi usage Extractor An Approach and Dataset to Investigate API Usage

fine-GRAPE: fine-Grained APi usage Extractor An Approach and Dataset to Investigate API Usage Version of November 16, 2015 Anand Ashok Sawant fine-GRAPE: fine-Grained APi usage Extractor An Approach and Dataset to Investigate API Usage THESIS submittedinpartialfulfillmentofthe requirementsforthedegreeof MASTEROFSCIENCE in COMPUTERSCIENCE by AnandAshokSawant borninMumbai,India SoftwareEngineeringResearchGroup DepartmentofSoftwareTechnology FacultyEEMCS,DelftUniversityofTechnology Delft,theNetherlands www.ewi.tudelft.nl (cid:13)c 2015 AnandAshokSawant. Allrightsreserved. fine-GRAPE: fine-Grained APi usage Extractor An Approach and Dataset to Investigate API Usage Author: AnandAshokSawant Studentid: 4048830 Email: [email protected] Abstract AnApplicationProgrammingInterface(API)providesaspecificsetoffunctional- itiestoadeveloper,withtheaimofenablingreuse. APIshavebeeninvestigatedfrom differentanglessuchaspopularityusageandevolution, togetabetterunderstanding of their various characteristics. For such studies software repositories are mined for APIusageexamples. However, theminingalgorithmsusedforsuchpurposesdonot taketypeinformationintoaccount,thusmakingtheresultsimprecise. Inthisthesis,weaimtorectifythisbyintroducingfine-GRAPE,anapproachthat producesfine-grainedAPIusageinformationbytakingadvantageoftypeinformation while mining API method invocations and annotations. fine-GRAPE establishes a connectionbetweenamethodinvocationandtheclassoftheAPItowhichthemethod belongs. By means of fine-GRAPE, we investigate API usages from Java projects hostedonGitHub.WeselectfiveofthemostpopularAPIsacrossGitHubJavaprojects andcollecthistoricalAPIusageinformationbyminingboththereleasehistoryofthese APIsandthecodehistoryofeveryprojectthatusesthem. Weusetheresultingdatasettoperformfourseparateanalyses. Thefirstmeasures the lag time of each client by leveraging the version information that has been col- lected. 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 eachclientdisplaysisquitehigh. ThesecondstudyinvestigatesthepercentageofAPI featuresthatareusedbyusingthetypeinformationinthedataset. Theresultsofthis 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 softwarequality. Finally, thefourthstudyanalyzesthereactionofclientstothedep- recationofAPIartifacts. Ourdeprecationstudyshowsthatmostclientsdonotreally reacttodeprecatedentities. ThesisCommittee: Chair: Prof. Dr. A.vanDeursen,FacultyEEMCS,TUDelft Universitysupervisor: Dr. A.Bacchelli,FacultyEEMCS,TUDelft CommitteeMember: Dr. A.Orso,ARKTOS,GeorgiaTech CommitteeMember: Dr. R.Robbes,FacultyPLEAID,UCChile CommitteeMember: Dr. A.Bozzon,FacultyEEMCS,TUDelft ii Preface This thesis represents my work from the period of September 2014 to November 2015 duringthesecondyearofmyMastersprogramattheDelftUniversityofTechnology. Inmy thesis I present a technique that I developed which aids in the collection of type-checked API usages from open source code hosting platforms called fine-GRAPE. Based on this approachIconstructalargedatasetthatcontainsusagedataforfivemainstreamJavaAPIs. Iperformfourstudiesbasedonthisdataset,andeachofthestudiesconductedarepresented inachapterinthisthesisandisbasedonaresearchpaperthatiseitherpublishedorunder submission. Most of the work for this thesis was done in the Netherlands at the Delft University of Technology under the supervision of Dr. Alberto Bacchelli. Some work was done in Atlanta at the Georgia Institute of Technology under the supervision of Dr. Alessandro Orso. Also, a special thanks to Dr. Romain Robbes for his help and guidance fortheworkonthenatureofdeprecationthatisoneofthestudiesdoneonthedataset. Thecreationofthisthesiswasawonderfulandrewardingexperience. Duringitscourse IgottheopportunitytomovetheUnitedStatesforaperiodoffivemonths. Ialsowaslucky enough to get to go my first ever Software Engineering conference during my masters. I would like to thank my family and my friends for being there for me whenever I needed helpandforputtingupwithmyshenanigans. AnandAshokSawant Delft,theNetherlands November16,2015 iii Contents Preface iii Contents v ListofFigures vii 1 Introduction 1 2 BackgroundandRelatedWork 3 2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2 ExistingAPIminingtechniques . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 UsecasesforAPIUsagedatasets . . . . . . . . . . . . . . . . . . . . . . . 5 3 TheApproach-fine-GRAPE 7 3.1 Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.3 Miningofcoarsegrainedusage . . . . . . . . . . . . . . . . . . . . . . . . 7 3.4 Fine-grainedAPIusage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.5 ADatasetforAPIUsage . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.6 Comparisontoexistingdatasets . . . . . . . . . . . . . . . . . . . . . . . 14 4 InvestigatingPropertiesofAPIs 17 4.1 Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.3 Study1: DoclientsofAPIsmigratetoanewversionoftheAPI? . . . . . . 18 4.4 Study2: HowmuchofanAPIisbroadlyused? . . . . . . . . . . . . . . . 24 4.5 Study3: ArepopularpartsofanAPImorelikelytohavebugs? . . . . . . . 28 4.6 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 5 APIDeprecation 37 v CONTENTS 5.1 Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 5.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 5.3 RelatedWork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 5.4 ResearchGoals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.5 Results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 5.6 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 6 ConclusionsandFutureWork 61 6.1 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 6.2 Futurework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 6.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Bibliography 65 vi

Description:
and vast information, but also make it easier to replicate studies and share used by Michail [65] employed data mining of association rules regarding APIs. CodeWeb [65] that was developed by Amir Michail. mysql-conn.-java.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.