Predicting the Impact of Batch Refactoring Code Smells on Application
Resource Consumption
- URL: http://arxiv.org/abs/2306.15763v1
- Date: Tue, 27 Jun 2023 19:28:05 GMT
- Title: Predicting the Impact of Batch Refactoring Code Smells on Application
Resource Consumption
- Authors: Asif Imran, Tevfik Kosar, Jaroslaw Zola, Muhammed Fatih Bulut
- Abstract summary: This paper determines the relationship between software code smell batch, and resource consumption.
Next, it aims to design algorithms to predict the impact of code smell on resource consumption.
- Score: 3.5557219875516646
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Automated batch refactoring has become a de-facto mechanism to restructure
software that may have significant design flaws negatively impacting the code
quality and maintainability. Although automated batch refactoring techniques
are known to significantly improve overall software quality and
maintainability, their impact on resource utilization is not well studied. This
paper aims to bridge the gap between batch refactoring code smells and
consumption of resources. It determines the relationship between software code
smell batch refactoring, and resource consumption. Next, it aims to design
algorithms to predict the impact of code smell refactoring on resource
consumption. This paper investigates 16 code smell types and their joint effect
on resource utilization for 31 open source applications. It provides a detailed
empirical analysis of the change in application CPU and memory utilization
after refactoring specific code smells in isolation and in batches. This
analysis is then used to train regression algorithms to predict the impact of
batch refactoring on CPU and memory utilization before making any refactoring
decisions. Experimental results also show that our ANN-based regression model
provides highly accurate predictions for the impact of batch refactoring on
resource consumption. It allows the software developers to intelligently decide
which code smells they should refactor jointly to achieve high code quality and
maintainability without increasing the application resource utilization. This
paper responds to the important and urgent need of software engineers across a
broad range of software applications, who are looking to refactor code smells
and at the same time improve resource consumption. Finally, it brings forward
the concept of resource aware code smell refactoring to the most crucial
software applications.
Related papers
- In Search of Metrics to Guide Developer-Based Refactoring Recommendations [13.063733696956678]
Motivation is a well-established approach to improving source code quality without compromising its external behavior.
We propose an empirical study into the metrics that study the developer's willingness to apply operations.
We will quantify the value of product and process metrics in grasping developers' motivations to perform.
arXiv Detail & Related papers (2024-07-25T16:32:35Z) - Investigating the Transferability of Code Repair for Low-Resource Programming Languages [57.62712191540067]
Large language models (LLMs) have shown remarkable performance on code generation tasks.
Recent works augment the code repair process by integrating modern techniques such as chain-of-thought reasoning or distillation.
We investigate the benefits of distilling code repair for both high and low resource languages.
arXiv Detail & Related papers (2024-06-21T05:05:39Z) - 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) - LLM-Assisted Code Cleaning For Training Accurate Code Generators [53.087019724256606]
We investigate data quality for code and find that making the code more structured and readable leads to improved code generation performance of the system.
We build a novel data-cleaning pipeline that uses these principles to transform existing programs.
We evaluate our approach on two challenging algorithmic code generation benchmarks and find that fine-tuning CodeLLaMa-7B improves the performance by up to 30% compared to fine-tuning on the original dataset.
arXiv Detail & Related papers (2023-11-25T02:45:50Z) - Automating Source Code Refactoring in the Classroom [15.194527511076725]
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.
arXiv Detail & Related papers (2023-11-05T18:46:00Z) - URegM: a unified prediction model of resource consumption for
refactoring software smells in open source cloud [3.9704849108478704]
We propose a framework called Unified Regression Modelling (URegM) which predicts the impact of code smell on cloud resource usage.
Results show that URegM is capable of accurately predicting resource consumption due to code smell.
arXiv Detail & Related papers (2023-10-22T23:03:35Z) - 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) - Prevalence of Code Smells in Reinforcement Learning Projects [1.7218973692320518]
Reinforcement Learning (RL) is being increasingly used to learn and adapt application behavior in many domains, including large-scale and safety critical systems.
With the advent of plug-n-play RL libraries, its applicability has further increased, enabling integration of RL algorithms by users.
We note, however, that the majority of such code is not developed by RL engineers, which as a consequence, may lead to poor program quality yielding bugs, suboptimal performance, maintainability, and evolution problems for RL-based projects.
arXiv Detail & Related papers (2023-03-17T20:25:13Z) - 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) - A Transformer-based Approach for Source Code Summarization [86.08359401867577]
We learn code representation for summarization by modeling the pairwise relationship between code tokens.
We show that despite the approach is simple, it outperforms the state-of-the-art techniques by a significant margin.
arXiv Detail & Related papers (2020-05-01T23:29:36Z)
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.