Investigating Order Information in API-Usage Patterns: A Benchmark and Empirical Study

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

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.

Download


Paper Citation


in Harvard Style

Çergani E., Proksch S. and Nadi S. (2018). Investigating Order Information in API-Usage Patterns: A Benchmark and Empirical Study.In Proceedings of the 13th International Conference on Software Technologies - Volume 1: ICSOFT, ISBN 978-989-758-320-9, pages 57-68. DOI: 10.5220/0006839000570068


in Bibtex Style

@conference{icsoft18,
author={Ervina Çergani and Sebastian Proksch and Sarah Nadi},
title={Investigating Order Information in API-Usage Patterns: A Benchmark and Empirical Study},
booktitle={Proceedings of the 13th International Conference on Software Technologies - Volume 1: ICSOFT,},
year={2018},
pages={57-68},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0006839000570068},
isbn={978-989-758-320-9},
}


in EndNote Style

TY - CONF

JO - Proceedings of the 13th International Conference on Software Technologies - Volume 1: ICSOFT,
TI - Investigating Order Information in API-Usage Patterns: A Benchmark and Empirical Study
SN - 978-989-758-320-9
AU - Çergani E.
AU - Proksch S.
AU - Nadi S.
PY - 2018
SP - 57
EP - 68
DO - 10.5220/0006839000570068