APSEC 2022
Tue 6 - Fri 9 December 2022
Wed 7 Dec 2022 14:50 - 15:10 at Room3 - Source Code Analysis 1 Chair(s): Yoshiki Higo

Developers often tend to search and reuse code snippets from large code repositories to improve their programming skills. To support code reuse, early code search models used information retrieval (IR) techniques to index a large corpus of code and then returned relevant code based on search statements. However, IR-based models can cause information loss due to keyword matching. To solve this problem, developers applied deep learning (DL) techniques to encode search models. However, these models either learn isolated representations of codes and queries or learn interdependent representations of codes and queries in a single way, which both limit the effectiveness of the models.

In this study, we propose a code search model MpaCS, which can interact from multiple perspectives to enable cross-language retrieval between code and query statements. MpaCS extracts code and query information from the code textual features (i.e., method name, and tokens), the code structural feature (i.e., abstract syntax tree), and the query feature (i.e., tokens). We first implement the alignment between code features and query features at the fragment level. Then we propose a context matching module to achieve a deeper interaction between the code and the query. Finally, we propose a new attention network to explore the maximum alignment relationship between code and query from another perspective. We evaluate the performance of MpaCS on two existing large-scale datasets with 69k and 105k code snippets, respectively. Experimental results show that MpaCS outperforms four state-of-the-art models DeepCS, UNIF, MPCAT and CARLCS-CNN.

Wed 7 Dec

Displayed time zone: Osaka, Sapporo, Tokyo change

14:30 - 15:40
Source Code Analysis 1Technical Track at Room3
Chair(s): Yoshiki Higo Osaka University
14:30
20m
Paper
Toward a Better Alignment Between the Research and Practice of Code Search Engines
Technical Track
Yin Liu Beijing University of Technology, Shuangyi Li Virginia Tech, Eli Tilevich Virginia Tech
14:50
20m
Paper
Multi-Perspective Alignment Mechanism for Code Search
Technical Track
Shun Yang Wuhan University, Bo Cai Wuhan University
15:10
20m
Paper
Automated Generation of Bug Samples Based on Source Code Analysis
Technical Track
Tianming Zheng Shanghai Jiao Tong University, Zhixin Tong Shanghai Jiao Tong University, Yi-Ping You National Chiao Tung University, Yue Wu Shanghai Jiao Tong University