INVESTIGADORES
DIAZ PACE Jorge Andres
congresos y reuniones científicas
Título:
An Approach to Prioritize Code Smells for Refactoring
Autor/es:
SANTIAGO A. VIDAL; CLAUDIA MARCOS; JORGE ANDRES DIAZ PACE
Lugar:
Rio de Janeiro
Reunión:
Otro; 1st Latinoamerican School on Software Engineering (ELA-ES); 2013
Institución organizadora:
PUC-Rio
Resumen:
Software evolution and maintenance involve high costs in the development
process, particularly as systems become larger and complex. A usual concern that
makes system maintenance and evolution difficult is the existence of structural design
problems, which were not sufficiently taken care of in early development stages. These
design problems are often described as code smells. A code smell is a symptom in the
source code that helps to identify a design problem. In this way, code smells allow developers
to detect fragments of code that should be re-structured, in order to improve
the quality of the system. A technique commonly used to fix code smells is refactoring.
Different semi-automated tools can be applied to identify code smells in a system.
However, a major limitation of existing tools is that they usually find numerous code
smells. This is a challenging problem for the developer, for a number of reasons. First,
she can get overwhelmed by the amount of information to be analyzed. Second, the
effort needed to fix all the code smells usually exceeds the budget that the developer
has available for refactoring. Third, in practice, not all code smells are equally important
for the goals of the system or its health. Therefore, the developer has to manually
peruse the list of code smells and select a set of smells that will be fixed. In this
context, the provision of tool support for assisting the developer to quickly identify
high-priority code smells becomes essential. In our research, we propose a semiautomated
approach called SpIRIT (Smart Identification of Refactoring opportunITies)
that treats refactoring as a cost-effective activity. By cost-effective, we mean that the
analysis and re-structuring efforts are driven by a handful of code problems considered
as critical for the current system, so that solving those problems will positively contribute
to the system quality but with a limited refactoring expenditure. Given an object-
oriented system with a number of code smells, SpIRIT assists the developer in two
tasks: (i) prioritizing the code smells, and (ii) suggesting candidate refactorings for each
smell using a cost-benefit analysis. The novel aspect of our approach is the prioritization
of code smells based on assessing their relationships with modifiability issues. Our
assessment of a code smell instance is determined by the following factors: past component
modifications, important modifiability scenarios for the system, and types of
code smells. Regarding the suggestion of refactorings, SpIRIT seeks to determine refactoring
alternatives for each code smell of its ranking. After searching through the design
space of refactoring alternatives, the tool should assess a set of candidate refactorings
in terms of the improvement that their application would produce in the system.