School of Computing

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

Huiqing Li and Simon Thompson

In ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation (PEPM'09), pages 182-196, Savannah, Georgia, USA, January 2009.

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, make 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 373 kbytes (PDF)

Bibtex Record

@inproceedings{2871,
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 = {January},
year = {2009},
pages = {182-196},
keywords = {determinacy analysis, Craig interpolants},
note = {},
doi = {},
url = {http://www.cs.kent.ac.uk/pubs/2009/2871},
    publication_type = {inproceedings},
    submission_id = {9659_1234020261},
    booktitle = {ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation (PEPM'09)},
    address = {Savannah, Georgia, USA},
    refereed = {yes},
}

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

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

Last Updated: 21/03/2014