2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER) (2016)
Suita, Osaka, Japan
March 14, 2016 to March 18, 2016
DOI Bookmark: http://doi.ieeecomputersociety.org/10.1109/SANER.2016.79
It is not unreasonable to say that examples are one of the most commonly used knowledge sources when learning the usage and best practices of a new API. That being said, in many cases the examples provided on the APIs' Web site are lacking in quantity or quality, so developers have to resort to other information sources, namely blogs and coding forums. Moreover, there is no good way for API developers to measure anything concerning the examples they are creating. In order to resolve the problem of lacking examples information and feedback in their creation, our goal is to develop metrics for empirical measurement of examples and to offer support during the APIs example creation steps, and this paper represents the starting point towards that aim. We have analyzed the source code examples provided on the API's Web site or GitHub directory for seven popular API libraries written in Java and measured certain metrics, such as example coverage, example code to source code ratio, class coverage percentage, and problems that occur with the compilation and execution of existing examples. The purpose of this paper is to investigate the current situation of examples and provide a starting knowledge base for building an automatic tool for source code example metrics analysis.
Libraries, Measurement, Java, Blogs, Encoding, Documentation, Natural languages
S. Radevski, H. Hata and K. Matsumoto, "Towards Building API Usage Example Metrics," 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), Suita, Osaka, Japan, 2016, pp. 619-623.