SEApr 16, 2020

Optimising the Fit of Stack Overflow Code Snippets into Existing Code

arXiv:2004.07663v11 citations
AI Analysis

This addresses efficiency for software developers by automating code integration, though it is incremental as it builds on existing IDE and NLP tools.

The paper tackles the problem of tedious code reuse from Stack Overflow by presenting NLP2TestableCode, an automated tool for the Eclipse IDE that searches, modifies, and evaluates Java code snippets, achieving 82.9% compilable and 42.9% testable snippets in evaluation.

Software developers often reuse code from online sources such as Stack Overflow within their projects. However, the process of searching for code snippets and integrating them within existing source code can be tedious. In order to improve efficiency and reduce time spent on code reuse, we present an automated code reuse tool for the Eclipse IDE (Integrated Developer Environment), NLP2TestableCode. NLP2TestableCode can not only search for Java code snippets using natural language tasks, but also evaluate code snippets based on a user's existing code, modify snippets to improve fit and correct errors, before presenting the user with the best snippet, all without leaving the editor. NLP2TestableCode also includes functionality to automatically generate customisable test cases and suggest argument and return types, in order to further evaluate code snippets. In evaluation, NLP2TestableCode was capable of finding compilable code snippets for 82.9% of tasks, and testable code snippets for 42.9%.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes