TY - GEN
T1 - Recommending proper API code examples for documentation purpose
AU - Mar, Lee Wei
AU - Wu, Ye Chi
AU - Jiau, Hewijin Christine
PY - 2011
Y1 - 2011
N2 - 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.
AB - 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.
UR - http://www.scopus.com/inward/record.url?scp=84863020208&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84863020208&partnerID=8YFLogxK
U2 - 10.1109/APSEC.2011.18
DO - 10.1109/APSEC.2011.18
M3 - Conference contribution
AN - SCOPUS:84863020208
SN - 9780769546094
T3 - Proceedings - Asia-Pacific Software Engineering Conference, APSEC
SP - 331
EP - 338
BT - Proceedings - 18th Asia-Pacific Software Engineering Conference, APSEC 2011
T2 - 18th Asia Pacific Software Engineering Conference, APSEC 2011
Y2 - 5 December 2011 through 8 December 2011
ER -