Transformer-based code search for software Q&A sites

JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS(2024)

引用 0|浏览4
暂无评分
摘要
In software Q&A sites, there are many code-solving examples of individual program problems, and these codes with explanatory natural language descriptions are easy to understand and reuse. Code search in software Q&A sites increases the productivity of developers. However, previous approaches to code search fail to capture structural code information and the interactivity between source codes and natural queries. In other words, most of them focus on specific code structures only. This paper proposes TCS (Transformer-based code search), a novel neural network, to catch structural information for searching valid source codes from the query, which is vital for code search. The multi-head attention mechanism in Transformer helps TCS learn enough information about the underlying semantic vector representation of codes and queries. An aligned attention matrix is also employed to catch relationships between codes and queries. Experimental results show that the proposed TCS can learn more structural information and has better performance than existing models.
更多
查看译文
关键词
aligned attention,code search,neural network,structural code information,transformer
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要