Investigating order information in API-usage patterns: A benchmark and empirical study

Ervina Çergani, Sebastian Proksch, Sarah Nadi, Mira Mezini

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Many approaches have been proposed for learning Application Programming Interface (API) usage patterns from code repositories. Depending on the underlying technique, the mined patterns may (1) be strictly sequential, (2) consider partial order between method calls, or (3) not consider order information. Understanding the trade-offs between these pattern types with respect to real code is important in many applications (e.g. code recommendation or misuse detection). In this work, we present a benchmark consisting of an episode mining algorithm that can be configured to learn all three types of patterns mentioned above. Running our benchmark on an existing dataset of 360 C# code repositories, we empirically study the resulting API usage patterns per pattern type. Our results show practical evidence that not only do partial-order patterns represent a generalized super set of sequential-order patterns, partial-order mining also finds additional patterns missed by sequence mining, which are used by a larger number of developers across code repositories. Additionally, our study empirically quantifies the importance of the order information encoded in sequential and partial-order patterns for representing correct co-occurrences of code elements in real code. Furthermore, our benchmark can be used by other researchers to explore additional properties of API patterns.

Original languageEnglish (US)
Title of host publicationICSOFT 2018 - Proceedings of the 13th International Conference on Software Technologies
EditorsLeszek Maciaszek, Leszek Maciaszek, Marten van Sinderen
PublisherSciTePress
Pages57-68
Number of pages12
ISBN (Electronic)9789897583209
DOIs
StatePublished - 2019
Event13th International Conference on Software Technologies, ICSOFT 2018 - Porto, Portugal
Duration: Jul 26 2018Jul 28 2018

Publication series

NameICSOFT 2018 - Proceedings of the 13th International Conference on Software Technologies

Conference

Conference13th International Conference on Software Technologies, ICSOFT 2018
Country/TerritoryPortugal
CityPorto
Period7/26/187/28/18

Keywords

  • API Usage Pattern Types
  • Benchmark
  • Code Repositories
  • Empirical Evaluation
  • Events Mining

ASJC Scopus subject areas

  • Software
  • Information Systems
  • Computer Science Applications

Fingerprint

Dive into the research topics of 'Investigating order information in API-usage patterns: A benchmark and empirical study'. Together they form a unique fingerprint.

Cite this