2

We use CPD and works very well.

Some interfaces are implemented in multiple classes. These classes share the implementation code using 'delegate' pattern [ http://en.wikipedia.org/wiki/Delegation_pattern ]. The resulting code sometime gets bigger and reported as duplicate code. How to skip this kind of problem?

Is there an annotation or specific comment pattern to skip duplicate code detection in select part of code?

There is one for PMD -- @SuppressWarnings("PMD"). Could there be something similar for CPD?

Jayan
  • 16,628
  • 12
  • 79
  • 131
  • 1
    > "resulting code sometime gets bigger". It simply shouldn't. You should refactor your code to remove duplication. Common and shared one-liners then should not be reported as duplicated code. – Ondřej Mirtes Apr 25 '14 at 13:51

0 Answers0