Adding Examples into Java Documents

Code examples play an important role to explain the usage of Application Programming Interfaces (APIs), but most API documents do not provide sufficient code examples. For example, for the JDK 5 documents (JavaDocs), only 2% of APIs have code examples. In this paper, we propose a technique that automatically augments API documents with code examples. Our approach finds and embeds code examples for more than 75% of the APIs in JavaDocs 5.

[1]  Yann-Gaël Guéhéneuc,et al.  DeMIMA: A Multilayered Approach for Design Pattern Identification , 2008, IEEE Transactions on Software Engineering.

[2]  R. Holmes,et al.  Using structural context to recommend source code examples , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[3]  David W. Binkley,et al.  Interprocedural slicing using dependence graphs , 1990, TOPL.

[4]  Premkumar T. Devanbu,et al.  Analytical and empirical evaluation of software reuse metrics , 1996, Proceedings of IEEE 18th International Conference on Software Engineering.

[5]  Kajal T. Claypool,et al.  XSnippet: mining For sample code , 2006, OOPSLA '06.

[6]  E. GaffneyJ.,et al.  Software reusekey to enhanced productivity: some quantitative models , 1989 .

[7]  Vivek Sharma,et al.  Java Programming by Example , 1998 .

[8]  Jian Pei,et al.  MAPO: mining API usages from open source repositories , 2006, MSR '06.

[9]  Douglas Kramer,et al.  API documentation from source code comments: a case study of Javadoc , 1999, SIGDOC '99.

[10]  Robert J. Walker,et al.  Informing Eclipse API production and consumption , 2007, eclipse '07.

[11]  Jian Pei,et al.  MAPO: Mining and Recommending API Usage Patterns , 2009, ECOOP.

[12]  Zhendong Su,et al.  DECKARD: Scalable and Accurate Tree-Based Detection of Code Clones , 2007, 29th International Conference on Software Engineering (ICSE'07).

[13]  Robert J. Walker,et al.  A newbie's guide to eclipse APIs , 2008, MSR '08.

[14]  Tao Xie,et al.  SpotWeb: detecting framework hotspots via mining open source repositories on the web , 2008, MSR '08.

[15]  J. E. Gaffney,et al.  Software reuse—key to enhanced productivity: some quantitative models , 1989 .

[16]  Sushil Krishna Bajracharya,et al.  Mining search topics from a code search engine usage log , 2009, 2009 6th IEEE International Working Conference on Mining Software Repositories.