Explore chapters and articles related to this topic
Software Engineering Paradigm for Real-Time Accurate Decision Making for Code Smell Prioritization
Published in Kavita Taneja, Harmunish Taneja, Kuldeep Kumar, Arvind Selwal, Eng Lieh Ouh, Data Science and Innovations for Intelligent Systems, 2021
Randeep Singh, Amit Bindal, Ashok Kumar
Another aspect considered in this chapter is to evaluate the effect of prioritizing different code smells and their underlying effect on software quality. The aim is to determine the effect of refactoring on software quality and its involved maintenance efforts. Table 3.5 shows the obtained experimental results that compare two scenarios. The considered scenario-1 considers tackling all the obtained code smells and scenario-2 considers prioritizing code smells and tackling the only subset of identified code smells. In both scenarios, the TurboMQ modularization metric is used to compare quality of the system. The involved maintenance efforts are also measured in two scenarios and the obtained results are presented in the last three columns of Table 3.6. From the presented results, it is clear that although tackling only prioritized code smells results in decreased quality of the software system (with very less factor). The average value for the decrease in the overall quality of a software system is only −3.85%. However, at the same time, the reduction in maintenance efforts is remarkable (with a sufficiently higher factor) with a reduction in overall maintenance efforts by 25.42%. In other words, the obtained prioritized code smells list contains key code smells that are the main contributing factors in the quality of the software. Simultaneously, involved refactoring/maintenance cost and time are strongly reduced. This shows the usefulness and feasibility of the proposed code smell prioritization approach of this chapter.
XP and Lean Software Development—the Spare Parts Logistics Case Study
Published in Peter Middleton, James Sutton, Lean Software Strategies, 2020
Refactoring. Left unattended, software systems tend to slip toward disorder. As you add features, it often extends the original design in unforeseen ways, leading to ever more ugly and brittle code. Refactoring is the science of improving the design of existing code. Improving a design allows you to add new features more quickly. The SPL team minimally applied refactoring in the C++ parts of SPL. For the Java portion of SPL, refactoring was applied more aggressively and succeeded in exposing both dependency problems and coding errors. The best way to build flexible code is to flex it. Refactoring helped reveal design weaknesses early so the team could fix them. Refactoring on the C++ part of the project was greatly hampered by the long, 20-minute cycle time and the difficulty in creating and deleting classes in a difficult to use, heavily customized, source control system.
Refactoring Support for Variability-intensive Systems
Published in Ivan Mistrik, Matthias Galster, Bruce R. Maxim, Software Engineering for Variability Intensive Systems, 2019
Vahid Alizadeh, Marouane Kessentini, Bruce R. Maxim
The detected defects can be fixed by applying some refactoring operations. For example, to correct the Blob code-smell (large class containing most of the features of the system) many operations can be used to reduce the number of functionalities in a specific class: move methods, extract class, etc. Fowler [12] defines refactoring as the process of improving a code after it has been written by changing the internal structure of the code without changing the external behavior. The idea is to reorganize variables, classes and methods in order to facilitate future extensions. This reorganization is used to improve different aspects of software-quality: reusability, maintainability, complexity, etc. [13]. Some examples of refactoring operations include: (1) push down field: moves a field from some class to those subclasses that require it; (2) add parameter: adds a new parameter to a method, (3) push-down method: moves a method from some class to those subclasses that require it; and (4) move method: moves a method from one class to another. Overall, the refactoring process consists of three main steps [12]: (1) identify where the software should be refactored (e.g. bad smells detections); (2) select which refactorings should be applied to the identified code fragments; and (3) ensure that the applied refactoring preserves the program behavior.
Deep Learning-Based Code Refactoring: A Review of Current Knowledge
Published in Journal of Computer Information Systems, 2023
Purnima Naik, Salomi Nelaballi, Venkata Sai Pusuluri, Dae-Kyoo Kim
Code refactoring is a software development practice that involves restructuring code to enhance its quality without altering the software’s external behavior.2 The process of code refactoring typically involves (i) identifying refactoring opportunities, (ii) determining the appropriate refactoring technique to use, (iii) analyzing the behaviors to preserve, (iv) applying the chosen refactoring technique, (v) assessing the preservation of behaviors and targeted qualities after refactoring, and (vi) maintaining consistency between the refactored artifacts and other artifacts.21 Refactoring techniques can be classified by the level at which they are applied, including class-level, method-level, and variable-level. Class-level refactorings include techniques such as Inline Class, Collapse Hierarchy, and Extract Superclass, while method-level refactorings include Rename Method, Move Method, and Extract Method. Variable-level refactorings include Encapsulate Field, Move Field, and Pull Up Field. Recently, code refactoring has also been used for converting monolithic applications into microservices,22–24 in which classes in the application are grouped to form microservices.
Identifying rename refactoring opportunities based on feature requests
Published in International Journal of Computers and Applications, 2022
Ally S. Nyamawe, Khadidja Bakhti, Sulis Sandiwarno
Software maintenance and evolution often involve refactoring activities that aim at improving the quality of the involved systems by altering their internal structures without affecting their observable behaviors. Refactoring is currently supported by most of the contemporary integrated development environments (IDEs) and widely recognized as a practice of resolving code smells [1]. Generally, code smells are potential indicators that the software is poorly designed and that it's claiming for improvement [2]. Refactoring is an important activity that prevents software from the negative effects of evolution [3] such as increasing complexity and decreasing quality. One of the key steps in software refactoring is to identify where the software should be refactored (i.e. refactoring opportunity) [4]. The most common approach to identify refactoring opportunities is the identification of code smells [4]. However, manual detection of code smells is often tedious, error-prone, and time demanding especially in large and non-trivial software systems. Consequently, several tools and techniques have been proposed to facilitate (semi-) automatic detection of different types of code smells [5–7].
A machine learning approach to software model refactoring
Published in International Journal of Computers and Applications, 2022
Brahmaleen Kaur Sidhu, Kawaljeet Singh, Neeraj Sharma
Refactoring is defined as a form of groomative maintenance that involves replacing components or algorithms with more elegant ones, changing data naming conventions, altering code readability or understandability; preventive maintenance that enables participation in software reuse; and adaptive maintenance that reallocates functions among components or subsystems, changing design, and implementation practices [3]. It is an essential activity that immunizes software to the adverse effects of evolution. It is an umbrella activity that continuously improves the internal structure of software to upkeep quality, thus reducing the amount of rework, lowering costs, and improving time-to-market. Refactoring replaces inferior structures in software in a way that maintenance and extension become easier. It reduces software complexity without changing the external behavior. Contemporary software development methods, like agile development and extreme programming, advocate continuous refactoring. Initially defined at code level [4], the concept of refactoring was applied at a higher level of abstraction much later, by Fowler et al. [5]. Model refactoring counteracts erosion of the software design at an early stage in the software project complying with the model-driven engineering paradigm. Most refactoring studies use threshold values of quality metrics to mark refactoring opportunities. The selection of threshold is subjective and thus cannot be applied universally. Also, the defects (smells) uncovered by individual metrics are superficial as they are actually consequences of the sub-optimal realization of design principles.