Title :
Recommending Proper API Code Examples for Documentation Purpose
Author :
Mar, Lee Wei ; Wu, Ye-Chi ; Jiau, Hewijin Christine
Author_Institution :
Inst. of Comput. & Commun. Eng., Nat. Cheng Kung Univ., Tainan, Taiwan
Abstract :
Code examples are important resources for expressing correct application programming interface (API) usages. However, many framework and library APIs fail in offering sufficient code examples in corresponding API documentations. This is because constructing proper code examples for documentation purpose takes significant developers´ efforts. To reduce such effort, this work proposes a methodology, PropER-Doc, that recommends proper code examples for documentation purpose. PropER-Doc accepts queries from API developers and utilizes code search engines (CSEs) to collect corresponding code example candidates. The structural and conceptual links between API elements are captured from the API implementation and available API documents to guide candidate recommendation. During recommendation, PropER-Doc groups collected candidates based on involved API types for distinguishing different API usages. To assist API developers in selecting proper candidates, a diagrammatic presentation and three code example appropriateness metrics are also developed in {PropER-Doc}. Two case studies on Eclipse JDT framework are conducted to confirm the effectiveness of PropER-Doc.
Keywords :
Java; application program interfaces; document handling; program compilers; query processing; search engines; API code examples; API developers; Eclipse JDT framework; PropER-Doc; application programming interface; code search engines; documentation purpose; queries; Application programming interfaces; Complexity theory; Documentation; Google; Java; Measurement; Organizations; API usage; code example; documentation; framework;
Conference_Titel :
Software Engineering Conference (APSEC), 2011 18th Asia Pacific
Conference_Location :
Ho Chi Minh
Print_ISBN :
978-1-4577-2199-1
DOI :
10.1109/APSEC.2011.18