mlsanityData to 14 Oct 2026

Code Search based on Context-aware Code Translation

arXiv 2202.08029 ↗First posted 16 Feb 2022cs.SE cs.AIcited by 14

Not on the map. Why?

Abstract (arXiv)

Code search is a widely used technique by developers during software development. It provides semantically similar implementations from a large code corpus to developers based on their queries. Existing techniques leverage deep learning models to construct embedding representations for code snippets and queries, respectively. Features such as abstract syntactic trees, control flow graphs, etc., are commonly employed for representing the semantics of code snippets. However, the same structure of these features does not necessarily denote the same semantics of code snippets, and vice versa. In addition, these techniques utilize multiple different word mapping functions that map query words/code tokens to embedding representations. This causes diverged embeddings of the same word/token in queries and code snippets. We propose a novel context-aware code translation technique that translates code snippets into natural language descriptions (called translations). The code translation is conducted on machine instructions, where the context information is collected by simulating the execution of instructions. We further design a shared word mapping function using one single vocabulary for generating embeddings for both translations and queries. We evaluate the effectiveness of our technique, called TranCS, on the CodeSearchNet corpus with 1,000 queries. Experimental results show that TranCS significantly outperforms state-of-the-art techniques by 49.31% to 66.50% in terms of MRR (mean reciprocal rank).

Key facts. Cited by 14 papers in the map (data through 14 Oct 2026). Builds on 26 of its 72 references that are in the map. First posted on arXiv 16 Feb 2022.

Builds on

26 of 72 references.

References · 26

  1. 2017Attention Is All You Needcited by 60,361
  2. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
  3. 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
  4. 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,474
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  6. 2015Gated Graph Sequence Neural Networkscited by 796
  7. 2014Distributed Representations of Sentences and Documentscited by 678
  8. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  9. 2015Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networkscited by 306
  10. 2021Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Taskscited by 70
  11. 2015Deep Sentence Embedding Using Long Short-Term Memory Networks: Analysis and Application to Information Retrievalcited by 54
  12. 2020Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformationscited by 49
14 more
  1. 2019When Deep Learning Met Code Searchcited by 46
  2. 2016Re-evaluating Automatic Metrics for Image Captioningcited by 45
  3. 2016Deep API Learningcited by 41
  4. 2019Multi-Modal Attention Network Learning for Semantic Source Code Retrievalcited by 41
  5. 2019CoaCor: Code Annotation for Code Retrieval with Reinforcement Learningcited by 22
  6. 2020Opportunities and Challenges in Code Search Toolscited by 22
  7. 2020A Multi-Perspective Architecture for Semantic Code Searchcited by 20
  8. 2018Practical Program Repair via Bytecode Mutationcited by 19
  9. 2017Query Expansion Based on Crowd Knowledge for Code Searchcited by 18
  10. 2020OCoR: An Overlapping-Aware Code Retrievercited by 9
  11. 2018Effective Reformulation of Query for Code Search using Crowdsourced Knowledge and Extra-Large Data Analyticscited by 4
  12. 2015Learning API Usages from Bytecode: A Statistical Approachcited by 3
  13. 2021deGraphCS: Embedding Variable-based Flow Graph for Neural Code Searchcited by 3
  14. 2020JCoffee: Using Compiler Feedback to Make Partial Code Snippets Compilablecited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2022: 2; 2023: 6; 2024: 3; 2025: 2; 2026: 1.

14 papers.

Sort:

By area: