Aroma: Code Recommendation via Structural Code Search

12/04/2018
by   Sifei Luan, et al.
0

Programmers often write code which have similarity to existing code written somewhere. A tool that could help programmers to search such similar code would be immensely useful. Such a tool could help programmers to extend partially written code snippets to completely implement necessary functionality, help to discover extensions to the partial code which are commonly done by other programmers, help to cross-check against similar code written by other programmers, or help to add extra code which would avoid common mistakes and errors. We propose Aroma, a tool and technique for code recommendation via structural code search. Aroma indexes a huge code corpus including thousands of open-source projects, takes a partial code snippet as input, searches the indexed method bodies which contain the partial code snippet, clusters and intersects the results of search to recommend a small set of succinct code snippets which contain the query snippet and which appears as part of several programs in the corpus. We evaluated Aroma on several randomly selected queries created from the corpus and as well as those derived from the code snippets obtained from Stack Overflow, a popular website for discussing code. We found that Aroma was able to retrieve and recommend most relevant code snippets efficiently.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/12/2018

RACK: Code Search in the IDE using Crowdsourced Knowledge

Traditional code search engines often do not perform well with natural l...
research
11/03/2020

Exempla Gratis (E.G.): Code Examples for Free

Modern software engineering often involves using many existing APIs, bot...
research
05/12/2023

Opti Code Pro: A Heuristic Search-based Approach to Code Refactoring

This paper presents an approach that evaluates best-first search methods...
research
04/14/2022

Recommending Code Improvements Based on Stack Overflow Answer Edits

Background: Sub-optimal code is prevalent in software systems. Developer...
research
05/09/2022

A Tutorial on Structural Optimization

Structural optimization is a useful and interesting tool. Unfortunately,...
research
01/10/2020

Searching a Database of Source Codes Using Contextualized Code Search

We assume a database containing a large set of program source codes and ...
research
10/17/2017

Reply With: Proactive Recommendation of Email Attachments

Email responses often contain items-such as a file or a hyperlink to an ...

Please sign up or login with your details

Forgot password? Click here to reset