Refactoring is one of the key practices in Extreme Programming and other agile methods. Duplicated code is one of the most pervasive and pungent smells to remove from source code through refactoring. Duplicated code has been largely studied in the literature, and different types of duplications, or “clones”, have been identified. Some studies analyzed in details the problems caused by clones in the code, others outlined also the difficulties in removing clones, and the cases in which it could be better not removing them. The refactoring cost for removing clones can be very high, also due to the different choices on the possible refactoring steps. In this paper, we describe our approach and tool developed with the aim to suggest the best refactorings to remove clones in Java code. Our approach is based on the classification of the clones in terms of their location in a class hierarchy, and allows to choose among a restricted set of refactorings, which are then evaluated using multiple criteria. We provide a validation of the effectiveness of the approach.

ARCELLI FONTANA, F., Zanoni, M., Zanoni, F. (2015). A duplicated code refactoring advisor. In Agile Processes, in Software Engineering, and Extreme Programming - 16th International Conference, XP 2015, Helsinki, Finland, May 25-29, 2015, Proceedings (pp.3-14). Springer Verlag [10.1007/978-3-319-18612-2_1].

A duplicated code refactoring advisor

ARCELLI FONTANA, FRANCESCA
Primo
;
ZANONI, MARCO
Secondo
;
2015

Abstract

Refactoring is one of the key practices in Extreme Programming and other agile methods. Duplicated code is one of the most pervasive and pungent smells to remove from source code through refactoring. Duplicated code has been largely studied in the literature, and different types of duplications, or “clones”, have been identified. Some studies analyzed in details the problems caused by clones in the code, others outlined also the difficulties in removing clones, and the cases in which it could be better not removing them. The refactoring cost for removing clones can be very high, also due to the different choices on the possible refactoring steps. In this paper, we describe our approach and tool developed with the aim to suggest the best refactorings to remove clones in Java code. Our approach is based on the classification of the clones in terms of their location in a class hierarchy, and allows to choose among a restricted set of refactorings, which are then evaluated using multiple criteria. We provide a validation of the effectiveness of the approach.
paper
Clone refactoring; Empirical study; Refactoring advisor;
English
International Conference on Agile Software Development, XP 25- 29 May
2015
Lassenius, C; Dingsøyr, T; Paasivaara, M
Agile Processes, in Software Engineering, and Extreme Programming - 16th International Conference, XP 2015, Helsinki, Finland, May 25-29, 2015, Proceedings
9783319186115
2015
212
3
14
http://link.springer.com/chapter/10.1007%2F978-3-319-18612-2_1
reserved
ARCELLI FONTANA, F., Zanoni, M., Zanoni, F. (2015). A duplicated code refactoring advisor. In Agile Processes, in Software Engineering, and Extreme Programming - 16th International Conference, XP 2015, Helsinki, Finland, May 25-29, 2015, Proceedings (pp.3-14). Springer Verlag [10.1007/978-3-319-18612-2_1].
File in questo prodotto:
File Dimensione Formato  
dcra.pdf

Solo gestori archivio

Descrizione: articolo
Dimensione 210.26 kB
Formato Adobe PDF
210.26 kB Adobe PDF   Visualizza/Apri   Richiedi una copia

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10281/84897
Citazioni
  • Scopus 14
  • ???jsp.display-item.citation.isi??? 8
Social impact