Recommending Code Improvements Based on Stack Overflow Answer Edits
Chaiyong Ragkhitwetsagul, Matheus Paixao

TL;DR
This paper introduces Matcha, a tool that leverages Stack Overflow's version history and clone search to recommend code improvements, aiming to reduce sub-optimal code and technical debt in software projects.
Contribution
The paper presents Matcha, a novel approach combining Stack Overflow data and clone search techniques to recommend code improvements, which is a new application of crowdsourced knowledge for code quality enhancement.
Findings
Preliminary analysis shows promising accuracy in identifying sub-optimal code.
Developers accept a significant portion of the recommended improvements.
The approach effectively leverages Stack Overflow's version history for code optimization.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Engineering Techniques and Practices · Open Source Software Innovations
