Optimising the fit of stack overflow code snippets into existing code
Autor: | Christoph Treude, Markus Wagner, Brittany Reid |
---|---|
Rok vydání: | 2020 |
Předmět: |
FOS: Computer and information sciences
Source code Computer science media_common.quotation_subject 0102 computer and information sciences 02 engineering and technology Reuse computer.software_genre 01 natural sciences Computer Science - Software Engineering Software 0202 electrical engineering electronic engineering information engineering Code (cryptography) media_common business.industry Programming language Code reuse Process (computing) Snippet Software Engineering (cs.SE) Test case 010201 computation theory & mathematics Stack overflow 020201 artificial intelligence & image processing business computer |
Zdroj: | GECCO Companion |
DOI: | 10.1145/3377929.3398087 |
Popis: | 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%. Submitted to GECCO 2020 GI Workshop |
Databáze: | OpenAIRE |
Externí odkaz: |