and describes some future work.
2 RELATED WORKS
In (Crespo and Marqu´es, 2001), we find an analysis
of refactorings. This analysis is based on a classifi-
cation, in order to characterize and to compare refac-
torings from several works. The characterization is
made from seven features:
Motivation: reuse, requirement changes or mainte-
nance.
Direction: vertical (inheritance), horizontal (client).
Effects: preserve clients, preserve objects, aggres-
sive.
Consequences: global, localized.
Initiated: by inference, by demand.
Human Interaction: automatic, semiautomatic,
manual.
Target: analysis, design, implementation artifacts.
Some conclusions can be extracted from this
work, that helps to infer refactoring properties. How-
ever, this work is performed from a high-level point
of view that is not useful to solve refactoring imple-
mentation problems at a lower level of abstraction.
In (Zannier and Maurer, 2003), a new refactoring
characterization is presented. This characterization
is organised around three complexity levels: atomic,
sequential and complex. Basic object-oriented con-
cepts –package, class, method, field, etc.– define a
feature named scope. Refactorings are then classified
using the scope of the input and output elements of the
refactoring. This approach has some advantages: it is
easy to apply and it does not depend on implemen-
tation details, therefore it can be applied with several
goals. Nevertheless, it defines just three large groups
of refactorings. Some additional implementation de-
cisions are difficult to made, due to the lack of a more
fine-grained classification, which could allow refining
these big groups.
On the basis of (Crespo and Marqu´es, 2001),
(L´opez et al., 2006) proposed a characterization
aimed at helping in refactoring definition. The main
features of this characterization are:
Knowledge Requirement: required design patterns.
Target: design models, code implementation.
Inputs: system, class, attribute, method, instruction,
entity.
Preconditions: system, class, attribute, method, in-
struction, entity.
Actions: create, update, delete.
Postconditions: system, class, attribute, method, in-
struction and entity.
Additionally, it takes into account low level de-
tails, such as the number or type of the elements used
in preconditions, actions or postconditions. This ap-
proach depends on a particular solution and program-
ming language and, therefore, it is difficult to reuse
in other contexts. Gathering all that information is
useful but, as a negative consequence, some decisions
should be made before knowing certain details. As
a consequence, it could be possible that some imple-
mentation changes could have effects on the refactor-
ing characterization. This situation must be avoided.
3 REFACTORING
CHARACTERIZATION
The main goal which drives this characterization is to
define simple features which can be extracted from
refactoring descriptions (from recipes or semiformal
definitions). These features should also be objective,
in the sense that different people should obtain the
same values from their descriptions. Therefore, we
try to avoid a subjective issue.
Hence, instances of characterization features must
be extracted from catalogs with a basic observation,
hiding language and implementation details. Next
subsections detail each feature.
3.1 Design and Language Issues
Design and language issues, required to apply certain
refactoring, points out some clues about its complex-
ity. Programmers can have different knowledge and
experience on the programming language, making it
easier or more difficult to apply, and to implement cer-
tain refactoring. We define three levels:
Basic: a refactoring uses common concepts of
Object-Oriented (OO) languages (modules,
classes, attributes, methods and inheritance). It
talks about concepts of an OO programming lan-
guage, which can be managed by any developers
with basic knowledge of OO programming.
Advanced: advanced concepts of OO programming,
such as contracts, exceptions, genericity, dele-
gates and annotations. These concepts require
a good knowledge of the programming language
and skills in well known “good practices” of OO
programming and design.
ASSISTING REFACTORING TOOL DEVELOPMENT THROUGH REFACTORING CHARACTERIZATION
233