Graph-based detection of library API imitations

作者: Chengnian Sun , Siau-Cheng Khoo , Shao Jie Zhang

DOI: 10.1109/ICSM.2011.6080785

关键词:

摘要: It has been a common practice nowadays to employ third-party libraries in software projects. Software encapsulate large number of useful, well-tested and robust functions, so that they can help improve programmers' productivity program quality. To interact with libraries, programmers only need invoke Application Programming Interfaces (APIs) exported from libraries. However, do not always use as effectively expected their application development. One commonly observed phenomenon is some library behaviors are re-implemented by client code. Such re-implementation, or imitation, just waste resource energy, but its failure abstract away similar code also tends make error-prone. In this paper, we propose novel approach based on trace subsumption relation data dependency graphs detect imitations APIs for achieving better maintainability. Furthermore, have implemented prototype applied it ten real-world open-source The experiments show 313 explicitly imported high precision average 82%, 116 static 75%.

参考文章(17)
Piotr Indyk, Aristides Gionis, Rajeev Motwani, Similarity Search in High Dimensions via Hashing very large data bases. pp. 518- 529 ,(1999)
Raghavan Komondoor, Susan Horwitz, Using Slicing to Identify Duplication in Source Code static analysis symposium. pp. 40- 56 ,(2001) , 10.1007/3-540-47764-0_3
David Kawrykow, Martin P. Robillard, Improving API Usage through Automatic Detection of Redundant Code automated software engineering. pp. 111- 122 ,(2009) , 10.1109/ASE.2009.62
Hoan Anh Nguyen, Tung Thanh Nguyen, Gary Wilson, Anh Tuan Nguyen, Miryung Kim, Tien N. Nguyen, A graph-based approach to API usage adaptation conference on object-oriented programming systems, languages, and applications. ,vol. 45, pp. 302- 321 ,(2010) , 10.1145/1869459.1869486
David Schuler, Valentin Dallmeier, Christian Lindig, A dynamic birthmark for java automated software engineering. pp. 274- 283 ,(2007) , 10.1145/1321631.1321672
Naiyana Sahavechaphan, Kajal Claypool, XSnippet Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications - OOPSLA '06. ,vol. 41, pp. 413- 430 ,(2006) , 10.1145/1167473.1167508
Tung Thanh Nguyen, Hoan Anh Nguyen, Nam H. Pham, Jafar M. Al-Kofahi, Tien N. Nguyen, Graph-based mining of multiple object usage patterns foundations of software engineering. pp. 383- 392 ,(2009) , 10.1145/1595696.1595767
J. Krinke, Identifying similar code with program dependence graphs working conference on reverse engineering. pp. 301- 309 ,(2001) , 10.1109/WCRE.2001.957835
Tao Xie, Jian Pei, MAPO Proceedings of the 2006 international workshop on Mining software repositories - MSR '06. pp. 54- 57 ,(2006) , 10.1145/1137983.1137997
Chao Liu, Chen Chen, Jiawei Han, Philip S. Yu, GPLAG: detection of software plagiarism by program dependence graph analysis knowledge discovery and data mining. pp. 872- 881 ,(2006) , 10.1145/1150402.1150522