Description: Code duplication exists for many reasons, although it is known to be a bad practice. It
may save costs on the development phase, but it surely has a higher cost of maintenance.
What can we do to detect and eliminate those problems?
This document shows how to use the mathematical foundation of Formal Concept
Analysis to detect code duplication.
Formal Concept Analysis allows us to identify concepts, or groupings of elements, that
have common properties. We work with a particular kind of elements and properties:
Methods containing similar Regular Parse Tree Expressions. We classify these concepts
in a certain way to reveal candidates for code duplication refactorings and show them in
an ordered way, so that the user can decide to apply the refactoring when needed.
This work is done as an extension of the existing Delfstof framework for VisualWorks
Smalltalk, which is currently being developed by researchers at CWI1 and UCL.
To Search:
File list (Check if you may need any files):
MiningSourceCode.pdf