Recommending Code Improvements Based on Stack Overflow Answer Edits

04/14/2022
by   Chaiyong Ragkhitwetsagul, et al.
0

Background: Sub-optimal code is prevalent in software systems. Developers may write low-quality code due to many reasons, such as lack of technical knowledge, lack of experience, time pressure, management decisions, and even unhappiness. Once sub-optimal code is unknowingly (or knowingly) integrated into the codebase of software systems, its accumulation may lead to large maintenance costs and technical debt. Stack Overflow is a popular website for programmers to ask questions and share their code snippets. The crowdsourced and collaborative nature of Stack Overflow has created a large source of programming knowledge that can be leveraged to assist developers in their day-to-day activities. Objective: In this paper, we present an exploratory study to evaluate the usefulness of recommending code improvements based on Stack Overflow answers' edits. Method: We propose Matcha, a code recommendation tool that leverages Stack Overflow code snippets with version history and code clone search techniques to identify sub-optimal code in software projects and suggest their optimised version. By using SOTorrent and GitHub datasets, we will quali-quantitatively investigate the usefulness of recommendations given by Matcha to developers using manual categorisation of the recommendations and acceptance of pull-requests to open-source projects.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/21/2018

Awareness and Experience of Developers to Outdated and License-Violating Code on Stack Overflow: An Online Survey

We performed two online surveys of Stack Overflow answerers and visitors...
research
03/03/2023

An Exploratory Study on the Occurrence of Self-Admitted Technical Debt in Android Apps

Technical debt describes situations where developers write less-than-opt...
research
05/04/2023

Improving Code Example Recommendations on Informal Documentation Using BERT and Query-Aware LSH: A Comparative Study

The study of code example recommendation has been conducted extensively ...
research
11/26/2022

Sketch2FullStack: Generating Skeleton Code of Full Stack Website and Application from Sketch using Deep Learning and Computer Vision

For a full-stack web or app development, it requires a software firm or ...
research
09/08/2018

SOTorrent: Studying the Origin, Evolution, and Usage of Stack Overflow Code Snippets

Stack Overflow (SO) is the most popular question-and-answer website for ...
research
12/04/2018

Aroma: Code Recommendation via Structural Code Search

Programmers often write code which have similarity to existing code writ...
research
02/08/2018

Usage and Attribution of Stack Overflow Code Snippets in GitHub Projects

Stack Overflow (SO) is the largest Q&A website for software developers, ...

Please sign up or login with your details

Forgot password? Click here to reset