© University of Kent - Contact | Feedback | Legal | Cookies
The University of Kent, Canterbury, Kent, CT2 7NZ, T +44 (0)1227 764000
Duplicated code is a well known problem in software maintenance and refactoring. Code clones tend to increase program size and several studies have shown that duplicated code makes maintenance and code understanding more complex and time consuming.
This paper presents a new technique for the detection and removal of duplicated Haskell code. The system is implemented within the refactoring framework of the Haskell Refactorer (HaRe), and uses an Abstract Syntax Tree (AST) based approach. Detection of duplicate code is automatic, while elimination is semi-automatic, with the user managing the clone removal. After presenting the system, an example is given to show how it works in practice.
Download publication 159 kbytes (PDF)
@inproceedings{2976,
author = {Christopher Brown and Simon Thompson},
title = {{Clone Detection and Elimination for Haskell}},
month = {January},
year = {2010},
pages = {111-120},
keywords = {Haskell, refactoring, HaRe, duplicated code, program analysis, program transformation, generalisation},
note = {},
doi = {},
url = {http://www.cs.kent.ac.uk/pubs/2010/2976},
publication_type = {inproceedings},
submission_id = {6278_1263997522},
ISBN = {978-1-60558-727-1},
booktitle = {PEPM'10: Proceedings of the 2010 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation},
editor = {John Gallagher and Janis Voigtlander},
publisher = {ACM Press},
refereed = {Yes},
}