School of Computing

Clone Detection and Removal for Erlang/OTP within a Refactoring Environment

Huiqing Li and Simon Thompson

In P. Achten, P. Koopman, and M. T. Moraz�n, editors, Draft Proceedings of the Ninth Symposium on Trends in Functional Programming(TFP), pages 182-196, The Netherlands, May 2008.

Abstract

A well-known bad code smell in refactoring and software maintenance is duplicated code, or code clones. A code clone is a code fragment that is identical or similar to another. Unjustified code clones increase code size, ake maintenance and comprehension more difficult, and also indicate design problems such as lack of encapsulation or abstraction.

This paper proposes a token and AST based hybrid approach to automatically detecting code clones in Erlang/OTP programs, underlying a collection of refactorings to support user-controlled automatic clone removal, and examines their application in substantial case studies. Both the clone detector and the refactorings are integrated within Wrangler, the refactoring tool developed at Kent for Erlang/OTP.

Download publication 227 kbytes

Bibtex Record

@inproceedings{2777,
author = {Huiqing Li and Simon Thompson},
title = {{C}lone {D}etection and {R}emoval for {E}rlang/{OTP} within a {R}efactoring {E}nvironment},
month = {May},
year = {2008},
pages = {182-196},
keywords = {determinacy analysis, Craig interpolants},
note = {},
doi = {},
url = {http://www.cs.kent.ac.uk/pubs/2008/2777},
    publication_type = {inproceedings},
    submission_id = {22586_1213138563},
    booktitle = {Draft Proceedings of the Ninth Symposium on Trends in Functional  Programming(TFP)},
    editor = {P.  Achten  and  P.  Koopman and   M. T. Moraz�n},
    address = {The Netherlands},
}

School of Computing, University of Kent, Canterbury, Kent, CT2 7NF

Enquiries: +44 (0)1227 824180 or contact us.

Last Updated: 21/03/2014