DocumentCode :
2332762
Title :
Graph-based detection of library API imitations
Author :
Sun, Chengnian ; Khoo, Siau-Cheng ; Zhang, Shao Jie
Author_Institution :
Sch. of Comput., Nat. Univ. of Singapore, Singapore, Singapore
fYear :
2011
fDate :
25-30 Sept. 2011
Firstpage :
183
Lastpage :
192
Abstract :
It has been a common practice nowadays to employ third-party libraries in software projects. Software libraries encapsulate a large number of useful, well-tested and robust functions, so that they can help improve programmers´ productivity and program quality. To interact with libraries, programmers only need to invoke Application Programming Interfaces (APIs) exported from libraries. However, programmers do not always use libraries as effectively as expected in their application development. One commonly observed phenomenon is that some library behaviors are re-implemented by client code. Such re-implementation, or imitation, is not just a waste of resource and energy, but its failure to abstract away similar code also tends to make software error-prone. In this paper, we propose a novel approach based on trace subsumption relation of data dependency graphs to detect imitations of library APIs for achieving better software maintainability. Furthermore, we have implemented a prototype of this approach and applied it to ten large real-world open-source projects. The experiments show 313 imitations of explicitly imported libraries with high precision average of 82%, and 116 imitations of static libraries with precision average of 75%.
Keywords :
application program interfaces; software libraries; software maintenance; application programming interface; data dependency graphs; graph-based detection; library API imitation; program quality; programmer productivity; software error-prone; software libraries; software maintainability; software project; third-party libraries; Arrays; Cloning; Educational institutions; Image edge detection; Indexes; Libraries; Software;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Software Maintenance (ICSM), 2011 27th IEEE International Conference on
Conference_Location :
Williamsburg, VI
ISSN :
1063-6773
Print_ISBN :
978-1-4577-0663-9
Electronic_ISBN :
1063-6773
Type :
conf
DOI :
10.1109/ICSM.2011.6080785
Filename :
6080785
Link To Document :
بازگشت