Extracting API Usage Examples from API Unit Test Cases

27.04.2015, 10:00-11:30

2015/04/27 10:00-11:30

Speaker: Mohammad Ghafari | Location: Rheinstraße 75, Fraunhofer SIT, Room Berlin, Darmstadt

Organizer: CROSSING Eric Bodden / E1 – Secure Integration of Cryptographic Software


Understanding how to properly use APIs of large libraries is non-trivial and time consuming. Developers increasingly rely on code examples to learn the correct way to use these APIs. Several approaches have been proposed to mine these examples, but the sources from which they mine examples as well as their mining approaches hamper the applicability of them in some practical scenarios.

Unit test cases seem to be a complementary source of API examples to fill this gap. However, mining examples of API use from unit tests is difficult and arises several research challenges. This presentation overviews the challenges and presents an approach to synthesize useful code examples from unit test cases.

Short Bio

Mohammad Ghafari has been a PhD student at Politecnico di Milano since November 2012. Mohammad is a member of DeepSE research group and works under the supervision of Prof. Carlo Ghezzi. His preliminary research was in the field of software evolution at runtime especially to deal with concerns about performing safe reconfiguration. Currently, Mohammad's research focuses on extracting code examples from unit test cases to improve existing code recommendation systems and enriching documentation.