DocumentCode :
1851730
Title :
Inferring Resource Specifications from Natural Language API Documentation
Author :
Zhong, Hao ; Zhang, Lu ; Xie, Tao ; Mei, Hong
Author_Institution :
Key Lab. of High Confidence Software Technol., Peking Univ., Beijing, China
fYear :
2009
fDate :
16-20 Nov. 2009
Firstpage :
307
Lastpage :
318
Abstract :
Typically, software libraries provide API documentation, through which developers can learn how to use libraries correctly. However, developers may still write code inconsistent with API documentation and thus introduce bugs, as existing research shows that many developers are reluctant to carefully read API documentation. To find those bugs, researchers have proposed various detection approaches based on known specifications. To mine specifications, many approaches have been proposed, and most of them rely on existing client code. Consequently, these mining approaches would fail to mine specifications when client code is not available. In this paper, we propose an approach, called Doc2Spec, that infers resource specifications from API documentation. For our approach, we implemented a tool and conducted an evaluation on Javadocs of five libraries. The results show that our approach infers various specifications with relatively high precisions, recalls, and F-scores. We further evaluated the usefulness of inferred specifications through detecting bugs in open source projects. The results show that specifications inferred by Doc2Spec are useful to detect real bugs in existing projects.
Keywords :
application program interfaces; data mining; formal specification; natural language processing; program testing; software libraries; Doc2Spec; F-scores; Javadocs; application programming interface; bug detection; client code; data mining; inferring resource specifications; natural language API documentation; software libraries; Computer bugs; Computer science; Databases; Documentation; Educational technology; Java; Laboratories; Natural languages; Software engineering; Software libraries;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Automated Software Engineering, 2009. ASE '09. 24th IEEE/ACM International Conference on
Conference_Location :
Auckland
ISSN :
1938-4300
Print_ISBN :
978-1-4244-5259-0
Electronic_ISBN :
1938-4300
Type :
conf
DOI :
10.1109/ASE.2009.94
Filename :
5431763
Link To Document :
بازگشت