Mining unit test cases to synthesize API usage examples. Issue 12 (20th January 2017)
- Record Type:
- Journal Article
- Title:
- Mining unit test cases to synthesize API usage examples. Issue 12 (20th January 2017)
- Main Title:
- Mining unit test cases to synthesize API usage examples
- Authors:
- Ghafari, Mohammad
Rubinov, Konstantin
Pourhashem K., Mohammad Mehdi - Other Names:
- Khomh Foutse guestEditor.
Lo David guestEditor.
Godfrey Michael W. guestEditor. - Abstract:
- Abstract: Software developers study and reuse existing source code to understand how to properly use application programming interfaces (APIs). However, manually finding sufficient and adequate code examples for a given API is a difficult and a time‐consuming activity. Existing approaches to find or generate examples assume availability of a reasonable set of client code that uses the API. This assumption does not hold for newly released API libraries, non‐widely used APIs, nor private ones. In this work we reuse the important information that is naturally present in test code to circumvent the lack of usage examples for an API when other sources of client code are not available. We propose an approach for automatically identifying the most representative API uses within each unit test case. We then develop an approach to synthesize API usage examples by extracting relevant statements representing the usage of such APIs. We compare the output of a prototype implementation of our approach to both human‐written examples and to a state‐of‐the‐art approach. The obtained results are encouraging; the examples automatically generated with our approach are superior to the state‐of‐the‐art approach and highly similar to the manually constructed examples.
- Is Part Of:
- Journal of software. Volume 29:Issue 12(2017)
- Journal:
- Journal of software
- Issue:
- Volume 29:Issue 12(2017)
- Issue Display:
- Volume 29, Issue 12 (2017)
- Year:
- 2017
- Volume:
- 29
- Issue:
- 12
- Issue Sort Value:
- 2017-0029-0012-0000
- Page Start:
- n/a
- Page End:
- n/a
- Publication Date:
- 2017-01-20
- Subjects:
- API usage examples -- code mining -- traceability -- unit test cases
Software engineering -- Periodicals
Computer software -- Development -- Periodicals
Software maintenance -- Periodicals
005.1 - Journal URLs:
- http://onlinelibrary.wiley.com/journal/10.1002/(ISSN)2047-7481 ↗
http://onlinelibrary.wiley.com/ ↗ - DOI:
- 10.1002/smr.1841 ↗
- Languages:
- English
- ISSNs:
- 2047-7473
- Deposit Type:
- Legaldeposit
- View Content:
- Available online (eLD content is only available in our Reading Rooms) ↗
- Physical Locations:
- British Library DSC - BLDSS-3PM
British Library HMNTS - ELD Digital store - Ingest File:
- 5529.xml