Finding Duplicate Code in Java using Beacons and Idioms

Esteban J. Morales and Michael Hoffman


Beacons, duplicate code, idioms


Duplicate code in software increases maintenance costs. Inconsistent changes to code clones can create faults in the program. The negative impact duplicate code has on software has lead to significant research in methods and tools used to find code clones. Though numerous techniques exist for finding duplicate code none make use of beacons and idioms. We present an approach to finding code clones using three algorithms that search for beacons and idioms in Java code. The algorithms are implemented in an automated clone finding tool called Beacon-Idiom Finder. We show that finding code clones using beacons and idioms is possible. We also show that program comprehension can be assisted by informing the programmer of the existence of beacons and idioms in code.

Important Links:

Go Back