--- category: academic type: academic person: Yanxin Lu date: 2010 source: nguyen_10_adaptation.pdf --- # A Graph-based Approach to API Usage Adaptation Hoan Anh Nguyen, Tung Thanh Nguyen, Gary Wilson Jr., Anh Tuan Nguyen, Miryung Kim, Tien N. Nguyen (Iowa State University, UT Austin) OOPSLA/SPLASH 2010 This paper presents LibSync, which guides developers in adapting API usage code by learning complex API usage adaptation patterns from other clients that already migrated to a new library version (and also from the API usages within the library's test code). LibSync uses several graph-based techniques to (1) identify changes to API declarations by comparing two library versions, (2) extract associated API usage skeletons before and after library migration, and (3) compare the extracted API usage skeletons to recover API usage adaptation patterns. Using the learned adaptation patterns, LibSync recommends the locations and edit operations for adapting API usages. Evaluation on real-world software systems shows precision of 100% and recall of 91%.