CORC  > 北京大学  > 信息科学技术学院
Relationship-Aware Code Search for JavaScript Frameworks
Li, Xuan ; Wang, Zerui ; Wang, Qianxiang ; Yang, Shoumeng ; Xie, Tao ; Mei, Hong
2016
关键词Code search JavaScript code mining natural language processing
英文摘要JavaScript frameworks, such as jQuery, are widely used for developing web applications. To facilitate using these JavaScript frameworks to implement a feature (e.g., functionality), a large number of programmers often search for code snippets that implement the same or similar feature. However, existing code search approaches tend to be ineffective, without taking into account the fact that JavaScript code snippets often implement a feature based on various relationships (e.g., sequencing, condition, and callback relationships) among the invoked framework API methods. To address this issue, we present a novel Relationship Aware Code Search (RACS) approach for finding code snippets that use JavaScript frameworks to implement a specific feature. In advance, RACS collects a large number of code snippets that use some JavaScript frameworks, mines API usage patterns from the collected code snippets, and represents the mined patterns with method call relationship (MCR) graphs, which capture framework API methods' signatures and their relationships. Given a natural language (NL) search query issued by a programmer, RACS conducts NL processing to automatically extract an action relationship (AR) graph, which consists of actions and their relationships inferred from the query. In this way, RACS reduces code search to the problem of graph search: finding similar MCR graphs for a given AR graph. We conduct evaluations against representative real-world jQuery questions posted on Stack Overflow, based on 308,294 code snippets collected from over 81,540 files on the Internet. The evaluation results show the effectiveness of RACS: the top 1 snippet produced by RACS matches the target code snippet for 46% questions, compared to only 4% achieved by a relationship-oblivious approach.; CPCI-S(ISTP); lixuan12@sei.pku.edu.cn; wangzr13@sei.pku.edu.cn; wqx@sei.pku.edu.cn; shoumeng.yan@intel.com; taoxie@illinois.edu; meih@sei.pku.edu.cn; 690-701
语种英语
出处24th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE)
DOI标识10.1145/2950290.2950341
内容类型其他
源URL[http://ir.pku.edu.cn/handle/20.500.11897/459857]  
专题信息科学技术学院
推荐引用方式
GB/T 7714
Li, Xuan,Wang, Zerui,Wang, Qianxiang,et al. Relationship-Aware Code Search for JavaScript Frameworks. 2016-01-01.
个性服务
查看访问统计
相关权益政策
暂无数据
收藏/分享
所有评论 (0)
暂无评论
 

除非特别说明,本系统中所有内容都受版权保护,并保留所有权利。


©版权所有 ©2017 CSpace - Powered by CSpace