- Title
- Deep code search
- Creator
- Gu, Xiaodong; Zhang, Hongyu; Kim, Sunghun
- Relation
- 2018 ACM/IEEE 40th International Conference on Software Engineering. Proceedings of the 40th International Conference on Software Engineering (Gothenburg, Sweden 27 May, 2018 - 03 June, 2018) p. 933-944
- Publisher Link
- http://dx.doi.org/10.1145/3180155.3180167
- Publisher
- Association for Computing Machinery
- Resource Type
- conference paper
- Date
- 2018
- Description
- To implement a program functionality, developers can reuse previously written code snippets by searching through a large-scale codebase. Over the years, many code search tools have been proposed to help developers. The existing approaches often treat source code as textual documents and utilize information retrieval models to retrieve relevant code snippets that match a given query. These approaches mainly rely on the textual similarity between source code and natural language query. They lack a deep understanding of the semantics of queries and source code. In this paper, we propose a novel deep neural network named CODEnn (Code-Description Embedding Neural Network). Instead of matching text similarity, CODEnn 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. Using the unified vector representation, code snippets related to a natural language query can be retrieved according to their vectors. Semantically related words can also be recognized and irrelevant/noisy keywords in queries can be handled. As a proof-of-concept application, we implement a code search tool named DeepCS using the proposed CODEnn model. We empirically evaluate DeepCS on a large scale codebase collected from GitHub. The experimental results show that our approach can effectively retrieve relevant code snippets and outperforms previous techniques.
- Subject
- code search; deep learning; joint embedding; CODEnn (Code-Description Embedding Neural Network)
- Identifier
- http://hdl.handle.net/1959.13/1430004
- Identifier
- uon:38792
- Identifier
- ISBN:9781450356381
- Language
- eng
- Reviewed
- Hits: 442
- Visitors: 440
- Downloads: 0
Thumbnail | File | Description | Size | Format |
---|