FaCoY --- A Code-to-Code Search Engine

Speaker:        Dr Dongsun Kim
                Interdisciplinary Centre for Security,
                Reliability and Trust (SnT)
                University of Luxembourg

Title:          "FaCoY --- A Code-to-Code Search Engine"

Date:           Friday, 14 September 2018

Time:           3:00pm - 4:00pm

Venue:          Room 5619 (via lift 31/32), HKUST


Code search is an unavoidable activity in software development. Various
approaches and techniques have been explored in the literature to support
code search tasks. Most of these approaches focus on serving user queries
provided as natural language free-form input. However, there exists a wide
range of use-case scenarios where a code-to-code approach would be most
beneficial. For example, research directions in code transplantation, code
diversity, patch recommendation can leverage a code-to-code search engine
to find essential ingredients for their techniques.

In this paper, we propose FaCoY, a novel approach for statically finding
code fragments which may be semantically similar to user input code. FaCoY
implements a query alternation strategy: instead of directly matching code
query tokens with code in the search space, FaCoY first attempts to
identify other tokens which may also be relevant in implementing the
functional behavior of the input code. With various experiments, we show
that (1) FaCoY is more effective than online code-to-code search engines;
(2) FaCoY can detect more semantic code clones (i.e., Type-4) in
BigCloneBench than the state-of-the-art; (3) FaCoY, while static, can
detect code fragments which are indeed similar with respect to runtime
execution behavior; and (4) FaCoY can be useful in code/patch


Dongsun Kim is a Research Associate at the University of Luxembourg. He
was formerly a post-doctoral fellow at the Hong Kong University of Science
and Technology. His research interest includes automatic patch generation,
fault localization, static analysis, and search-based software engineering
(SBSE). In particular, automated debugging is his current focus. His
recent work has been recognized by several awards such as a featured
article of the IEEE Transactions on Software Engineering (TSE) and ACM
SIGSOFT Distinguished Paper of the International Conference on Software
Engineering (ICSE). He is leading the FIXPATTERN project funded by the FNR
(Luxembourg National Research Fund) CORE programme and fostering program
debugging research.