Similar Code Detection and Elimination for Erlang Programs

9 years 8 months ago
Similar Code Detection and Elimination for Erlang Programs
A well-known bad code smell in refactoring and software maintenance is duplicated code, that is the existence of code clones, which are code fragments that are identical or similar to one another. Unjustified code clones increase code size, make maintenance and comprehension more difficult, and also indicate design problems such as a encapsulation or abstraction. This paper describes an approach to detecting ‘similar’ code based on on of anti-unification, or least-general common abstraction. This mechanism is used for detecting code clones in Erlang programs, and is supplemented by a collection of refactorings to support user-controlled automatic clone removal. The similar code detection algorithm and refactorings are integrated within Wrangler, a tool developed at the University of Kent for interactive refactoring of Erlang programs. We conclude with a report on case studies and comparisons with other tools. Key words: Anti-unification, Code clone detection, Erlang, Program ana...
Huiqing Li, Simon Thompson
Added 17 Mar 2010
Updated 17 Mar 2010
Type Conference
Year 2010
Where PADL
Authors Huiqing Li, Simon Thompson
Comments (0)