155 research outputs found
Identifying Refactoring Opportunities for Removing Code Clones with A Metrics-based Approach
Java in Academia and Research (2nd Edition)978-1-922227-010 (Hardcover)978-1-481261-609 (Paperback
Behind the Intent of Extract Method Refactoring: A Systematic Literature Review
Code refactoring is widely recognized as an essential software engineering
practice to improve the understandability and maintainability of the source
code. The Extract Method refactoring is considered as "Swiss army knife" of
refactorings, as developers often apply it to improve their code quality. In
recent years, several studies attempted to recommend Extract Method
refactorings allowing the collection, analysis, and revelation of actionable
data-driven insights about refactoring practices within software projects. In
this paper, we aim at reviewing the current body of knowledge on existing
Extract Method refactoring research and explore their limitations and potential
improvement opportunities for future research efforts. Hence, researchers and
practitioners begin to be aware of the state-of-the-art and identify new
research opportunities in this context. We review the body of knowledge related
to Extract Method refactoring in the form of a systematic literature review
(SLR). After compiling an initial pool of 1,367 papers, we conducted a
systematic selection and our final pool included 83 primary studies. We define
three sets of research questions and systematically develop and refine a
classification schema based on several criteria including their methodology,
applicability, and degree of automation. The results construct a catalog of 83
Extract Method approaches indicating that several techniques have been proposed
in the literature. Our results show that: (i) 38.6% of Extract Method
refactoring studies primarily focus on addressing code clones; (ii) Several of
the Extract Method tools incorporate the developer's involvement in the
decision-making process when applying the method extraction, and (iii) the
existing benchmarks are heterogeneous and do not contain the same type of
information, making standardizing them for the purpose of benchmarking
difficult
Extract Class Refactoring by analyzing class variables
Software maintenance activities often cause design erosion and lead to increased software complexity and maintenance costs. Extract Class Refactoring attempts to address design erosion by identifying and pulling out extraneous functionalities from a class and distributing them to new classes. This thesis extends previous research in this area by improving a metric known as Structural Similarity between Methods (SSM) used during Extract Class Refactoring. The improved metric, called Variable based Similarity between methods (VSM), establishes similarities between methods based on the variables they share, and on how they use these variables. Strongly connected methods are then allocated into new classes. The thesis also introduces another metric, Cognate Members Metric (CMM), which identifies those members of a class that are only used in combination with each other, and hence, probably belong together in a separate class. Additionally, this work extends and modifies existing refactoring processes for extracting classes. A software prototype that performs Extract Class Refactoring has been developed to substantiate the research. A few Case studies are discussed and comparison and analysis of results of refactoring using the new and older approaches of the Extract Class Refactoring process are presented
Applications of Multi-view Learning Approaches for Software Comprehension
Program comprehension concerns the ability of an individual to make an
understanding of an existing software system to extend or transform it.
Software systems comprise of data that are noisy and missing, which makes
program understanding even more difficult. A software system consists of
various views including the module dependency graph, execution logs,
evolutionary information and the vocabulary used in the source code, that
collectively defines the software system. Each of these views contain unique
and complementary information; together which can more accurately describe the
data. In this paper, we investigate various techniques for combining different
sources of information to improve the performance of a program comprehension
task. We employ state-of-the-art techniques from learning to 1) find a suitable
similarity function for each view, and 2) compare different multi-view learning
techniques to decompose a software system into high-level units and give
component-level recommendations for refactoring of the system, as well as
cross-view source code search. The experiments conducted on 10 relatively large
Java software systems show that by fusing knowledge from different views, we
can guarantee a lower bound on the quality of the modularization and even
improve upon it. We proceed by integrating different sources of information to
give a set of high-level recommendations as to how to refactor the software
system. Furthermore, we demonstrate how learning a joint subspace allows for
performing cross-modal retrieval across views, yielding results that are more
aligned with what the user intends by the query. The multi-view approaches
outlined in this paper can be employed for addressing problems in software
engineering that can be encoded in terms of a learning problem, such as
software bug prediction and feature location
MORE: A multi‐objective refactoring recommendation approach to introducing design patterns and fixing code smells
Peer Reviewedhttps://deepblue.lib.umich.edu/bitstream/2027.42/137556/1/smr1843.pdfhttps://deepblue.lib.umich.edu/bitstream/2027.42/137556/2/smr1843_am.pd
Code Smells and Refactoring: A Tertiary Systematic Review of Challenges and Observations
In this paper, we present a tertiary systematic literature review of previous
surveys, secondary systematic literature reviews, and systematic mappings. We
identify the main observations (what we know) and challenges (what we do not
know) on code smells and refactoring. We show that code smells and refactoring
have a strong relationship with quality attributes, i.e., with
understandability, maintainability, testability, complexity, functionality, and
reusability. We argue that code smells and refactoring could be considered as
the two faces of a same coin. Besides, we identify how refactoring affects
quality attributes, more than code smells. We also discuss the implications of
this work for practitioners, researchers, and instructors. We identify 13 open
issues that could guide future research work. Thus, we want to highlight the
gap between code smells and refactoring in the current state of
software-engineering research. We wish that this work could help the
software-engineering research community in collaborating on future work on code
smells and refactoring
Assessing architectural evolution: A case study
This is the post-print version of the Article. The official published can be accessed from the link below - Copyright @ 2011 SpringerThis paper proposes to use a historical perspective on generic laws, principles,
and guidelines, like Lehman’s software evolution laws and Martin’s design principles, in order to achieve a multi-faceted process and structural assessment of a system’s architectural evolution. We present a simple structural model with associated historical metrics and
visualizations that could form part of an architect’s dashboard. We perform such an assessment for the Eclipse SDK, as a case study of a large, complex, and long-lived system for which sustained effective architectural evolution is paramount. The twofold aim of checking generic principles on a well-know system is, on the one hand,
to see whether there are certain lessons that could be learned for best practice of architectural evolution, and on the other hand to get more insights about the applicability of such principles. We find that while the Eclipse SDK does follow several of the laws and principles, there are some deviations, and we discuss areas of architectural improvement and limitations of the assessment approach
- …