detection of duplicated expressions

This week I’ve been looking at tools for detecting code duplication – specifically Simian and CPD. I didn’t try CPD in the end, because although it supports Ruby, CPD is bundled with PMD, which doesn’t. I did try Simian, and was impressed by the results. (I’m sure I would have been even more impressed if the alleged Eclipse plugin was still available.)

But I’m still searching for the tool I really wanted: something that can detect duplicated expressions. For example, here’s part of a class from William Wake’s Refactoring Workbook (ch14):

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s