Skip to content

Commit d93038a

Browse files
author
Miltos Allamanis
committed
Add paper.
1 parent 25b811f commit d93038a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: publication
3+
title: "CoaCor: Code Annotation for Code Retrieval with Reinforcement Learning"
4+
authors: Z Yao, JR Peddamail, H. Sun
5+
conference:
6+
year: 2019
7+
bibkey: yao2019coacor
8+
---
9+
To accelerate software development, much research has been performed
10+
to help people understand and reuse the huge amount of available code
11+
resources. Two important tasks have been widely studied: code retrieval,
12+
which aims to retrieve code snippets relevant to a given natural language
13+
query from a code base, and code annotation, where the goal is to annotate a
14+
code snippet with anatural language description. Despite their advancement in recent
15+
years, the two tasks are mostly explored separately. In this work, we
16+
investigate a novel perspective of Code annotation for Code retrieval
17+
(hence called “CoaCor”), where a code annotation model is trained
18+
to generate a natural language annotation that can represent the
19+
semantic meaning of a given code snippet and can be leveraged by
20+
a code retrieval model to better distinguish relevant code snippets
21+
from others. To this end, we propose an effective framework based
22+
on reinforcement learning, which explicitly encourages the code
23+
annotation model to generate annotations that can be used for the
24+
retrieval task. Through extensive experiments, we show that code
25+
annotations generated by our framework are much more detailed
26+
and more useful for code retrieval, and they can further improve
27+
the performance of existing code retrieval models significantly.

0 commit comments

Comments
 (0)