title: How to detect code duplication during development?
body: <p>We have a fairly large code base, 400K LOC of C++, and code duplication is something of a problem. Are there any tools which can effectively detect duplicated blocks of code?</p>
  
  <p>Ideally this would be something that developers could use during development rather than just run occasionally to see where the problems are. It would also be nice if we could integrate such a tool with CruiseControl to give a report after each check in. </p>
  
  <p>I had a look at <a href="http://www.iam.unibe.ch/~scg/Research/Duploc/index.html" rel="noreferrer">Duploc</a> some time ago, it showed a nice graph but requires a smalltalk environment to use it, which makes running it automatically rather difficult.</p>
  
  <p>Free tools would be nice, but if there are some good commercial tools I would also be interested.</p>