title: When to consolidate code duplicates
body: <p>We're using a code static analysis tool (Sonar) to detect duplicate code on our project. It appears that there are a great many instances of duplicates in the code but most of them are less than 10 lines and occur only once. In the 'opinion' of the Stackoverflow community, Where should you draw the line at consolidating code duplications? For example should it be at >= 10 lines for individual duplicates or should you consider overall number of lines duplicated eg. consider > 10 duplicates that occur more than once.
  For context the programming languages I'm looking at are Java and ActionScript.
  I realize that this question may not come to a definitive answer but some clear guidance on this matter could save me a lot of time refactoring code (or increase the time:)</p>