About | Contact Us | Register | Login
ProceedingsSeriesJournalsSearchEAI
Collaborative Computing: Networking, Applications and Worksharing. 19th EAI International Conference, CollaborateCom 2023, Corfu Island, Greece, October 4-6, 2023, Proceedings, Part I

Research Article

A Code Search Method Incorporating Code Annotations

Cite
BibTeX Plain Text
  • @INPROCEEDINGS{10.1007/978-3-031-54521-4_18,
        author={Qi Li and Jianxun Liu and Xiangping Zhang},
        title={A Code Search Method Incorporating Code Annotations},
        proceedings={Collaborative Computing: Networking, Applications and Worksharing. 19th EAI International Conference, CollaborateCom 2023, Corfu Island, Greece, October 4-6, 2023, Proceedings, Part I},
        proceedings_a={COLLABORATECOM},
        year={2024},
        month={2},
        keywords={Code search Code features Code annotations Bidirectional LSTM Multi-head attention},
        doi={10.1007/978-3-031-54521-4_18}
    }
    
  • Qi Li
    Jianxun Liu
    Xiangping Zhang
    Year: 2024
    A Code Search Method Incorporating Code Annotations
    COLLABORATECOM
    Springer
    DOI: 10.1007/978-3-031-54521-4_18
Qi Li1, Jianxun Liu1,*, Xiangping Zhang1
  • 1: School of Computer Science and Engineering, Hunan University of Science and Technology, Xiangtan
*Contact email: 37323474@qq.com

Abstract

Code search is a technique for users to retrieve code snippets from the Code base using natural language, which is dedicated to retrieve the target code accurately and quickly to improve the efficiency of software development. The deep learning based code search technique greatly improves the accuracy of search by learning the relationship between code and query statements. Since it relies on the extracted code features, acquiring more code features is the key to quickly improve the search performance. However, most of the previous works have not taken code annotations into consideration. In this paper, we take code annotations as code features and apply them to code search, which is named ICA-CS (Code Search that Incorporates Code Annotations). In the method, firstly, the code features are embedded to get the corresponding vector representation. It is then processed by bidirectional LSTM (Long Short-Term Memory) network or multi-head attention respectively, followed by features fusion. And finally, the model is trained by joint embedding and using the minimised ranking loss function. As the experimental results show, on the evaluation metric MRR (mean reciprocal rank) compared to the state-of-the-art models DeepCS, SAN-CS, CARLCS-CNN and SelfAtt, the proposed model improves 48.96%, 17.11%, 41.01% and 13.07%, respectively.

Keywords
Code search Code features Code annotations Bidirectional LSTM Multi-head attention
Published
2024-02-23
Appears in
SpringerLink
http://dx.doi.org/10.1007/978-3-031-54521-4_18
Copyright © 2023–2025 ICST
EBSCOProQuestDBLPDOAJPortico
EAI Logo

About EAI

  • Who We Are
  • Leadership
  • Research Areas
  • Partners
  • Media Center

Community

  • Membership
  • Conference
  • Recognition
  • Sponsor Us

Publish with EAI

  • Publishing
  • Journals
  • Proceedings
  • Books
  • EUDL