# Joint Embedding of Semantic and Statistical Features for Effective Code Search
## 6 Related Work  
Code search methods are widely used in both industry and academia. The open-source communities (e.g., \(GitHub\), \(SourceForge\)) regard source code as text documents when implementing code search tasks and use information retrieval models to retrieve the snippet of code that matches the given query. These methods mainly rely on the matching text between the source code and the natural language query, while ignoring the semantic understanding of the natural language query and the source code. Code and natural language belong to two heterogeneous languages, and semantically relate code fragments and query sentences may not have common keywords, so this text-based matching method is prone to term mismatch, which leads to low search queries accuracy.  
A huge body of research effort is dedicated to investigating effective and efficient code search techniques. [PERSON] et al. believe that although code and natural language are two heterogeneous languages, they have similar properties, and the code implementations of similar functions often have different degrees of similarity, so it is feasible to use statistical laws to analyze the code [40]. In the code search task, text mining is distributed massive heterogeneous code documents stored in code corpus. GuSites like StackOverflow are powerful production tools because they make it easy to search for code related to user questions expressed in natural language. Existing code search techniques can be divided into two categories: code search based on information retrieval and code search based on machine learning. The former treats code as text and uses information retrieval models to retrieve relevant code fragments that match a given query. The mainstream code search engines include Krugle, GrepCode, to name a few. This technique mainly relies on the textual similarity between source code and user query. The latter mainly uses statistical methods to mine the semantics of codes in massive datasets and builds code search models to further achieve semantic matching between codes and natural language queries. Combining information retrieval and supervised learning techniques, [PERSON] [41] et al. used the RankBoost training set to train a model to learn ranking patterns based on the correlation between code snippets and their corresponding query sentences. [PERSON] et al. proposed ROSF [38]. The method is divided into two processes: coarse-grained search and fine-grained reordering.  
In this work, unlike traditional code search techniques, JessCS achieves deep semantic understanding of source code and user queries combining deep learning techniques. We extract deep statistical features of source code through deep learning and perform semantic analysis and modeling on source code. In order to extract the semantic information in the code as comprehensively as possible, this work proposes an extraction method of cooperative features. Source code features can be extracted separately at different granularities. To solve the term mismatch problem in existing code search research caused by different languages of query sentences and code snippets [42], we also use a joint embedding method.