Optimising the fit of stack overflow code snippets into existing code
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 a...
Saved in:
Main Authors: | , , |
---|---|
Format: | text |
Language: | English |
Published: |
Institutional Knowledge at Singapore Management University
2020
|
Subjects: | |
Online Access: | https://ink.library.smu.edu.sg/sis_research/8804 https://ink.library.smu.edu.sg/context/sis_research/article/9807/viewcontent/gi20.pdf |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Singapore Management University |
Language: | English |
id |
sg-smu-ink.sis_research-9807 |
---|---|
record_format |
dspace |
spelling |
sg-smu-ink.sis_research-98072024-05-30T07:55:25Z Optimising the fit of stack overflow code snippets into existing code REID, Brittany TREUDE, Christoph WAGNER, Markus 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%. 2020-07-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/8804 info:doi/10.1145/3377929.3398087 https://ink.library.smu.edu.sg/context/sis_research/article/9807/viewcontent/gi20.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Crowd-generated code snippets Optimisation Stack overflow Software Engineering |
institution |
Singapore Management University |
building |
SMU Libraries |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
SMU Libraries |
collection |
InK@SMU |
language |
English |
topic |
Crowd-generated code snippets Optimisation Stack overflow Software Engineering |
spellingShingle |
Crowd-generated code snippets Optimisation Stack overflow Software Engineering REID, Brittany TREUDE, Christoph WAGNER, Markus Optimising the fit of stack overflow code snippets into existing code |
description |
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%. |
format |
text |
author |
REID, Brittany TREUDE, Christoph WAGNER, Markus |
author_facet |
REID, Brittany TREUDE, Christoph WAGNER, Markus |
author_sort |
REID, Brittany |
title |
Optimising the fit of stack overflow code snippets into existing code |
title_short |
Optimising the fit of stack overflow code snippets into existing code |
title_full |
Optimising the fit of stack overflow code snippets into existing code |
title_fullStr |
Optimising the fit of stack overflow code snippets into existing code |
title_full_unstemmed |
Optimising the fit of stack overflow code snippets into existing code |
title_sort |
optimising the fit of stack overflow code snippets into existing code |
publisher |
Institutional Knowledge at Singapore Management University |
publishDate |
2020 |
url |
https://ink.library.smu.edu.sg/sis_research/8804 https://ink.library.smu.edu.sg/context/sis_research/article/9807/viewcontent/gi20.pdf |
_version_ |
1814047534887206912 |