DocumentCode
1852175
Title
Improving API Usage through Automatic Detection of Redundant Code
Author
Kawrykow, David ; Robillard, Martin P.
Author_Institution
Sch. of Comput. Sci., McGill Univ., Montreal, QC, Canada
fYear
2009
fDate
16-20 Nov. 2009
Firstpage
111
Lastpage
122
Abstract
Software projects often rely on third-party libraries made accessible through Application Programming Interfaces (APIs). We have observed many cases where APIs are used in ways that are not the most effective. We developed a technique and tool support to automatically detect such patterns of API usage in software projects. The main hypothesis underlying our technique is that client code imitating the behavior of an API method without calling it may not be using the API effectively because it could instead call the method it imitates. Our technique involves analyzing software systems to detect cases of API method imitations. In addition to warning developers of potentially re-implemented API methods, we also indicate how to improve the use of the API. Applying our approach on 10 Java systems revealed over 400 actual cases of potentially suboptimal API usage, leading to many improvements to the quality of the code we studied.
Keywords
Java; software tools; user interfaces; API usage; Java systems; automatic detection; redundant code; software projects; Application software; Automatic programming; Computer science; Degradation; Functional programming; Java; Software engineering; Software libraries; Software systems; Software tools; API usage; code analysis; code quality; recommendation system;
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.62
Filename
5431779
Link To Document