Automating Source Code Refactoring in the Classroom
- URL: http://arxiv.org/abs/2311.10753v1
- Date: Sun, 5 Nov 2023 18:46:00 GMT
- Title: Automating Source Code Refactoring in the Classroom
- Authors: Eman Abdullah AlOmar and Mohamed Wiem Mkaouer and Ali Ouni
- Abstract summary: This paper discusses the results of an experiment in the that involved carrying out various classroom activities for the purpose of removing antipatterns using Jodorant, an Eclipse plugin that supports antipatterns detection and correction.
The results of the quantitative and qualitative analysis with 171 students show that students tend to appreciate the idea of learning, and are satisfied with various aspects of the JDeodorant plugin's operation.
- Score: 15.194527511076725
- License: http://creativecommons.org/publicdomain/zero/1.0/
- Abstract: Refactoring is the practice of improving software quality without altering
its external behavior. Developers intuitively refactor their code for multiple
purposes, such as improving program comprehension, reducing code complexity,
dealing with technical debt, and removing code smells. However, no prior
studies have exposed the students to an experience of the process of
antipatterns detection and refactoring correction, and provided students with
toolset to practice it. To understand and increase the awareness of refactoring
concepts, in this paper, we aim to reflect on our experience with teaching
refactoring and how it helps students become more aware of bad programming
practices and the importance of correcting them via refactoring. This paper
discusses the results of an experiment in the classroom that involved carrying
out various refactoring activities for the purpose of removing antipatterns
using JDeodorant, an Eclipse plugin that supports antipatterns detection and
refactoring. The results of the quantitative and qualitative analysis with 171
students show that students tend to appreciate the idea of learning refactoring
and are satisfied with various aspects of the JDeodorant plugin's operation.
Through this experiment, refactoring can turn into a vital part of the
computing educational plan. We envision our findings enabling educators to
support students with refactoring tools tuned towards safer and trustworthy
refactoring.
Related papers
- RILe: Reinforced Imitation Learning [60.63173816209543]
RILe is a novel trainer-student system that learns a dynamic reward function based on the student's performance and alignment with expert demonstrations.
RILe enables better performance in complex settings where traditional methods falter, outperforming existing methods by 2x in complex simulated robot-locomotion tasks.
arXiv Detail & Related papers (2024-06-12T17:56:31Z) - Re-ReST: Reflection-Reinforced Self-Training for Language Agents [101.22559705696885]
Self-training in language agents can generate supervision from the agent itself.
We present Reflection-Reinforced Self-Training (Re-ReST), which uses a textitreflector to refine low-quality generated samples.
arXiv Detail & Related papers (2024-06-03T16:21:38Z) - Insights into Deep Learning Refactoring: Bridging the Gap Between Practices and Expectations [13.084553746852382]
Deep learning software has become progressively complex as the software evolves.
The insight of code in the context of deep learning is still unclear.
Research and the development of related tools are crucial for improving project maintainability and code quality.
arXiv Detail & Related papers (2024-05-08T07:35:14Z) - A Survey of Deep Learning Based Software Refactoring [5.716522445049744]
Dozens of deep learning-based approaches have been proposed forfactoring software.
There is a lack of comprehensive reviews on such works as well as a taxonomy for deep learning-based approaches.
Most of the deep learning techniques have been used for the detection of code smells and the recommendation of solutions.
arXiv Detail & Related papers (2024-04-30T03:07:11Z) - ReGAL: Refactoring Programs to Discover Generalizable Abstractions [59.05769810380928]
Generalizable Abstraction Learning (ReGAL) is a method for learning a library of reusable functions via codeization.
We find that the shared function libraries discovered by ReGAL make programs easier to predict across diverse domains.
For CodeLlama-13B, ReGAL results in absolute accuracy increases of 11.5% on LOGO, 26.1% on date understanding, and 8.1% on TextCraft, outperforming GPT-3.5 in two of three domains.
arXiv Detail & Related papers (2024-01-29T18:45:30Z) - Fixing Your Own Smells: Adding a Mistake-Based Familiarisation Step When
Teaching Code Refactoring [2.021502591596062]
Students must first complete a programming exercise to ensure they will produce a code smell.
This simple intervention is based on the idea that learning is easier if students are familiar with the code.
We conducted a study with 35 novice undergraduates in which they completed various exercises alternately taught using a traditional and our'mistake-based' approach.
arXiv Detail & Related papers (2024-01-02T03:39:19Z) - State of Refactoring Adoption: Better Understanding Developer Perception
of Refactoring [5.516979718589074]
We aim to explore how developers document their activities during the software life cycle.
We call such activity Self-Affirmed Refactoring (SAR), which indicates developers' documentation of their activities.
We propose an approach to identify whether a commit describes developer-related events to classify them according to the common quality improvement categories.
arXiv Detail & Related papers (2023-06-09T16:38:20Z) - CONCORD: Clone-aware Contrastive Learning for Source Code [64.51161487524436]
Self-supervised pre-training has gained traction for learning generic code representations valuable for many downstream SE tasks.
We argue that it is also essential to factor in how developers code day-to-day for general-purpose representation learning.
In particular, we propose CONCORD, a self-supervised, contrastive learning strategy to place benign clones closer in the representation space while moving deviants further apart.
arXiv Detail & Related papers (2023-06-05T20:39:08Z) - RefBERT: A Two-Stage Pre-trained Framework for Automatic Rename
Refactoring [57.8069006460087]
We study automatic rename on variable names, which is considered more challenging than other rename activities.
We propose RefBERT, a two-stage pre-trained framework for rename on variable names.
We show that the generated variable names of RefBERT are more accurate and meaningful than those produced by the existing method.
arXiv Detail & Related papers (2023-05-28T12:29:39Z) - Do code refactorings influence the merge effort? [80.1936417993664]
Multiple contributors frequently change the source code in parallel to implement new features, fix bugs, existing code, and make other changes.
These simultaneous changes need to be merged into the same version of the source code.
Studies show that 10 to 20 percent of all merge attempts result in conflicts, which require the manual developer's intervention to complete the process.
arXiv Detail & Related papers (2023-05-10T13:24:59Z) - How We Refactor and How We Document it? On the Use of Supervised Machine
Learning Algorithms to Classify Refactoring Documentation [25.626914797750487]
Refactoring is the art of improving the design of a system without altering its external behavior.
This study categorizes commits into 3 categories, namely, Internal QA, External QA, and Code Smell Resolution, along with the traditional BugFix and Functional categories.
To better understand our classification results, we analyzed commit messages to extract patterns that developers regularly use to describe their smells.
arXiv Detail & Related papers (2020-10-26T20:33:17Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.