Proceedings Article10.1145/2950290.2950341
Relationship-aware code search for JavaScript frameworks
Xuan Li,Zerui Wang,Qianxiang Wang,Shoumeng Yan,Tao Xie,Hong Mei +5 more
- 01 Nov 2016
- pp 690-701
75
TL;DR: This work presents a novel Relationship-Aware Code Search (RACS) approach for finding code snippets that use JavaScript frameworks to implement a specific feature, and reduces code search to the problem of graph search: finding similar MCR graphs for a given AR graph.
read more
Abstract: 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.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
Deep code search
Xiaodong Gu,Hongyu Zhang,Sunghun Kim +2 more
- 27 May 2018
TL;DR: A novel deep neural network named CODEnn (Code-Description Embedding Neural Network) is proposed, which jointly embeds code snippets and natural language descriptions into a high-dimensional vector space, in such a way that code snippet and its corresponding description have similar vectors.
712
Opportunities and Challenges in Code Search Tools
TL;DR: This work investigated the publication trends of code search studies, analyzed key components, such as codebase, query, and modeling technique used to build code search tools, and classified existing tools into focusing on supporting seven different search tasks.
Seeking the user interface
Steven P. Reiss
- 15 Sep 2014
TL;DR: A system that uses code search to simplify and automate the generation of user interface code and lets programmers interact with the matched solutions and return the running code for the solutions they choose.
50
Neural query expansion for code search
Jason Liu,Seohyun Kim,Vijayaraghavan Murali,Swarat Chaudhuri,Satish Chandra +4 more
- 22 Jun 2019
TL;DR: NQE, a neural model that takes in a set of keywords and predicts a setof keywords to expand the query to NCS, is presented, which shows that with query expansion, NQE + NCS is able to perform better than using NCS alone.
44
•Posted Content
TranS^3: A Transformer-based Framework for Unifying Code Summarization and Code Search.
TL;DR: A transformer-based framework to integrate code summarization with code search, TranS^3 enables an actor-critic network, where in the actor network, the collected code snippets are encoded via transformer- and tree-transformer-based encoder and decode the given code snippet to generate its comment.
43
References
Accurate Unlexicalized Parsing
Dan Klein,Christopher D. Manning +1 more
- 07 Jul 2003
TL;DR: It is demonstrated that an unlexicalized PCFG can parse much more accurately than previously shown, by making use of simple, linguistically motivated state splits, which break down false independence assumptions latent in a vanilla treebank grammar.
•Proceedings Article
Corpus-based and knowledge-based measures of text semantic similarity
Rada Mihalcea,Courtney D. Corley,Carlo Strapparava +2 more
- 16 Jul 2006
TL;DR: This paper shows that the semantic similarity method out-performs methods based on simple lexical matching, resulting in up to 13% error rate reduction with respect to the traditional vector-based similarity metric.
Classifying Relations via Long Short Term Memory Networks along Shortest Dependency Paths
TL;DR: In this paper, a multichannel recurrent neural network with long short-term memory (LSTM) units was proposed to classify the relation of two entities in a sentence.
Jungloid mining: helping to navigate the API jungle
David Mandelin,Lin Xu,Rastislav Bodik,Doug Kimelman +3 more
- 12 Jun 2005
TL;DR: Prospector as mentioned in this paper synthesizes jungloid code fragments automatically given a simple query that describes the desired code in terms of input and output types, which can be used to help programmers write client code more easily.
523
MAPO: Mining and Recommending API Usage Patterns
Hao Zhong,Tao Xie,Lu Zhang,Jian Pei,Hong Mei +4 more
- 30 Jul 2009
TL;DR: The results show that using MAPO, programmers produce code with fewer bugs when facing relatively complex API usages, comparing with using the two state-of-the-art code search tools.
Related Papers (5)
[...]
Xiaodong Gu,Hongyu Zhang,Sunghun Kim +2 more
- 27 May 2018
Caitlin Sadowski,Kathryn T. Stolee,Sebastian Elbaum +2 more
- 30 Aug 2015