Catalogue Search | MBRL
Search Results Heading
Explore the vast range of titles available.
MBRLSearchResults
-
DisciplineDiscipline
-
Is Peer ReviewedIs Peer Reviewed
-
Series TitleSeries Title
-
Reading LevelReading Level
-
YearFrom:-To:
-
More FiltersMore FiltersContent TypeItem TypeIs Full-Text AvailableSubjectPublisherSourceDonorLanguagePlace of PublicationContributorsLocation
Done
Filters
Reset
233
result(s) for
"refactoring"
Sort by:
Refactoring JavaScript : turning bad code into good code
If your JavaScript is a mess, frameworks can only do so much to help. No matter what framework, \"compiles-to-JS\" language, or library you use, bugs and performance concerns will always be an issue if the underlying quality of your JavaScript is poor. With this hands-on guide, you'll learn how to test and refactor your existing code to help reduce complexity, improve readability, and gain confidence in the codebase.
How We Refactor, and How We Know It
2012
Refactoring is widely practiced by developers, and considerable research and development effort has been invested in refactoring tools. However, little has been reported about the adoption of refactoring tools, and many assumptions about refactoring practice have little empirical support. In this paper, we examine refactoring tool usage and evaluate some of the assumptions made by other researchers. To measure tool usage, we randomly sampled code changes from four Eclipse and eight Mylyn developers and ascertained, for each refactoring, if it was performed manually or with tool support. We found that refactoring tools are seldom used: 11 percent by Eclipse developers and 9 percent by Mylyn developers. To understand refactoring practice at large, we drew from a variety of data sets spanning more than 39,000 developers, 240,000 tool-assisted refactorings, 2,500 developer hours, and 12,000 version control commits. Using these data, we cast doubt on several previously stated assumptions about how programmers refactor, while validating others. Finally, we interviewed the Eclipse and Mylyn developers to help us understand why they did not use refactoring tools and to gather ideas for future research.
Journal Article
Refactoring for Software Design Smells
by
Samarthyam, Ganesh
,
Suryanarayana, Girish
,
Sharma, Tushar
in
Software failures
,
Software refactoring
2014,2015
Awareness of design smells - indicators of common design problems - helps developers or software engineers understand mistakes made while designing, what design principles were overlooked or misapplied, and what principles need to be applied properly to address those smells through refactoring.
Conflict-aware optimal scheduling of prioritised code clone refactoring
by
Roy, Chanchal Kumar
,
Zibran, Minhaz Fahim
in
automated refactoring scheduler
,
code clone refactoring effort estimation
,
Computer programs
2013
Duplicated or similar source code, also known as code clones, are possible malicious ‘code smells’ that may need to be removed through refactoring to enhance maintainability. Among many potential refactoring opportunities, the choice and order of a set of refactoring activities may have distinguishable effect on the design/code quality measured in terms of software metrics. Moreover, there may be dependencies and conflicts among those refactorings of different priorities. Addressing all the conflicts, priorities and dependencies, a manual formulation of an optimal refactoring schedule is very expensive, if not impossible. Therefore an automated refactoring scheduler is necessary to ‘maximise benefit and minimise refactoring effort’. However, the estimation of the efforts required to perform code clone refactoring is a challenging task. This study makes two contributions. First, the authors propose an effort model for the estimation of code clone refactoring efforts. Second, the authors propose a constraint programming (CP) approach for conflict-aware optimal scheduling of code clone refactoring. A qualitative evaluation of the effort model from the developers’ perspective suggests that the model is complete and useful for code clone refactoring effort estimation. The authors also quantitatively compared their refactoring scheduler with other well-known scheduling techniques such as the genetic algorithm, greedy approaches and linear programming. The authors’ empirical study suggests that the proposed CP-based approach outperforms other approaches they considered.
Journal Article
Automatic software refactoring: a systematic literature review
by
Alshayeb Mohammad
,
Baqais Abdulrahman Ahmed Bobakr
in
Automation
,
Literature reviews
,
Researchers
2020
Refactoring a software artifact is an embedded task in the maintenance phase of the software life cycle. To reduce the time and effort required for this task, researchers proposed methods to automate the software refactoring process at the design and code levels. In this paper, we conducted a systematic literature review of papers that suggest, propose, or implement an automated refactoring process. Using different phases, setting several quality measures, and snowballing, only 41 papers passed to the last stage to be analyzed and reviewed. We observe an increase in the number of papers that propose automatic refactoring. The results show that while most of the papers discuss code refactoring, only a few recent papers are focused on model refactoring. Search-based refactoring is gaining more popularity, and several researchers have used it to perform refactoring in a quick and efficient manner.
Journal Article
IMPLEMENTATION OF CLEAN CODE AND DESIGN PATTERNS TO ENHANCE MAINTAINABILITY AND READABILITY IN SKIN DISEASE DETECTION APPLICATION
This research aims to improve the maintainability and readability of a skin disease detection application through the implementation of clean code and design patterns. SkinPal, an image analysis application, faces several issues in its backend API, particularly in the maintenance and development process. The research began with a domain case analysis, followed by an assessment of existing maintainability and readability problems. Afterwards, clean code principles were mapped and used as the basis for the refactoring process using design patterns. Lastly, the evaluation phase is used to measure the improvements. Several issues were identified in the backend code, including the merging of business logic with data access, unclear variable names, and code duplication. A total of 10 classes and 18 functions had low maintainability scores, and most of the functions were difficult to read. The refactoring process successfully improved the maintainability to a high level, from an average score of 39.61 to 99.62, confirming a major enhancement in code quality compared to previous studies. In terms of readability, only one of six developers encountered difficulties in understanding the refactored code. Overall, the implementation of clean code and design patterns successfully improved maintainability and readability in SkinPal's backend.
Journal Article
Design Level Class Decomposition using the Threshold-based Hierarchical Agglomerative Clustering
2022
Refactoring activity is essential to maintain the quality of a software’s internal structure. It decays as the impact of software changes and evolution. Class decomposition is one of the refactoring processes in maintaining internal quality. Mostly, the refactoring process is done at the level of source code. Shifting from source code level to design level is necessary as a quick step to refactoring and close to the requirement. The design artifact has a higher abstraction level than the source code and has limited information. The challenge is to define new metrics needed in class decomposition using the design artifact's information. Syntactic and semantic information from the design artifact provides valuable data for the decomposition process. Class decomposition can be done at the level of design artifact (class diagram) using syntactic and semantic information. The dynamic threshold-based Hierarchical Agglomerative Clustering produces a more specific cluster that is considered to produce a single responsibility class.
Journal Article
A Survey on Secure Refactoring
2024
Secure refactoring involves a set of safe transformations aimed at enhancing the overall security of the codebase. During refactoring, code transformations are performed on software systems to maintain code quality and address existing vulnerabilities. However, if done carelessly, refactoring can introduce new security vulnerabilities. To the best of our knowledge, no study has investigated existing secure refactoring methods and their effectiveness in ensuring software system security. Therefore, this study aims to survey and synthesize relevant research on secure refactoring approaches to provide an understanding of the techniques and methods used to enhance security during the refactoring process. In this study, 55 papers on secure refactoring, selected from well-known digital libraries, were analysed, and reviewed, covering a period from 2011 to 2023 to offer the most scalable and comprehensive literature review of existing secure refactoring studies. The findings indicate that specific refactoring techniques are effective in addressing common vulnerabilities such as SQL Injection, Buffer Overflow, and Cross-Site Scripting (XSS). These techniques include Extract Method, Replace Temp with Query, Introduce Parameter Object, and Encapsulate Field. Conversely, some refactoring operations, such as Pull Up Method and Extract Subclass, can inadvertently introduce vulnerabilities like bugs or inadequate access control. Based on this survey, we proposed a taxonomy of secure refactoring that serves as a framework for classifying existing research, identifying research trends, and highlighting gaps in the literature and avenues for further investigation.
Journal Article
Schedule of Bad Smell Detection and Resolution: A New Way to Save Effort
2012
Bad smells are signs of potential problems in code. Detecting and resolving bad smells, however, remain time-consuming for software engineers despite proposals on bad smell detection and refactoring tools. Numerous bad smells have been recognized, yet the sequences in which the detection and resolution of different kinds of bad smells are performed are rarely discussed because software engineers do not know how to optimize sequences or determine the benefits of an optimal sequence. To this end, we propose a detection and resolution sequence for different kinds of bad smells to simplify their detection and resolution. We highlight the necessity of managing bad smell resolution sequences with a motivating example, and recommend a suitable sequence for commonly occurring bad smells. We evaluate this recommendation on two nontrivial open source applications, and the evaluation results suggest that a significant reduction in effort ranging from 17.64 to 20 percent can be achieved when bad smells are detected and resolved using the proposed sequence.
Journal Article